[Freeswitch-users] Routing for custom user

Francis sms at icefire.qza.net.au
Tue May 13 03:16:37 MSD 2014


 

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 at freeswitch.org
> http://www.freeswitchsolutions.com [1]
> 
> 
>  [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 at 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] 
[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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140513/555ae34b/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list