<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><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]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>HI,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</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>&nbsp;</o:p></p><p class=MsoNormal>Anyway,&nbsp; 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'>&nbsp; &lt;</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'>&quot;<span style='color:blue'>ten_or eleven_digiti_dial</span>&quot;<span style='color:blue'> &gt;</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'>&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>destination_number</span>&quot;<span style='color:blue'> </span><span style='color:red'>expression</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>^1?(\d{10})$</span>&quot;<span style='color:blue'>&gt;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>set</span>&quot;<span style='color:blue'> </span><span style='color:red'>data</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>ringback=${us-ring}</span>&quot;<span style='color:blue'>/&gt;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>set</span>&quot;<span style='color:blue'> </span><span style='color:red'>data</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>effective_caller_id_number=${outbound_caller_id_number}</span>&quot;<span style='color:blue'>/&gt;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>set</span>&quot;<span style='color:blue'> </span><span style='color:red'>data</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>ani=${outbound_caller_id_number}</span>&quot;<span style='color:blue'>/&gt;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>set</span>&quot;<span style='color:blue'> </span><span style='color:red'>data</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>effective_caller_id_name=${outbound_caller_id_name}</span>&quot;<span style='color:blue'>/&gt;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>set</span>&quot;<span style='color:blue'> </span><span style='color:red'>data</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>hangup_after_bridge=true</span>&quot;<span style='color:blue'>/&gt;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</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'>&quot;<span style='color:blue'>bridge</span>&quot;<span style='color:blue'> </span><span style='color:red'>data</span><span style='color:blue'>=</span>&quot;<span style='color:blue'>sofia/gateway/vitelity-inbound/1$1</span>&quot;<span style='color:blue'>/&gt;</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'>&nbsp;&nbsp;&nbsp; &lt;/</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'>&gt;</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'>&nbsp; &lt;/</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'>&gt;<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</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>&nbsp;</o:p></p><p class=MsoNormal>In fact in my log I can see:<o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com 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: sofia/external/220@fs_bfis.bizfocused.com Action set(ringback=${us-ring}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com Action set(effective_caller_id_number=${outbound_caller_id_number}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com Action set(ani=${outbound_caller_id_number}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com Action set(effective_caller_id_name=${outbound_caller_id_name}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com Action set(hangup_after_bridge=true) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com Action bridge<b><span style='color:red'>(sofia/gateway/vitelity-inbound/14104207777</span></b>)<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</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: sofia/external/101@fs_alst.bizfocused.com 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: sofia/external/101@fs_alst.bizfocused.com Action set(ringback=${us-ring}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/101@fs_alst.bizfocused.com Action set(effective_caller_id_number=${outbound_caller_id_number}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/101@fs_alst.bizfocused.com Action set(ani=${outbound_caller_id_number}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/101@fs_alst.bizfocused.com Action set(effective_caller_id_name=${outbound_caller_id_name}) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/220@fs_bfis.bizfocused.com Action set(hangup_after_bridge=true) <o:p></o:p></p><p class=MsoNormal>Dialplan: sofia/external/101@fs_alst.bizfocused.com Action bridge<b><span style='color:red'>(sofia/gateway/vitelity-inbound/11800336940</span></b>)&nbsp; <span style='background:yellow;mso-highlight:yellow'>NOTE THE EXTRA LEADING 1</span><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>So, what am I missing?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Sean<o:p></o:p></p></div></body></html>