[Freeswitch-dev] Event-socket uuid problem
lautram.mathieu at gmail.com
Fri Sep 11 08:54:04 PDT 2009
Here is my problem:
I'd like to set up a switchboard. I'm using python scripts called when a
call is coming. Here is my public.xml:
<condition field="destination_number" expression="[0-9]*">
<action application="python" data="test.test2" />
Next, in my test2.py, I put the uuid of the session in a database:
*import os, cgi, MySQLdb, time
from freeswitch import *
def handler(session, args):
uuid = session.getVariable("uuid")
myconnection = MySQLdb.connect(host = "localhost", user = "root",
passwd = "root", db = "testfreeswitch")
mycursor = myconnection.cursor()
mycursor.execute("INSERT INTO fileAttente VALUES (NULL,
'0123456789', 'LIBRE', '" + uuid + "')")
Everything runs fine from here.
After this, I use telnet to have a connection to freeswitch.
And... I'm stuck.
I would like this:
a file corresponding to the caller (test2)
a file corresponding to the callee; This file will be pretty much the same
a file which will be run in the same time that Freeswitch; This file will
dialog with Freeswitch and the database.
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).
If somebody could help me, it could be really great =)
Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev