[Freeswitch-users] Access to sip_history_info from python

Gabriel Gunderson gabe at gundy.org
Tue Nov 8 10:58:11 MSK 2011


On Tue, Nov 1, 2011 at 4:28 AM, John O'Brien <john at whitesmiths.com> wrote:
> I have written a python script that processes calls that are diverted to it.
> Its sort of a messaging system that triggers some other python processes that run outside of mod_python.


John,

Welcome to FreeSWITCH!

If this is an app that runs outside of FS and you just need to trigger
that code, I think Event Socket would be a much better fit.
http://wiki.freeswitch.org/wiki/Event_Socket

You'll be able to listen for nearly any type of even that you can think of:
http://wiki.freeswitch.org/wiki/Event_List

If you're comfortable with Twisted, there are several modules out
there to get you going; I like this one [well, we did write it].
https://parseltone.org/browser/trunk/parseltone/eventsocket

The Parseltone code base is still taking shape, but it's used to
process 1000's of calls everyday. Checking the wiki and Google will
yield other options too.


> I want to from within the mod_python executed python code have access to the SIP header field History-Info.
> I can use this to help in determining how the call ended up been processed by my python code.

While you'll be able to get access to this header in the events, I'd
consider making use of channel variables to track the path calls have
taken.


Good luck and happy hacking.


Gabe



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list