Hi there,<br><br>Here is my problem:<br>I'd like to set up a switchboard. I'm using python scripts called when a call is coming. Here is my public.xml:<br><br><b><extension name="toto"><br> <condition field="destination_number" expression="[0-9]*"><br>
<action application="python" data="test.test2" /><br> </condition><br></extension></b><br><br>Next, in my test2.py, I put the uuid of the session in a database:<br><br>
<b>import os, cgi, MySQLdb, time<br>from freeswitch import *<br><br>def handler(session, args):<br><br> uuid = session.getVariable("uuid")<br><br> myconnection = MySQLdb.connect(host = "localhost", user = "root", passwd = "root", db = "testfreeswitch")<br>
mycursor = myconnection.cursor()<br><br> mycursor.execute("INSERT INTO fileAttente VALUES (NULL, '0123456789', 'LIBRE', '" + uuid + "')")<br><br> session.execute("park")</b><br>
<br>Everything runs fine from here.<br>After this, I use telnet to have a connection to freeswitch.<br>And... I'm stuck.<br>I would like this:<br><div style="margin-left: 40px;">a file corresponding to the caller (test2)<br>
a file corresponding to the callee; This file will be pretty much the same that test2.<br>a file which will be run in the same time that Freeswitch; This file will dialog with Freeswitch and the database.<br><br></div>The real problem that I have is that I don't know how to create a new session corresponding to the callee (via a python script).<br>
If somebody could help me, it could be really great =)<br><br>Thanks a lot<br><br>Mathieu<br>