<div dir="ltr">Your customer dialed a 10 digit number, which was then converted to 11 by adding the 1. If you count the digits in the original dialed number, you will notice it's not a complete number.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jan 9, 2013 at 2:48 PM, Sean Devoy <span dir="ltr"><<a href="mailto:sdevoy@bizfocused.com" target="_blank">sdevoy@bizfocused.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><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"> <</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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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"><u></u><u></u></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">><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>