<div dir="ltr">Hi, <div><br></div><div>Have you tried something like:</div><div><br></div><div>[...]</div><div><div>            &lt;action application=&quot;set&quot; data=&quot;session_in_hangup_hook=true&quot;/&gt;</div><div>            &lt;action application=&quot;set&quot; data=&quot;api_hangup_hook=python script_name&quot;/&gt;</div></div><div>[...]</div><div><br></div><div><br></div><div>??</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 9:20 AM, Trever L. Adams <span dir="ltr">&lt;<a href="mailto:trever@middleearth.sapphiresunday.org" target="_blank">trever@middleearth.sapphiresunday.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am working on adding functionality to an external project that already<br>
supports Asterisk. I have used hook events with lua to capture call data<br>
on hangup and hangup complete before. Unfortunately, I need<br>
authenticated json rpc or xmlrpc. The original code I am working from is<br>
also in Python. Lua xml and json rpc modules do not seem to do<br>
authenticated requests. Since I already have Python, it seems to be easier.<br>
<br>
<a href="https://wiki.freeswitch.org/wiki/Mod_python#Hangup_hook_.2B_SQLAlchemy_crashes_switch" rel="noreferrer" target="_blank">https://wiki.freeswitch.org/wiki/Mod_python#Hangup_hook_.2B_SQLAlchemy_crashes_switch</a>,<br>
it says that hangup hooks are very buggy and should be avoided. Is this<br>
still the case in the last year or so (recent versions)? If so, what is<br>
the best way to do this? If not, can someone post a simple equivalent of<br>
event:getHeader in a simple handler for hangups so that I can start<br>
working on this?<br>
<br>
Do I use def fsapi(session, stream, env, args) or def handler(session,<br>
args)?<br>
<br>
Thank you for help getting started,<br>
<br>
Trever<br>
<br>
<br>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>