Michael, haha, yeah they indeed are. That&#39;s why I&#39;m routing based on $2, but I still see the 1 and/or the 011 going through to the &quot;bridge&quot; application. Why??<br><br><div class="gmail_quote">On Tue, May 25, 2010 at 8:34 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, May 25, 2010 at 5:27 PM, RR <span dir="ltr">&lt;<a href="mailto:ranjtech@gmail.com" target="_blank">ranjtech@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Ok, so I take that back. This seems to only work when the dialplan has a specific ANI and DNIS / destination_number / sip_to_user defined. If this is more general<div><br></div><div>like </div><div><br></div><div><div>&lt;include&gt;</div>


<div>  &lt;extension name=&quot;public_did&quot;&gt;</div><div>    &lt;condition field=&quot;ani&quot; expression=&quot;^(\+?|\+1?|1?)(\d+).*$&quot; break=&quot;never&quot;&gt;</div><div>        &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=$2&quot;/&gt;</div>


<div>        &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=$2&quot;/&gt;</div><div>    &lt;/condition&gt;</div><div>    &lt;condition field=&quot;${sip_to_user}&quot; expression=&quot;^(\+1?|\+|1?|011?)(\d+).*$&quot; break=&quot;never&quot;&gt;</div>


<div>      &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=false&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;</div>


<div>      &lt;action application=&quot;set&quot; data=&quot;bypass_media=true&quot;/&gt;</div><div>      &lt;action application=&quot;limit_hash&quot; data=&quot;in cc_blades 4200 !USER_BUSY&quot;/&gt;</div><div>      &lt;action application=&quot;bridge&quot; data=&quot;{sip_invite_domain=${sip_from_host}}sofia/gateway/${distributor(cc_blades)}/$2&quot;/&gt;</div>


<div>    &lt;/condition&gt;</div><div>  &lt;/extension&gt;</div><div>&lt;/include&gt;</div><div><br></div><div>then even though the expression/conditions seem to match, none of the digits are being stripped off. Shouldn&#39;t this be stripping off digits??</div>


<div><br></div><div>Here&#39;s the debug output:</div></div><div><br></div><div><div><div>Dialplan: sofia/external/16469NNNNNN Regex (PASS) [public_did] ani(16469NNNNNN;phone-context=+1) =~ /^(\+?|\+1?|1?)(\d+).*$/ break=never</div>


<div>Dialplan: sofia/external/16469NNNNNN Action set(effective_caller_id_number=16469NNNNNN)</div><div>Dialplan: sofia/external/16469NNNNNN Action set(effective_caller_id_name=16469NNNNNN)</div><div>Dialplan: sofia/external/16469NNNNNN Regex (PASS) [public_did] ${sip_to_user}(011390NNNNNNNNNN;phone-context=+39) =~ /^(\+1?|\+|1?|011?)(\d+).*$/ break=never</div>


<div>Dialplan: sofia/external/16469NNNNNN Action set(continue_on_fail=false)</div><div>Dialplan: sofia/external/16469NNNNNN Action set(hangup_after_bridge=true)</div><div>Dialplan: sofia/external/16469NNNNNN Action set(domain_name=208.72.186.166)</div>


<div>Dialplan: sofia/external/16469NNNNNN Action set(bypass_media=true)</div><div>Dialplan: sofia/external/16469NNNNNN Action limit_hash(in cc_blades 4200 !USER_BUSY)</div><div>Dialplan: sofia/external/16469NNNNNN Action bridge({sip_invite_domain=${sip_from_host}}sofia/gateway/${distributor(cc_blades)}/011390NNNNNNNNNN)</div>


<div><br></div><div>why&#39;re the &#39;1&#39; in the ANI and &#39;011&#39; in the DNIS/sip_to_user being stripped off???</div></div></div></blockquote></div></div><div><br>Regex 101 :)<br><br>The 1 or the 011 are in $1<br>
-MC<br></div>
</div><br>
<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>