[Freeswitch-users] make a remote extension call from a particular gateway

Wa Halla wahalla at gmail.com
Sun May 23 01:51:41 PDT 2010


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

<extension name="domestic.uk">
    <condition field="${toll_allow}" expression="domestic"/>
    <condition field="destination_number" expression="^(\d{11})$">
      <action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set"
data="effective_caller_id_name=${outbound_caller_id_name}"/>
      <action application="bridge" data="sofia/gateway/gateway4/$1"/>
    </condition>
  </extension>

<extension name="domestic1008.uk">
    <condition field="${toll_allow}" expression="domestic"/>
    <condition field="sip_auth_username" expression="^(1008)$"/>
    <condition field="destination_number" expression="^(\d{11})$">
      <action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set"
data="effective_caller_id_name=${outbound_caller_id_name}"/>
      <action application="bridge" data="sofia/gateway/gateway1/$1"/>
    </condition>
  </extension>

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

If I switch the gateways in the  domestic.uk extension, all calls go from
gateway1. So it seems the domestic1008.uk never gets executed as true.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100523/a9533fef/attachment.html 


More information about the FreeSWITCH-users mailing list