Look into "continue=true", i think that you need to add it.<br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 29, 2016 at 3:07 PM Vladyslav Zakhozhai <<a href="mailto:v.zakhozhai@gmail.com">v.zakhozhai@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">David, thank you for your answer.<div><br></div><div>I've mentioned that I have no problems with extension is_local_call. It will be matched only if SIP message has custom header X-Exten-Type=internal.</div><div><br></div><div>If SIP message has no this header and To user is 0930000000 it does not match ua_mobile, but ua_local for some reason.</div><div><br></div><div>When I'd remove is_local_call all numeric destinations are matched against ua_local.</div><div><br></div><div>Here is part of FS log:<br><br><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> parsing [internal->echo_test] continue=false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Regex (FAIL) [echo_test] destination_number(0930000000) =~ /^(echo|9999)$/ break=on-false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> parsing [internal->is_internal_call] continue=false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Regex (PASS) [is_internal_call] destination_number(0930000000) =~ /.*/ break=on-false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Regex (FAIL) [is_internal_call] ${sip_h_X-Exten-Type}() =~ /internal/ break=on-false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> parsing [internal->ua_local] continue=false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Regex (PASS) [ua_local] destination_number(0930000000) =~ // break=on-false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Action log(sip_h_X-Exten-Type: ${sip_h_X-Exten-Type}.) </div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Action bridge(sofia/gateway/golden/${destination_number}) </div></div><div><br></div><div>I've removed extension is_local_call and have:</div><div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> parsing [internal->echo_test] continue=false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Regex (FAIL) [echo_test] destination_number(0930000000) =~ /^(echo|9999)$/ break=on-false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> parsing [internal->ua_local] continue=false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Regex (PASS) [ua_local] destination_number(0930000000) =~ // break=on-false</div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Action log(sip_h_X-Exten-Type: ${sip_h_X-Exten-Type}.) </div><div>Dialplan: sofia/internal/<a href="mailto:vlakas@unitrans.tull.pp.ua" target="_blank">vlakas@unitrans.tull.pp.ua</a> Action bridge(sofia/gateway/golden/${destination_number}) </div></div><div><br></div><div>I can't understand why expression in log for ua_local is empty</div><div><br></div><div>Regex (PASS) [ua_local] destination_number(0930000000) =~ // break=on-false<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 29, 2016 at 3:03 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">you're hitting internal before 09<div><br></div><div></div></div><div dir="ltr"><div><div style="font-size:12.8px"> <extension name="is_internal_call"></div><div style="font-size:12.8px"> <condition field="destination_number" expression=".*"/></div><div style="font-size:12.8px"> <condition field="${sip_h_X-Exten-Type}" expression="internal"></div><div style="font-size:12.8px"> Some action</div><div style="font-size:12.8px"> </condition></div><div style="font-size:12.8px"> </extension></div><div style="font-size:12.8px"><span style="font-size:12.8px"><br></span></div></div></div><div dir="ltr"><div><div style="font-size:12.8px"><span style="font-size:12.8px"> <extension name="ua_mobile"></span><br></div><div style="font-size:12.8px"></div></div></div><div dir="ltr"><div><div style="font-size:12.8px"><div> <condition field="destination_number" experession="^0[0-9]{9}$"></div><div> <action application="bridge" data="sofia/gateway/golden/${destination_number}"/></div><div> </condition></div><div> </extension></div><div><br></div></div></div></div><div dir="ltr"><div><div style="font-size:12.8px"><div>try removing "<span style="font-size:12.8px"> <condition field="destination_number" expression=".*"/></span><span style="font-size:12.8px">"</span></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 29, 2016 at 10:41 AM, Vladyslav Zakhozhai <span dir="ltr"><<a href="mailto:v.zakhozhai@gmail.com" target="_blank">v.zakhozhai@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I've mentioned that pattern matching in my dialplan works incorrectly but I can't figure out the main reason.</div><div><br></div><div>For example I have the following dialplan:</div><div><context name="internal"><br></div><div> <extension name="echo_test"></div><div> <condition field="destination_number" expression="^(echo|9999)$"></div><div> Some action</div><div> </condition></div><div> </extension></div><div> <extension name="is_internal_call"></div><div> <condition field="destination_number" expression=".*"/></div><div> <condition field="${sip_h_X-Exten-Type}" expression="internal"></div><div> Some action</div><div> </condition></div><div> </extension></div><div> <extension name="ua_local"></div><div> <condition field="destination_number" experession="^[2-5][0-9]{6}$"></div><div> Some action</div><div> </condition</div><div> </extension></div><div><div> <extension name="ua_mobile"></div><div> <condition field="destination_number" experession="^0[0-9]{9}$"></div><div> <action application="bridge" data="sofia/gateway/golden/${destination_number}"/></div><div> </condition></div><div> </extension></div></div><div></context><br></div><div><br></div><div>1. Call to "echo" - OK (echo_test)</div><div>2. Call to some extension with custom header X-Exten-Type - OK (is_internal_call)</div><div>3. Call to 5930000 - OK (ua_local)</div><div>4. Call to 0930000000 - FAILED to match ua_mobile extension. </div><div><br></div><div>The last call matches ua_local. But why?</div><div><br></div><div>The result of regex dp_tool</div><div><div>freeswitch@vlakas> regex 5930000|^[2-5][0-9]{6}$</div><div>true</div><div>freeswitch@vlakas> regex 0930000000|^[2-5][0-9]{6}$</div><div>false</div></div><div><br></div><div>So, everything is correct. I can't understand why almost everyting goes to ua_local extension.</div><div><br></div><div>I appreciate you help.</div><span><font color="#888888"><div><br></div><div><br></div></font></span></div><span><font color="#888888"><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Best regards,<div>Vladyslav Zakhozhai</div><div>email: <a href="mailto:v.zakhozhai@gmail.com" target="_blank">v.zakhozhai@gmail.com</a></div><div>tel.: <a href="tel:%2B380%2893%29%20757-21-61" value="+380937572161" target="_blank">+380(93) 757-21-61</a></div></div></div>
</font></span><br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Best regards,<div>Vladyslav Zakhozhai</div><div>email: <a href="mailto:v.zakhozhai@gmail.com" target="_blank">v.zakhozhai@gmail.com</a></div><div>tel.: +380(93) 757-21-61</div></div></div>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div>