[Freeswitch-users] dinamically change sip_from_user in the dialplan

Brian Foster bdfoster at endigotech.com
Tue Apr 10 00:57:26 MSD 2012


Also use the dialplan application "set" to set that before you do the
actual bridge not with the bridge (personal preference).
On Apr 9, 2012 4:55 PM, "Brian Foster" <bdfoster at endigotech.com> wrote:

> When you set the variable or param in the gateway configuration it
> overrides variables set elsewhere in the call. Try removing the variable in
> the gateway configuration and setting that in the dialplan before bridging
> the call.
>
> -BDF
> On Apr 9, 2012 3:05 PM, "Nestor A Diaz" <nestor at tiendalinux.com> wrote:
>
>> Hi Guys,
>>
>> I want to know if is possible to change the sip_from_user at the dialplan.
>>
>> My current pstn sip provider needs the caller id to be set to one of the
>> numbers assigned to me, this way i can place the call using the
>> following options at the dialplan:
>>
>> <extension name="local">
>> <condition field="${toll_allow}" expression="local"/>
>> <condition field="destination_number" expression="^9(\d{7})$">
>> <action application="set" data="effective_caller_id_number=12345678"/>
>> <action application="bridge" data="sofia/profile/$1 at sipprovider.com"/>
>> </condition>
>> </extension>
>>
>> The above works, also if i define a gateway as the following:
>>
>> <include>
>> <gateway name="myprovider">
>> <param name="from-user" value="12345678"/>
>> <param name="proxy" value="sipprovider.com"/>
>> <param name="register" value="false"/>
>> <param name="ping" value="25"/>
>> </gateway>
>> </include>
>>
>> and place the call using:
>>
>> <action application="bridge" data="sofia/gateway/myprovider/$1"/>
>>
>> the above woks too, but i am tied to the from_user i have defined.
>>
>> So i wanted to use be able to change the from_user dinamically according
>> to my needs at the dialplan level, is that possible ? i have tried the
>> following but it doesn't work
>>
>> <action application="bridge"
>> data="{sip_from_user=12345678}sofia/gateway/myprovider/$1"/>
>>
>> Any suggestions ? or is not possible to define a gateway and change some
>> of its parameters in the dialplan ? i just want to use the ping
>> functionality and have something more organized.
>>
>> Slds.
>>
>> --
>> Nestor A. Diaz
>> Ingeniero de Sistemas
>> Tel. +57 1-485-3020 x 211
>> Cel. +57 316-227-3593
>> Tel. SIP: sip:211 at tiendalinux.com
>> Email/MSN: nestor at tiendalinux.com
>> http://www.tiendalinux.com/
>> Bogota, Colombia
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> 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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120409/bef867ac/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list