<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">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<br></blockquote><div><br>Handle each in a different extension in the dialplan:<br><br><extension name="route1"><br> <condition field="destination_number" expression="^(01192)$"><br>
<action application="bridge" data="sofia/gateway/gatewaya/$1"/><br>
</condition><br>
</extension><br>
<extension name="route2"><br> <condition field="destination_number" expression="^(1\d\d\d)$"><br> <action application="bridge" data="sofia/gateway/gatewayb/$1"/><br>
</condition><br>
</extension><br>
<br>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.<br>
<br>An example of changing a prefix, should your gateway need that (for example converting a local number to an international prefix):<br> <condition field="destination_number" expression="^0(1192)$"><br>
<action application="bridge" data="sofia/gateway/gatewaya/44$1"/><br>
</condition><br>01192 would be dialed as 441192 through gateway a.<br><br>-Steve<br><br><br> </div><br><div class="gmail_quote">On 20 February 2011 16:08, Hareem Haque <span dir="ltr"><<a href="mailto:hareem.haque@gmail.com">hareem.haque@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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. <div>
<br></div><div><br></div><div>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</div>
<div><br></div><div>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</div><div><br></div><div>Many thanks for all the help. I really appreciate it</div>
<div><br clear="all">Best Regards<br>Hareem. Haque<br><br><br>
</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 style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>