Thanks Mike,<br><br>I try to build freeswitch again with the fresh copy from my branches. the mod_python failed to build on switch_swig_wrap.c. Apparently the switch_swig_wrap.c is different from my previous working copy.
<br><br>I not clear what is the changes, but I comment the part that cause the errors. and it seems like work fine now.<br><br>So, please also update this program (mod_python/switch_swig_wrap.c) to trunk from my branch.<br>
<br>Tx,<br>JK<br><br><div><span class="gmail_quote">On 11/14/06, <b class="gmail_sendername">Michael Jerris</b> <<a href="mailto:mike@jerris.com">mike@jerris.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="blue" lang="EN-US">
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">These changes have now been merged to
trunk, there is a small sample in the scripts dir. Everyone please take a look
and check it out. Thanks Johny.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Mike</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">
<div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="3" width="100%">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Johny Kadarisman
[mailto:<a href="mailto:jkr888@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jkr888@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, November 13, 2006
11:54 AM<span class="q"><br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">freeswitch-dev@lists.freeswitch.org</a><br></span>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-dev] Fwd:
mod_python load error?</span></font></p>
</div><div><span class="e" id="q_10ee71f9cb82bf8d_3">
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi Anthony,<br>
<br>
Yea, I'm still looking at the parameters passing between pythons scripts and
freeswitch code. So I am wondering, how we did it in perl scripts.<br>
<br>
I'll stop by IRC tonight then....<br>
<br>
JK</span></font></p>
<div>
<p><span><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On 11/13/06, <b><span style="font-weight: bold;">Anthony
Minessale</span></b> <<a href="mailto:anthmct@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">anthmct@yahoo.com</a>>
wrote: </span></font></span></p>
<div>
<div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">Hi,</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">The swig code in there builds a binary module against
libfreeswitch.</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">so if you load that module from the embedded python
interpreter you can</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">use those calls from your script to call freeswitch
code.</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">stop by irc if you want some more info.</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"><br>
</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;">Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN:anthony_minessale@hotmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MSN:anthony_minessale@hotmail.com</a><br>
JABBER:<a href="mailto:anthony.minessale@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">irc.freenode.net</a>
#freeswitch</span></font></p>
</div>
<div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"><br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip:888@66.250.68.194" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">sip:888@66.250.68.194</a><br>
iax:guest@66.250.68.194/888<br>
<a href="mailto:googletalk:freeswitch@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">googletalk:freeswitch@gmail.com</a><br>
pstn:712-432-7800</span></font></p>
</div>
<div>
<p style="margin-bottom: 12pt;"><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">----- Original Message ----<br>
From: Johny Kadarisman <<a href="mailto:jkr888@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jkr888@gmail.com</a>><br>
To: <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">freeswitch-dev@lists.freeswitch.org</a><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 </span></font></p>
<div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">_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" onclick="return top.js.OpenExtLink(window,event,this)">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" onclick="return top.js.OpenExtLink(window,event,this)">sofia/test/ubuntu@192.168.1.146
</a>[1]<br>
2<br>
====================<br>
<br>
</span></font></p>
</div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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>From: <b><span style="font-weight: bold;">Brian West</span></b>
<<a href="mailto:brian.west@mac.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> brian.west@mac.com</a>></span><br>
<span>Date: Nov 11, 2006 10:21 PM </span><br>
<span>Subject: Re: [Freeswitch-dev] mod_python load error?</span><br>
<span>To: Johny Kadarisman <<a href="mailto:jkr888@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> jkr888@gmail.com</a>></span></span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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. </span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">/b</span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Nov 11, 2006, at 9:15 PM, Johny Kadarisman wrote:</span></font></p>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br>
</span></font></p>
<p><font color="black" face="Helvetica" size="1"><span style="font-size: 7pt; font-family: Helvetica; color: black;"><span style="font-size-adjust: none; font-stretch: normal; border-spacing: 0px; word-spacing: 0px;">Anyway, thats the progress so far :)
<br>
If I like to submit this fixes to the trunk, what is the procedure?</span></span></font></p>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Freeswitch-dev@lists.freeswitch.org
</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE: <a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.freeswitch.org</a></span></font></p>
</div>
</div>
<p><font face="Courier" size="3"><span style="font-size: 12pt; font-family: Courier;"> </span></font></p>
</div>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Freeswitch-dev@lists.freeswitch.org
</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE: <a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.freeswitch.org</a><br>
<br>
</span></font></p>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</span></div></div>
</div>
</div>
<br>_______________________________________________<br>Freeswitch-dev mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>UNSUBSCRIBE:
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.freeswitch.org" target="_blank">
http://www.freeswitch.org</a><br><br><br></blockquote></div><br>