[Freeswitch-users] Hangup hooks in Python

Joel Serrano joel at gogii.net
Mon Aug 1 20:46:39 MSD 2016


Have you tried something like:

            <action application="set" data="session_in_hangup_hook=true"/>
            <action application="set" data="api_hangup_hook=python


On Mon, Aug 1, 2016 at 9:20 AM, Trever L. Adams <
trever at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160801/b0fcc213/attachment-0001.html 

Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list