<div dir="ltr">
<p class="gmail-p1"><span class="gmail-s1">Hi </span></p><p class="gmail-p1">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:<br></p><p class="gmail-p1"><span class="gmail-s1"> <action application="set" data="api_hangup_hook=curl::<a href="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}">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}</a>"/></span></p><p class="gmail-p1"><span class="gmail-s1">
</span></p><p class="gmail-p1"><span class="gmail-s1">2017-05-21 12:11:21.619542 [DEBUG] switch_core_state_machine.c:783 Hangup Command with Session curl(<a href="http://198.130.149.164:8000/test_takt/Records?callerid=&answer_time=&hangup=1000&hangup2=0&sip=EARLY">http://198.130.149.164:8000/test_takt/Records?callerid=&answer_time=&hangup=1000&hangup2=0&sip=EARLY</a> 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=):</span></p><p class="gmail-p1"><span class="gmail-s1">
</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1">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?</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1"><action application="set" data="api_hangup_hook=curl::<a href="http://198.100.149.164:8000/test_takt/Records?callerid=${caller_id}">http://198.100.149.164:8000/test_takt/Records?callerid=${caller_id}</a> curl::<a href="http://198.100.149.164:8000/test_takt/Records?callerid=${destination_number}">http://198.100.149.164:8000/test_takt/Records?callerid=${destination_number}</a>"/></span></p></div>