<div dir="ltr">you're hitting internal before 09<div><br></div><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 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> <condition field="destination_number" experession="^0[0-9]{9}$"></div><div> <action application="bridge" data="sofia/gateway/golden/${<wbr>destination_number}"/></div><div> </condition></div><div> </extension></div><div><br></div><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">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><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/${<wbr>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 class="HOEnZb"><font color="#888888"><div><br></div><div><br></div></font></span></div><span class="HOEnZb"><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>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>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.<wbr>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">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>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>