[Freeswitch-users] Account selection

Seven Du dujinfang at gmail.com
Mon Aug 23 17:13:45 PDT 2010


Mathieu,

It is very good but it's not the right answer to the question. Ken
asked "Is there any way to do this without having to use Dial plans?"
;)

On Tue, Aug 24, 2010 at 7:52 AM, Mathieu Rene <mrene_lists at avgs.ca> wrote:
> Hi,
>
> You can set the current account using the "set_user" dialplan application.
>
> You could define a list of prefixes to select which account you use when dialing outbound.
>
> For example:
>
> <user id="phone_user">
>  <variables>
>  <variable name="line_1" value="alice@$${domain}" />
>  <variable name="line_2" value="bob@$${domain}" />
>  </variables>
> </user>
>
> And then in your dialplan
> <extension name="line_select">
>  <!-- Note: we use \w+ here for security, dont use .* -->
>  <condition field="destination_number" expression="^8(\d)(\w+?)$">
>   <action application="set_user" data="${line_$1}' />
>   <action application="transfer" data="$2 XML default" />
>  </condition>
> </extension>
>
> Once set_user runs, it loads in everything from the user directory, like if the call came from that user.
> You can now dial 81[number] to dial the number using the phone's line 1, etc.
>
> This is a good example of how one can be creative in their ways of configuring freeswitch :)
>
> Mathieu Rene
> Avant-Garde Solutions Inc
> Office: + 1 (514) 664-1044 x100
> Cell: +1 (514) 664-1044 x200
> mrene at avgs.ca
>
>
>
>
> On 2010-08-23, at 3:57 AM, Ken Gillett wrote:
>
>> If one wishes to have use of several VOIP 'lines', but with no PBX, you need to register all those SIP accounts with the client (softphone etc). You should then be informed which account is receiving a call and can pick a particular account from which to make calls. Once a PBX is in use, you can register the client as a single extension of the PBX and direct calls as appropriate to that extension - I assume with the correct caller ID and incoming account information passed to the recipient so they know as much as in the 'no PBX' configuration.
>>
>> But what about outgoing calls. In this scenario, registered as a single extension, how would it be possible to pick the outgoing 'line' (i.e. account) to use? Would it have to be done by dialling a prefix or is there another way? Is it client dependent?
>>
>>
>> Ken G i l l e t t
>>
>> _/_/_/_/_/_/_/_/
>>
>>
>>
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn



More information about the FreeSWITCH-users mailing list