[Freeswitch-users] httapi and getting bridge hangup cause

Colin Martin colin at cmtm.co.uk
Wed Jun 11 00:43:11 MSD 2014


Answering myself just in case someone in the future finds it useful.

Although on the first request httapi sends you every variable under the sun, for future requests you have to specifically request which ones you want to know about using the ‘getVariable’ httapi instruction.

From reading the code and also from some experimentation, it also seems that if you request a ‘permanent' variable ‘early’ (i.e. before it has been defined through the normal call processing - so before the hangup in my case) it’s silently ignored, and so you won’t get it returned even after it has been defined.

Thanks,

Colin


On 10 Jun 2014, at 10:51, Colin Martin <colin at cmtm.co.uk> wrote:

> Hi,
> 
> I’m new to Freeswitch, and gradually getting to grips with the httapi application. I’m having trouble getting the hangup cause back after a bridge is complete. I’ve tried Googling around the issue, but I can’t find anything that would explain why this doesn’t work.
> 
> So, the web server initiates the bridge with the following:
> 
> <?xml version="1.0" encoding="UTF-8" standalone="no"?><document type="text/freeswitch-httapi"><work><execute application="set">call_timeout=30</execute><execute application="bridge">sofia/gateway/pbx/200 at destination.com</execute></work></document>
> 
> The call is placed and the bridge works as expected. The called party then hangs up. As expected, the httapi application makes a further request, but only sends a small subset of the query parameters that it would usually send, so I can’t identify the hangup cause.
> 
> I expect one of my assumptions is wrong and this is expected behaviour. What am I doing wrong, and how should I be getting the hangup cause?
> 
> Thanks for any help you can provide!
> 
> Colin Martin
> _________________________________________________________________________
> 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




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list