Link an incoming call to gateway
Hi, We have multiple gateway registration with internal profile for inbound calls. These registrations could be with same IP address but different extensions/users. In our public dial plan, we need to link an incoming call with the gateway and transfer it to different destination based on which gateway call came over. We tried setting channel variables in gateway but cannot access them in dial plan. They are always empty. Is there a way to achieve this? Sample gateway file <include> <gateway name=gw1> <param name="username" value="xxxxx"/> <param name=realm" value="xxx"/> <param name="from-user" value="1001"/> <param name=register" value="true"/> <variables> <variable name="curGateway" value="gw1"/> <variables> </gateway> <gateway name=gw2> <param name="username" value="xxxxx"/> <param name=realm" value="xxx"/> <param name="from-user" value="1002"/> <param name=register" value="true"/> <variables> <variable name="curGateway" value="gw2"/> <variables> </gateway> </include> ${curGateway} is always empty in dialplan. Thanks, Varsha
if you don't have extension-in-contact set, the gateway will register with a gw+gatewayname prefix in the contact so it can resolve the calls back to the gateway. On Tue, Feb 7, 2017 at 4:14 PM, Varsha Agarwal <vagarwal@vertical.com> wrote:
Hi,
We have multiple gateway registration with internal profile for inbound calls. These registrations could be with same IP address but different extensions/users. In our public dial plan, we need to link an incoming call with the gateway and transfer it to different destination based on which gateway call came over. We tried setting channel variables in gateway but cannot access them in dial plan. They are always empty. Is there a way to achieve this? Sample gateway file
<include>
<gateway name=*gw1*>
<param name="username" value="xxxxx"/>
<param name=realm" value="xxx"/>
<param name="from-user" value="*1001*"/>
<param name=register" value="true"/>
<variables>
<variable name="curGateway" value="*gw1*"/>
<variables>
</gateway>
<gateway name=gw2>
<param name="username" value="xxxxx"/>
<param name=realm" value="xxx"/>
<param name="from-user" value="*1002*"/>
<param name=register" value="true"/>
<variables>
<variable name="curGateway" value="*gw2*"/>
<variables>
</gateway>
</include>
${curGateway} is always empty in dialplan.
Thanks,
Varsha
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
I do have that set. I will try removing it. My call manager seem to not like register request without extension in contact. Can you please explain more how can I get gateway name in dial plan ? On Feb 7, 2017, at 4:21 PM, Anthony Minessale <anthony.minessale@gmail.com<mailto:anthony.minessale@gmail.com>> wrote: if you don't have extension-in-contact set, the gateway will register with a gw+gatewayname prefix in the contact so it can resolve the calls back to the gateway. On Tue, Feb 7, 2017 at 4:14 PM, Varsha Agarwal <vagarwal@vertical.com<mailto:vagarwal@vertical.com>> wrote: Hi, We have multiple gateway registration with internal profile for inbound calls. These registrations could be with same IP address but different extensions/users. In our public dial plan, we need to link an incoming call with the gateway and transfer it to different destination based on which gateway call came over. We tried setting channel variables in gateway but cannot access them in dial plan. They are always empty. Is there a way to achieve this? Sample gateway file <include> <gateway name=gw1> <param name="username" value="xxxxx"/> <param name=realm" value="xxx"/> <param name="from-user" value="1001"/> <param name=register" value="true"/> <variables> <variable name="curGateway" value="gw1"/> <variables> </gateway> <gateway name=gw2> <param name="username" value="xxxxx"/> <param name=realm" value="xxx"/> <param name="from-user" value="1002"/> <param name=register" value="true"/> <variables> <variable name="curGateway" value="gw2"/> <variables> </gateway> </include> ${curGateway} is always empty in dialplan. Thanks, Varsha _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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 -- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net<http://irc.freenode.net> #freeswitch ☞ http://freeswitch.org/g+ ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org<mailto:sip%3A888@conference.freeswitch.org> ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org
participants (2)
-
Anthony Minessale
-
Varsha Agarwal