httapi and getting bridge hangup cause
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@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
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@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@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@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
participants (1)
-
Colin Martin