B. I have setup a few sip trunks. Now how do i set them up so that if i dial 01192 that call goes to gateway A and if i dial 1XXX then that call goes to gateway B

Handle each in a different extension in the dialplan:

<extension name="route1">
   <condition field="destination_number" expression="^(01192)$">
      <action application="bridge" data="sofia/gateway/gatewaya/$1"/>
   </condition>
</extension>
<extension name="route2">
   <condition field="destination_number" expression="^(1\d\d\d)$">
      <action application="bridge" data="sofia/gateway/gatewayb/$1"/>
   </condition>
</extension>

Adjust the expressions to suit the numbers you want to handle better. The contents of the () brackets are placed in variable $1, which is being used in the bridge to dial that number via the gateway. You can add prefixes etc there if you need them. ^ and $ match the start and end of the string, not actual characters. They're called regular expressions if you want to read up on them, and are more flexible than just matching absolute strings because you match patterns instead.

An example of changing a prefix, should your gateway need that (for example converting a local number to an international prefix):
   <condition field="destination_number" expression="^0(1192)$">
      <action application="bridge" data="sofia/gateway/gatewaya/44$1"/>
   </condition>
01192 would be dialed as 441192 through gateway a.

-Steve


 

On 20 February 2011 16:08, Hareem Haque <hareem.haque@gmail.com> wrote:
Thank you very much for helping me out with the initial switch setup. I really appreciate it. However, I am stuck with the cdr and call routing patterns setup. 


A. I have attached my cdr_csv file and its cdr log file. As you may see in the conf xml that i have 22 items that i need posted onto my cdr logs. However, the csv file only shows 15 items. How can i make this work

B. I have setup a few sip trunks. Now how do i set them up so that if i dial 01192 that call goes to gateway A and if i dial 1XXX then that call goes to gateway B

Many thanks for all the help. I really appreciate it

Best Regards
Hareem. Haque



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org