<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier, monaco, monospace, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>The swig code in there builds a binary module against libfreeswitch.</DIV>
<DIV>so if you load that module from the embedded python interpreter you can</DIV>
<DIV>use those calls from your script to call freeswitch code.</DIV>
<DIV> </DIV>
<DIV>stop by irc if you want some more info.</DIV>
<DIV><BR> </DIV>
<DIV>Anthony Minessale II<BR><BR>FreeSWITCH http://www.freeswitch.org/<BR>ClueCon http://www.cluecon.com/<BR><BR>AIM: anthm<BR>MSN:anthony_minessale@hotmail.com<BR>JABBER:anthony.minessale@gmail.com<BR>IRC: irc.freenode.net #freeswitch</DIV>
<DIV><BR>FreeSWITCH Developer Conference<BR>sip:888@66.250.68.194<BR>iax:guest@66.250.68.194/888<BR>googletalk:freeswitch@gmail.com<BR>pstn:712-432-7800</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: courier, monaco, monospace, sans-serif"><BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Johny Kadarisman <jkr888@gmail.com><BR>To: freeswitch-dev@lists.freeswitch.org<BR>Sent: Monday, November 13, 2006 9:49:16 AM<BR>Subject: [Freeswitch-dev] Fwd: mod_python load error?<BR><BR>Hi all, <BR><BR>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:<BR><BR><BR>========================<BR><BR>import sys <BR>from _freeswitch import *<BR><BR>print "Hello World!\n"<BR>print sys.path<BR>print dir()<BR><BR>fs_consol_log("1", "Hello World from inside mypython.py.\n")<BR><BR>============================= <BR><BR>2006-11-11 00:34:33 [DEBUG] switch_core.c:2497 switch_core_standard_on
<DIV id=mb_5>_execute() Standard EXECUTE<BR>2006-11-11 00:34:33 [NOTICE] switch_core.c:2506 switch_core_standard_on_execute() Execute python(/usr/local/freeswitch/mypython.py) <BR>Hello World!<BR><BR>['/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']<BR>['__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'] <BR>2006-11-11 00:34:33 [DEBUG] switch_swig.c:96 fs_consol_log() Hello World from inside mypython.py.<BR>2006-11-11 00:34:33 [NOTICE] switch_core.c:2558 switch_core_standard_on_execute() Hangup <A href="mailto:sofia/test/ubuntu@192.168.1.146" target=_blank rel=nofollow>sofia/test/ubuntu@192.168.1.146</A> [CS_EXECUTE] [NORMAL_CLEARING]<BR>2006-11-11 00:34:33 [INFO] switch_channel.c:973 switch_channel_perform_hangup() Kill <A href="mailto:sofia/test/ubuntu@192.168.1.146" target=_blank rel=nofollow>sofia/test/ubuntu@192.168.1.146
</A>[1]<BR>2<BR>====================<BR><BR><BR></DIV>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. <BR><BR>JK<BR><BR><BR>---------- Forwarded message ----------<BR><SPAN class=gmail_quote>From: <B class=gmail_sendername>Brian West</B> <<A href="mailto:brian.west@mac.com" target=_blank rel=nofollow>brian.west@mac.com</A>><BR>Date: Nov 11, 2006 10:21 PM <BR>Subject: Re: [Freeswitch-dev] mod_python load error?<BR>To: Johny Kadarisman <<A href="mailto:jkr888@gmail.com" target=_blank rel=nofollow>jkr888@gmail.com</A>><BR><BR></SPAN>
<DIV>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.
<DIV><BR></DIV>
<DIV>/b</DIV><SPAN class=q>
<DIV><BR></DIV>
<DIV>
<DIV>
<DIV>On Nov 11, 2006, at 9:15 PM, Johny Kadarisman wrote:</DIV><BR>
<BLOCKQUOTE type="cite"><SPAN style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px">Anyway, thats the progress so far :)<BR>If I like to submit this fixes to the trunk, what is the procedure?</SPAN></BLOCKQUOTE></DIV><BR></DIV></SPAN></DIV>
<DIV>_______________________________________________<BR>Freeswitch-dev mailing list<BR>Freeswitch-dev@lists.freeswitch.org<BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-dev</A><BR><A href="http://www.freeswitch.org/" target=_blank>http://www.freeswitch.org</A></DIV></DIV><BR></DIV></div><br></body></html>