[Freeswitch-dev] Fwd: mod_python load error?

Johny Kadarisman jkr888 at gmail.com
Mon Nov 13 10:49:16 EST 2006


Hi all,

I made a few changes in mod_python. Now at least, I can load & execute
simple python scripts. Haven't test much yet, but its execute following
scripts:


========================

import sys
from _freeswitch import *

print "Hello World!\n"
print sys.path
print dir()

fs_consol_log("1", "Hello World from inside mypython.py.\n")

=============================

2006-11-11 00:34:33 [DEBUG] switch_core.c:2497
switch_core_standard_on_execute()
Standard EXECUTE
2006-11-11 00:34:33 [NOTICE] switch_core.c:2506
switch_core_standard_on_execute() Execute
python(/usr/local/freeswitch/mypython.py)
Hello World!

['/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages/HTMLgen',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/PIL',
'/usr/lib/python2.4/site-packages/cairo',
'/usr/lib/python2.4/site-packages/gst- 0.10',
'/usr/lib/python2.4/site-packages/gtk-2.0']
['__builtins__', '__doc__', '__file__', '__name__', 'fs_channel_answer',
'fs_channel_get_variable', 'fs_channel_hangup', 'fs_channel_pre_answer',
'fs_channel_set_state', 'fs_channel_set_variable', 'fs_consol_clean',
'fs_consol_log', 'fs_console_loop', 'fs_core_destroy', 'fs_core_init',
'fs_core_session_locate', 'fs_core_set_globals', 'fs_ivr_play_file',
'fs_ivr_play_file2', 'fs_loadable_module_init',
'fs_loadable_module_shutdown', 'fs_switch_channel_get_variable',
'fs_switch_channel_set_variable', 'fs_switch_ivr_collect_digits_callback',
'fs_switch_ivr_collect_digits_count', 'fs_switch_ivr_originate',
'fs_switch_ivr_record_file', 'fs_switch_ivr_session_transfer',
'fs_switch_ivr_sleep', 'fs_switch_ivr_speak_text', 'sys']
2006-11-11 00:34:33 [DEBUG] switch_swig.c:96 fs_consol_log() Hello World
from inside mypython.py.
2006-11-11 00:34:33 [NOTICE] switch_core.c:2558
switch_core_standard_on_execute() Hangup
sofia/test/ubuntu at 192.168.1.146[CS_EXECUTE] [NORMAL_CLEARING]
2006-11-11 00:34:33 [INFO] switch_channel.c:973
switch_channel_perform_hangup() Kill sofia/test/ubuntu at 192.168.1.146 [1]
2
====================


before committing to the trunk, I would like to make it consistence with
perl implementation. Can some one send me example on how to use fs_*
function in perl scripts. ie, how you pass uuid to perl, how you get
sessions from uuid, etc. I'll try to make it work with python scripts.

JK


---------- Forwarded message ----------
From: Brian West <brian.west at mac.com>
Date: Nov 11, 2006 10:21 PM
Subject: Re: [Freeswitch-dev] mod_python load error?
To: Johny Kadarisman <jkr888 at gmail.com>

Populate the changes into your branch.  Then alert MikeJ on IRC and he can
pull them down.. Infact we can give you commit to the trunk for those
modules if you like.  Get on IRC and talk to xachen, MikeJ and anthm.
/b

On Nov 11, 2006, at 9:15 PM, Johny Kadarisman wrote:

Anyway, thats the progress so far :)
If I like to submit this fixes to the trunk, what is the procedure?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20061113/4945c53c/attachment.html 


More information about the Freeswitch-dev mailing list