<div>hello,</div>that is becuase the first extension that appears on the dialplan gets parsed first, put the <a href="http://domestic1008.uk">domestic1008.uk</a> one first then the other one.<br><br><div><br><div class="gmail_quote">
2010/5/23 Wa Halla <span dir="ltr">&lt;<a href="mailto:wahalla@gmail.com">wahalla@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have a branch office that I want to call from a particular gateway. The branch is on extension 1008. With the dialplan below any extension uses gateway4 even extension 1008<br>
<br>&lt;extension name=&quot;<a href="http://domestic.uk" target="_blank">domestic.uk</a>&quot;&gt;<br>
    &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;domestic&quot;/&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{11})$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>

      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>      &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gateway4/$1&quot;/&gt;<br>

    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br>&lt;extension name=&quot;<a href="http://domestic1008.uk" target="_blank">domestic1008.uk</a>&quot;&gt;<br>    &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;domestic&quot;/&gt;<br>

    &lt;condition field=&quot;sip_auth_username&quot; expression=&quot;^(1008)$&quot;/&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{11})$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>

      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>      &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gateway1/$1&quot;/&gt;<br>

    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br>Any suggestions of what I am doing wrong. I have tried &lt;condition field=&quot;sip_auth_username&quot; expression=&quot;^(1008)$&quot;/&gt; with and &lt;condition field=&quot;sip_auth_username&quot; expression=&quot;^1008$&quot;/&gt; without the brackets so have elimated that.<br>

<br>If I switch the gateways in the  <a href="http://domestic.uk" target="_blank">domestic.uk</a> extension, all calls go from gateway1. So it seems the <a href="http://domestic1008.uk" target="_blank">domestic1008.uk</a> never gets executed as true.<br>

<div style="display:inline"></div>
<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>