[Freeswitch-users] Questions about api_hangup_hook
Pete Kay
petedao at gmail.com
Sun May 21 10:42:35 UTC 2017
Hi
I tried to pass the session variable to a restful interface but much of the
variable are giving <empty>. Does anyone know how I can pass channel
variable in the curl? If we can't pass all variables, can we past at least
the hangup-cause? I tried the following and it is giving empty:
<action application="set" data="api_hangup_hook=curl::
http://198.130.149.164:8000/test_takt/Records?callerid=${answer_stamp}&answer_time=${duration}&hangup=${destination_number}&hangup2=${answered_time}&sip=${endpoint_disposition}&state=${state}&originate_disposition=${originate_disposition}&hangup_cause=${hangup_cause}&sip_term_status=${sip_term_status}&proto_specific_hangup_cause=${proto_specific_hangup_cause}&variable_sip_term_status=${variable_sip_term_status}&variable_sip_hangup_disposition=${variable_sip_hangup_disposition}&endpoint_disposition=${endpoint_disposition}&variable_endpoint_disposition=${variable_endpoint_disposition}&sip_hangup_disposition=${sip_hangup_disposition}&answer_stamp=${answer_stamp}&answer_epoch=${answer_epoch}&end=${env}
"/>
2017-05-21 12:11:21.619542 [DEBUG] switch_core_state_machine.c:783 Hangup
Command with Session curl(
http://198.130.149.164:8000/test_takt/Records?callerid=&answer_time=&hangup=1000&hangup2=0&sip=EARLY
MEDIA&state=&originate_disposition=&hangup_cause=&sip_term_status=&proto_specific_hangup_cause=&variable_sip_term_status=&variable_sip_hangup_disposition=&endpoint_disposition=EARLY
MEDIA&variable_endpoint_disposition=&sip_hangup_disposition=&answer_stamp=&answer_epoch=&end=):
The other question i have is that I tried to execute two api in the
api_hangup_hook, it does not call the second api. Does anyone know how to
do this or is it possible to do?
<action application="set" data="api_hangup_hook=curl::
http://198.100.149.164:8000/test_takt/Records?callerid=${caller_id} curl::
http://198.100.149.164:8000/test_takt/Records?callerid=${destination_number}
"/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170521/e15e3880/attachment.html>
More information about the FreeSWITCH-users
mailing list