<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I can't comment much on the python issue, will leave that to others, but I can say that the most mature embedded language we have is javascript. If your are having issues with python and are comfortable with javascript, it may work better for you.<div><br class="webkit-block-placeholder"></div><div>Mike</div><div><br><div><div>On Jan 24, 2008, at 8:06 AM, Steven Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> <!-- Converted from text/plain format --><p><font size="2">Hi,<br> <br> I've previously had a lot of Windows based SIP/IVR expreience with a variety of technologies but am now looking at alternative architectures for some forthcoming projects so have been doing some evaluation on platforms for producing some IVR type solutions initially for inhouse hosting but longer term to scale possibly on Amazon EC2.<br> <br> I'm also interested in contributing to the project if I settle on Freeswitch.<br> <br> Initially speed of development / application tuning for new proof of concepts is critical and the combination of Freeswitch / Python seems to fit the bill (not withstanding my lack of significant experience with either)<br> <br> To test this out I have set up a box running CentOS 5, built Freeswitch (with mod python) and configured the switch.<br> <br> Freeswitch works great for SIP calls between wifi handsets, so far so good and a very painless set up, impressive !<br> <br> Dialplan is modified as below,<br> <br> <br> <extension name="500"><br> <condition field="destination_number" expression="^500$"><br> <action application="python" data="test.py"/><br> </condition><br> </extension><br> <br> test.py as below (borrowed from WIKI)<br> <br> from freeswitch import *<br> <br> def handler(uuid):<br> session = PySession(uuid)<br> session.answer()<br> console_log("INFO", "Hello, world\n")<br> session.hangup("1")<br> <br> is in python2.5/site-packages as is freeswitch.py<br> <br> however an incoming call to 500 generates the following<br> <br> 2008-01-22 21:46:12 [DEBUG] mod_dialplan_xml.c:273 dialplan_hunt() <a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060 State Change CS_RING -> CS_EXECUTE<br> 2008-01-22 21:46:12 [DEBUG] switch_core_session.c:643 switch_core_session_signal_state_change() Kill <a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060 [BREAK]<br> 2008-01-22 21:46:12 [DEBUG] switch_core_state_machine.c:413 switch_core_session_run() <a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060 Running State Change CS_EXECUTE<br> 2008-01-22 21:46:12 [DEBUG] switch_core_state_machine.c:452 switch_core_session_run() (<a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060) State EXECUTE<br> 2008-01-22 21:46:12 [DEBUG] mod_sofia.c:185 sofia_on_execute() <a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060 SOFIA EXECUTE<br> 2008-01-22 21:46:12 [DEBUG] switch_core_state_machine.c:130 switch_core_standard_on_execute() Standard EXECUTE<br> 2008-01-22 21:46:12 [DEBUG] switch_core_state_machine.c:144 switch_core_standard_on_execute() <a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060 Execute python(test.py)<br> 2008-01-22 21:46:12 [NOTICE] mod_python.c:86 eval_some_python() Invoking py module: test.py<br> 2008-01-22 21:46:12 [ERR] mod_python.c:106 eval_some_python() Error importing module<br> 2008-01-22 21:46:12 [DEBUG] mod_python.c:180 eval_some_python() Threadstate mod_python.c swap-out!<br> 2008-01-22 21:46:12 [NOTICE] switch_core_state_machine.c:201 switch_core_standard_on_execute() Hangup <a href="mailto:sofia/default/1001@192.168.0.12">sofia/default/1001@192.168.0.12</a>:5060 [CS_EXECUTE] [NORMAL_CLEARING]<br> <br> This suggests to me that the the dialplan is working correctly and we are trying to execute test.py, which from playing with file names I am fairly happy it is finding test.py , but beyond that I'm pretty well stuck for tonight.<br> <br> Any one got any thoughts as to where I might be going wrong.<br> <br> Many Thanks<br> <br> Steve<br> <br> <br> <br> <br> </font> </p> </div> _______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>