Routing for custom user
Hello! I have several users in freeswitch/directory/default (for example 5001, 5002, 5003). Also have several ISP in freeswitch/sip_profiles (isp0, isp1, isp2, isp3). Default routing define in freeswitch/dialplan/default and by default used isp0 for outbound calls. How i can organize outbound calls for user 5001 via isp1 and for user 5002 via isp2? Or user 5001 and 5002 via isp1, but with different A-numbers (aon) Thanks for advice -- Kind regards, Roman
You lots of options, but this is the more traditional: 1. Use the toll_allow option in the dialplan rules. : <extension name="isp1"> <condition field="${toll_allow}" expression="isp1"/> <condition field="destination_number" expression="(^d+$|^or-whatever-your-dialstring-is$)"> <action application="set" data="effective_caller_id_number=${outbound_caller_id}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <action application="bridge" data="sofia/gateway/isp1/$1"/> </condition> </extension> The user will look something like this: <include> <user id="5001"> <params> <param name="password" value="$${default_password}"/> <param name="vm-password" value="5001"/> </params> <variables> <variable name="toll_allow" value="isp1"/> <variable name="accountcode" value="5001"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Extension 5001"/> <variable name="effective_caller_id_number" value="5001"/> <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/> <variable name="outbound_caller_id_number" value="my-fancy-aon-number"/> <variable name="callgroup" value="wombat"/> </variables> </user> </include> 2. For unique caller ID, change it in the user's account as above ^ 3. Alternatively, you can add a condition to check the user's internal caller ID and route based on that: <condition field="effective_caller_id_number" expression="^5001$|^5002$"> Francis On 2014-05-12 16:40, Роман aka iTUX wrote:
Hello!
I have several users in freeswitch/directory/default (for example 5001, 5002, 5003). Also have several ISP in freeswitch/sip_profiles (isp0, isp1, isp2, isp3).
Default routing define in freeswitch/dialplan/default and by default used isp0 for outbound calls.
How i can organize outbound calls for user 5001 via isp1 and for user 5002 via isp2? Or user 5001 and 5002 via isp1, but with different A-numbers (aon)
Thanks for advice -- Kind regards,
Roman
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com [1]
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com [2]
Official FreeSWITCH Sites http://www.freeswitch.org [3] http://wiki.freeswitch.org [4] http://www.cluecon.com [5]
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users [6] UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users [7] http://www.freeswitch.org [3]
Links: ------ [1] http://www.freeswitchsolutions.com [2] http://www.cudatel.com [3] http://www.freeswitch.org [4] http://wiki.freeswitch.org [5] http://www.cluecon.com [6] http://lists.freeswitch.org/mailman/listinfo/freeswitch-users [7] http://lists.freeswitch.org/mailman/options/freeswitch-users
Thanks a lot! It Works! 2014-05-13 2:16 GMT+03:00 Francis <sms@icefire.qza.net.au>:
You lots of options, but this is the more traditional:
1. Use the toll_allow option in the dialplan rules. :
<extension name="isp1"> <condition field="${toll_allow}" expression="isp1"/> <condition field="destination_number" expression= "(^\d+$|^or-whatever-your-dialstring-is$)"> <action application="set" data= "effective_caller_id_number=${outbound_caller_id}"/> <action application="set" data= "effective_caller_id_name=${outbound_caller_id_name}"/> <action application="bridge" data="sofia/gateway/isp1/$1"/> </condition> </extension>
The user will look something like this:
<include> <user id="5001"> <params> <param name="password" value="$${default_password}"/> <param name="vm-password" value="5001"/> </params> <variables> <variable name="toll_allow" value="isp1"/> <variable name="accountcode" value="5001"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Extension 5001"/> <variable name="effective_caller_id_number" value="5001"/> <variable name="outbound_caller_id_name" value= "$${outbound_caller_name}"/> <variable name="outbound_caller_id_number" value= "my-fancy-aon-number"/> <variable name="callgroup" value="wombat"/> </variables> </user> </include>
2. For unique caller ID, change it in the user's account as above ^
3. Alternatively, you can add a condition to check the user's internal caller ID and route based on that:
<condition field="effective_caller_id_number" expression= "^5001$|^5002$"> Francis
On 2014-05-12 16:40, Роман aka iTUX wrote:
Hello!
I have several users in freeswitch/directory/default (for example 5001, 5002, 5003). Also have several ISP in freeswitch/sip_profiles (isp0, isp1, isp2, isp3).
Default routing define in freeswitch/dialplan/default and by default used isp0 for outbound calls.
How i can organize outbound calls for user 5001 via isp1 and for user 5002 via isp2? Or user 5001 and 5002 via isp1, but with different A-numbers (aon)
Thanks for advice
-- Kind regards,
Roman
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Kind regards, Roman
participants (3)
-
Francis
-
Roman
-
Роман aka iTUX