<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Sean,<br>
<br>
Your customer's destination number is one digit short. That's why
it matches "1800336940" as \d{10} and prepends another "1"<br>
<br>
-Victor<br>
<br>
On 13-01-09 02:48 PM, Sean Devoy wrote:<br>
</div>
<blockquote
cite="mid:320801cdeea2$499ef800$dcdce800$@bizfocused.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">HI,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I really hope this question is not as dumb
as some of my recent questions (Anybody else wiped out you O/S
lately?)!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Anyway, I have an xml dial plan:<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">extension</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">name</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">ten_or eleven_digiti_dial</span>"<span
style="color:blue"> ></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">condition</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">field</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">destination_number</span>"<span
style="color:blue"> </span><span style="color:red">expression</span><span
style="color:blue">=</span>"<span style="color:blue">^1?(\d{10})$</span>"<span
style="color:blue">></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">set</span>"<span style="color:blue"> </span><span
style="color:red">data</span><span style="color:blue">=</span>"<span
style="color:blue">ringback=${us-ring}</span>"<span
style="color:blue">/></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">set</span>"<span style="color:blue"> </span><span
style="color:red">data</span><span style="color:blue">=</span>"<span
style="color:blue">effective_caller_id_number=${outbound_caller_id_number}</span>"<span
style="color:blue">/></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">set</span>"<span style="color:blue"> </span><span
style="color:red">data</span><span style="color:blue">=</span>"<span
style="color:blue">ani=${outbound_caller_id_number}</span>"<span
style="color:blue">/></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">set</span>"<span style="color:blue"> </span><span
style="color:red">data</span><span style="color:blue">=</span>"<span
style="color:blue">effective_caller_id_name=${outbound_caller_id_name}</span>"<span
style="color:blue">/></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">set</span>"<span style="color:blue"> </span><span
style="color:red">data</span><span style="color:blue">=</span>"<span
style="color:blue">hangup_after_bridge=true</span>"<span
style="color:blue">/></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
<</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue"> </span><span
style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span
style="font-size:9.5pt;font-family:Consolas">"<span
style="color:blue">bridge</span>"<span style="color:blue">
</span><span style="color:red">data</span><span
style="color:blue">=</span>"<span style="color:blue">sofia/gateway/vitelity-inbound/1$1</span>"<span
style="color:blue">/></span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
</</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">condition</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">></span><span
style="font-size:9.5pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">
</</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">extension</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue">><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I thought that would accept either 10 or 11
digit numbers starting with 1 and bridge to the gateway always
using 1 plus the 10 digits.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In fact in my log I can see:<o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Regex <b><span
style="color:red">(PASS)</span></b> [ten_or
eleven_digiti_dial] destination_number<b><span
style="color:red">(14104207777</span></b>) =~
/^1?(\d{10})$/ break=on-false<o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action
set(ringback=${us-ring}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action
set(effective_caller_id_number=${outbound_caller_id_number}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action
set(ani=${outbound_caller_id_number}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action
set(effective_caller_id_name=${outbound_caller_id_name}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action
set(hangup_after_bridge=true) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action bridge<b><span
style="color:red">(sofia/gateway/vitelity-inbound/14104207777</span></b>)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="color:red">BUT<o:p></o:p></span></b></p>
<p class="MsoNormal">It does not work for my customer :<o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/101@fs_alst.bizfocused.com">sofia/external/101@fs_alst.bizfocused.com</a> Regex <b><span
style="color:red">(PASS</span></b>)
[ten_or_eleven_digiti_dial] destination_number(<b><span
style="color:red">1800336940</span></b>) =~ /^1?(\d{10})$/
break=on-false<o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/101@fs_alst.bizfocused.com">sofia/external/101@fs_alst.bizfocused.com</a> Action
set(ringback=${us-ring}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/101@fs_alst.bizfocused.com">sofia/external/101@fs_alst.bizfocused.com</a> Action
set(effective_caller_id_number=${outbound_caller_id_number}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/101@fs_alst.bizfocused.com">sofia/external/101@fs_alst.bizfocused.com</a> Action
set(ani=${outbound_caller_id_number}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/101@fs_alst.bizfocused.com">sofia/external/101@fs_alst.bizfocused.com</a> Action
set(effective_caller_id_name=${outbound_caller_id_name}) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/220@fs_bfis.bizfocused.com">sofia/external/220@fs_bfis.bizfocused.com</a> Action
set(hangup_after_bridge=true) <o:p></o:p></p>
<p class="MsoNormal">Dialplan:
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/101@fs_alst.bizfocused.com">sofia/external/101@fs_alst.bizfocused.com</a> Action bridge<b><span
style="color:red">(sofia/gateway/vitelity-inbound/11800336940</span></b>)
<span style="background:yellow;mso-highlight:yellow">NOTE THE
EXTRA LEADING 1</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So, what am I missing?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Sean<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
</body>
</html>