Setting custom SIP headers on transferring call leg.
Hi ! Apologies if this question has already been answered. I am developing a simple IVR application using JS. The application simply answers the call; does a bunch of stuff. One of the things it does is to transfer the call to an extension. I want to be able to set some custom SIP headers on the "outbound" call leg. I tried using session.setVariable("variable_sip_h_X-My-Header", "my_value"), but don't see the header in the outbound invite. I suspect that this is acting on the session object of the incoming call and not on the outbound. Wanted to know if freeswitch provides this capability and if yes, the semantics for the same when used via JS. Any help would be great. Regards, Venkatesh
The variable should be named sip_h_X-My-Header The variable_ prefix you see in the info app output is to differentiate variables from caller profile fields, but is not part of the variable name. If that fails to work, try using the export app (see the wiki) Sent from my iPad On 4 Jun 2012, at 19:42, Venkatesh <vvenkatar@gmail.com> wrote:
Hi !
Apologies if this question has already been answered. I am developing a simple IVR application using JS. The application simply answers the call; does a bunch of stuff. One of the things it does is to transfer the call to an extension. I want to be able to set some custom SIP headers on the "outbound" call leg. I tried using session.setVariable("variable_sip_h_X-My-Header", "my_value"), but don't see the header in the outbound invite. I suspect that this is acting on the session object of the incoming call and not on the outbound. Wanted to know if freeswitch provides this capability and if yes, the semantics for the same when used via JS. Any help would be great.
Regards, Venkatesh _________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
Thank you very much for your response. I was able to get this working correctly after fixing this in my script.... Venkatesh On Mon, Jun 4, 2012 at 4:09 PM, Steven Ayre <steveayre@gmail.com> wrote:
The variable should be named sip_h_X-My-Header
The variable_ prefix you see in the info app output is to differentiate variables from caller profile fields, but is not part of the variable name.
If that fails to work, try using the export app (see the wiki)
Sent from my iPad
On 4 Jun 2012, at 19:42, Venkatesh <vvenkatar@gmail.com> wrote:
Hi !
Apologies if this question has already been answered. I am developing a simple IVR application using JS. The application simply answers the call; does a bunch of stuff. One of the things it does is to transfer the call to an extension. I want to be able to set some custom SIP headers on the "outbound" call leg. I tried using session.setVariable("variable_sip_h_X-My-Header", "my_value"), but don't see the header in the outbound invite. I suspect that this is acting on the session object of the incoming call and not on the outbound. Wanted to know if freeswitch provides this capability and if yes, the semantics for the same when used via JS. Any help would be great.
Regards, Venkatesh _________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
participants (2)
-
Steven Ayre
-
Venkatesh