Hi Trever, I'd love to try and help you with this, but I don't understand completely your use case, can you give a little more details on what the issue is and what exactly you need. We use lua and python in hangup hooks and so far no issues. Joel. On Mon, Aug 15, 2016 at 2:19 AM, Trever L. Adams < trever@middleearth.sapphiresunday.org> wrote:
Thank you Joel. I was looking at that wondering if that would be the correct way. Some variables available in the lua event hooks are not available this way and vice versa. I am having some difficulty as each presents its own problems. What I hope for is to use the api_hangup_hook with lua. The problem that remains is that on outbound calls things get messed up if the internal user transfers to another internal user. (I need the call direction to be accurate or have a way to detect when I should flip it.)
Trever
On 08/01/2016 10:46 AM, Joel Serrano wrote:
Hi,
Have you tried something like:
[...] <action application="set" data="session_in_hangup_hook=true"/> <action application="set" data="api_hangup_hook=python script_name"/> [...]
??
On Mon, Aug 1, 2016 at 9:20 AM, Trever L. Adams <trever@middleearth. sapphiresunday.org> wrote:
I am working on adding functionality to an external project that already supports Asterisk. I have used hook events with lua to capture call data on hangup and hangup complete before. Unfortunately, I need authenticated json rpc or xmlrpc. The original code I am working from is also in Python. Lua xml and json rpc modules do not seem to do authenticated requests. Since I already have Python, it seems to be easier.
https://wiki.freeswitch.org/wiki/Mod_python#Hangup_hook_. 2B_SQLAlchemy_crashes_switch, it says that hangup hooks are very buggy and should be avoided. Is this still the case in the last year or so (recent versions)? If so, what is the best way to do this? If not, can someone post a simple equivalent of event:getHeader in a simple handler for hangups so that I can start working on this?
Do I use def fsapi(session, stream, env, args) or def handler(session, args)?
Thank you for help getting started,
Trever
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon....
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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