<div dir="ltr">you&#39;re hitting internal before  09<div><br></div><div><div style="font-size:12.8px"> &lt;extension name=&quot;is_internal_call&quot;&gt;</div><div style="font-size:12.8px">        &lt;condition field=&quot;destination_number&quot; expression=&quot;.*&quot;/&gt;</div><div style="font-size:12.8px">        &lt;condition field=&quot;${sip_h_X-Exten-Type}&quot; expression=&quot;internal&quot;&gt;</div><div style="font-size:12.8px">              Some action</div><div style="font-size:12.8px">         &lt;/condition&gt;</div><div style="font-size:12.8px">    &lt;/extension&gt;</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">    &lt;extension name=&quot;ua_mobile&quot;&gt;</span><br></div><div style="font-size:12.8px"><div>        &lt;condition field=&quot;destination_number&quot; experession=&quot;^0[0-9]{9}$&quot;&gt;</div><div>            &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/golden/${<wbr>destination_number}&quot;/&gt;</div><div>        &lt;/condition&gt;</div><div>    &lt;/extension&gt;</div><div><br></div><div>try removing &quot;<span style="font-size:12.8px">        &lt;condition field=&quot;destination_number&quot; expression=&quot;.*&quot;/&gt;</span><span style="font-size:12.8px">&quot;</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">&lt;<a href="mailto:v.zakhozhai@gmail.com" target="_blank">v.zakhozhai@gmail.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 dir="ltr">Hi,<div><br></div><div>I&#39;ve mentioned that pattern matching in my dialplan works incorrectly but I can&#39;t figure out the main reason.</div><div><br></div><div>For example I have the following dialplan:</div><div>&lt;context name=&quot;internal&quot;&gt;<br></div><div>    &lt;extension name=&quot;echo_test&quot;&gt;</div><div>        &lt;condition field=&quot;destination_number&quot; expression=&quot;^(echo|9999)$&quot;&gt;</div><div>             Some action</div><div>        &lt;/condition&gt;</div><div>    &lt;/extension&gt;</div><div>    &lt;extension name=&quot;is_internal_call&quot;&gt;</div><div>        &lt;condition field=&quot;destination_number&quot; expression=&quot;.*&quot;/&gt;</div><div>        &lt;condition field=&quot;${sip_h_X-Exten-Type}&quot; expression=&quot;internal&quot;&gt;</div><div>              Some action</div><div>         &lt;/condition&gt;</div><div>    &lt;/extension&gt;</div><div>    &lt;extension name=&quot;ua_local&quot;&gt;</div><div>        &lt;condition field=&quot;destination_number&quot; experession=&quot;^[2-5][0-9]{6}$&quot;&gt;</div><div>            Some action</div><div>         &lt;/condition</div><div>    &lt;/extension&gt;</div><div><div>    &lt;extension name=&quot;ua_mobile&quot;&gt;</div><div>        &lt;condition field=&quot;destination_number&quot; experession=&quot;^0[0-9]{9}$&quot;&gt;</div><div>            &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/golden/${<wbr>destination_number}&quot;/&gt;</div><div>        &lt;/condition&gt;</div><div>    &lt;/extension&gt;</div></div><div>&lt;/context&gt;<br></div><div><br></div><div>1. Call to &quot;echo&quot; - 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&gt; regex 5930000|^[2-5][0-9]{6}$</div><div>true</div><div>freeswitch@vlakas&gt; regex 0930000000|^[2-5][0-9]{6}$</div><div>false</div></div><div><br></div><div>So, everything is correct. I can&#39;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>