<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;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.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Mike<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=3 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Johny Kadarisman
[mailto:jkr888@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, November 13, 2006
11:54 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-dev] Fwd:
mod_python load error?</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>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<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 11/13/06, <b><span style='font-weight:bold'>Anthony
Minessale</span></b> <<a href="mailto:anthmct@yahoo.com" target="_blank">anthmct@yahoo.com</a>>
wrote: </span></font></span><o:p></o:p></p>
<div>
<div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>Hi,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>The swig code in there builds a binary module against
libfreeswitch.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>so if you load that module from the embedded python
interpreter you can<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>use those calls from your script to call freeswitch
code.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>stop by irc if you want some more info.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><br>
<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'>Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN:anthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
JABBER:<a href="mailto:anthony.minessale@gmail.com" target="_blank">
anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
#freeswitch<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip:888@66.250.68.194" target="_blank">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">googletalk:freeswitch@gmail.com</a><br>
pstn:712-432-7800<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 face=Courier><span
style='font-size:12.0pt;font-family:Courier'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>----- Original Message ----<br>
From: Johny Kadarisman <<a href="mailto:jkr888@gmail.com" target="_blank">
jkr888@gmail.com</a>><br>
To: <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank">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 <o:p></o:p></span></font></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>_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">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">sofia/test/ubuntu@192.168.1.146
</a>[1]<br>
2<br>
====================<br>
<br>
<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>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=gmailquote>From: <b><span style='font-weight:bold'>Brian West</span></b>
<<a href="mailto:brian.west@mac.com" target="_blank"> brian.west@mac.com</a>></span><br>
<span class=gmailquote>Date: Nov 11, 2006 10:21 PM </span><br>
<span class=gmailquote>Subject: Re: [Freeswitch-dev] mod_python load error?</span><br>
<span class=gmailquote>To: Johny Kadarisman <<a
href="mailto:jkr888@gmail.com" target="_blank"> jkr888@gmail.com</a>></span><o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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. <o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>/b<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Nov 11, 2006, at 9:15 PM, Johny Kadarisman wrote:<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=black face=Helvetica><span
style='font-size:7.0pt;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><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org
</a><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><o:p></o:p></span></font></p>
</div>
</div>
<p class=MsoNormal><font size=3 face=Courier><span style='font-size:12.0pt;
font-family:Courier'><o:p> </o:p></span></font></p>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org
</a><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><br>
<br>
<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
</body>
</html>