[Freeswitch-users] dinamically change sip_from_user in the dialplan

Nestor A Diaz nestor at tiendalinux.com
Mon Apr 9 23:03:57 MSD 2012

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"/>

The above works, also if i define a gateway as the following:

<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"/>

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" 

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.


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
Bogota, Colombia

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