dinamically change sip_from_user in the dialplan
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@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@tiendalinux.com Email/MSN: nestor@tiendalinux.com http://www.tiendalinux.com/ Bogota, Colombia
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@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@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@tiendalinux.com Email/MSN: nestor@tiendalinux.com http://www.tiendalinux.com/ Bogota, Colombia
_________________________________________________________________________ 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
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@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@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@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@tiendalinux.com Email/MSN: nestor@tiendalinux.com http://www.tiendalinux.com/ Bogota, Colombia
_________________________________________________________________________ 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
Hi, the problem was solved, the question have been already answered by someone on this list, the solution is to put: + <param name="caller-id-in-from" value="true"/> in the gateway profile. Slds. -- Nestor A. Diaz Ingeniero de Sistemas Tel. +57 1-485-3020 x 211 Cel. +57 316-227-3593 Tel. SIP: sip:211@tiendalinux.com Email/MSN: nestor@tiendalinux.com http://www.tiendalinux.com/ Bogota, Colombia On 04/09/2012 02:03 PM, Nestor A Diaz 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@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.
participants (2)
-
Brian Foster
-
Nestor A Diaz