<div dir="ltr"><div><div><div><b>1800336940 is 10-digits; therefore, it will match (\d{10}), which will be $1.  <br><br>$1 = 1800336940<br><br></b></div><b>Then, in your bridge you add 1 in front, so it is correct. <br><br>
</b></div><b>What behaviors are you looking for in this case?<br><br></b></div><b><span style="color:red"><span style="color:rgb(0,0,0)">-djbinter</span><br></span></b></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jan 9, 2013 at 11:48 AM, Sean Devoy <span dir="ltr">&lt;<a href="mailto:sdevoy@bizfocused.com" target="_blank">sdevoy@bizfocused.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">HI,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></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?)!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Anyway,  I have an xml dial plan:<u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">  &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">    &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">      &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">      &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">      &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">      &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">      &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">      &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><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">    &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"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue">  &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;<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></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.<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">In fact in my log I can see:<u></u><u></u></p><p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">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"><a href="tel:%2814104207777" value="+14104207777" target="_blank">(14104207777</a></span></b>) =~ /^1?(\d{10})$/ break=on-false<u></u><u></u></p>
<p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action set(ringback=${us-ring}) <u></u><u></u></p><p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action set(effective_caller_id_number=${outbound_caller_id_number}) <u></u><u></u></p>
<p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action set(ani=${outbound_caller_id_number}) <u></u><u></u></p><p class="MsoNormal">
Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action set(effective_caller_id_name=${outbound_caller_id_name}) <u></u><u></u></p><p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action set(hangup_after_bridge=true) <u></u><u></u></p>
<p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action bridge<b><span style="color:red">(sofia/gateway/vitelity-inbound/<a href="tel:14104207777" value="+14104207777" target="_blank">14104207777</a></span></b>)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b><span style="color:red">BUT<u></u><u></u></span></b></p><p class="MsoNormal">It does not work for my customer :<u></u><u></u></p><p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:101@fs_alst.bizfocused.com" target="_blank">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<u></u><u></u></p>
<p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:101@fs_alst.bizfocused.com" target="_blank">101@fs_alst.bizfocused.com</a> Action set(ringback=${us-ring}) <u></u><u></u></p><p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:101@fs_alst.bizfocused.com" target="_blank">101@fs_alst.bizfocused.com</a> Action set(effective_caller_id_number=${outbound_caller_id_number}) <u></u><u></u></p>
<p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:101@fs_alst.bizfocused.com" target="_blank">101@fs_alst.bizfocused.com</a> Action set(ani=${outbound_caller_id_number}) <u></u><u></u></p><p class="MsoNormal">
Dialplan: sofia/external/<a href="mailto:101@fs_alst.bizfocused.com" target="_blank">101@fs_alst.bizfocused.com</a> Action set(effective_caller_id_name=${outbound_caller_id_name}) <u></u><u></u></p><p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:220@fs_bfis.bizfocused.com" target="_blank">220@fs_bfis.bizfocused.com</a> Action set(hangup_after_bridge=true) <u></u><u></u></p>
<p class="MsoNormal">Dialplan: sofia/external/<a href="mailto:101@fs_alst.bizfocused.com" target="_blank">101@fs_alst.bizfocused.com</a> Action bridge<b><span style="color:red">(sofia/gateway/vitelity-inbound/11800336940</span></b>)  <span style="background:yellow">NOTE THE EXTRA LEADING 1</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">So, what am I missing?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Sean<u></u><u></u></p>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>