Access to sip_history_info from python
Hi, I'm a freeswitch newbie. 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. 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. The sofia variable sip_history_info is what I need access to but I'm at a loss to figure out how I can get to it from python. If I could get the entire SIP header I can probably parse that to extract the History-Info. Your help would be appreciated. Regards, John
On Tue, Nov 1, 2011 at 4:28 AM, John O'Brien <john@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
participants (2)
-
Gabriel Gunderson
-
John O'Brien