<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">




<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Hello from Scotland - and a first question</TITLE>
</HEAD>
<BODY>
<!-- 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>
&nbsp;&nbsp;&nbsp; &lt;extension name=&quot;500&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field=&quot;destination_number&quot; expression=&quot;^500$&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;python&quot; data=&quot;test.py&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<BR>
<BR>
test.py as below (borrowed from WIKI)<BR>
<BR>
from freeswitch import *<BR>
<BR>
def handler(uuid):<BR>
&nbsp;&nbsp;&nbsp; session = PySession(uuid)<BR>
&nbsp;&nbsp;&nbsp; session.answer()<BR>
&nbsp;&nbsp;&nbsp; console_log(&quot;INFO&quot;, &quot;Hello, world\n&quot;)<BR>
&nbsp;&nbsp;&nbsp; session.hangup(&quot;1&quot;)<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() sofia/default/1001@192.168.0.12:5060 State Change CS_RING -&gt; CS_EXECUTE<BR>
2008-01-22 21:46:12 [DEBUG] switch_core_session.c:643 switch_core_session_signal_state_change() Kill sofia/default/1001@192.168.0.12:5060 [BREAK]<BR>
2008-01-22 21:46:12 [DEBUG] switch_core_state_machine.c:413 switch_core_session_run() sofia/default/1001@192.168.0.12:5060 Running State Change CS_EXECUTE<BR>
2008-01-22 21:46:12 [DEBUG] switch_core_state_machine.c:452 switch_core_session_run() (sofia/default/1001@192.168.0.12:5060) State EXECUTE<BR>
2008-01-22 21:46:12 [DEBUG] mod_sofia.c:185 sofia_on_execute() sofia/default/1001@192.168.0.12: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() sofia/default/1001@192.168.0.12: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 sofia/default/1001@192.168.0.12:5060 [CS_EXECUTE] [NORMAL_CLEARING]<BR>
<BR>
This suggests to me that the the dialplan is working correctly and we are trying to execute&nbsp; 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>

</BODY>
</HTML>