Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Event-socket python uuid


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
lautram.mathieu at gma...
Guest





PostPosted: Fri Sep 11, 2009 7:18 pm    Post subject: [Freeswitch-users] Event-socket python uuid Reply with quote

Hi there,

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:

<extension name="toto">
      <condition field="destination_number" expression="[0-9]*">
            <action application="python" data="test.test2" />
      </condition>
</extension>


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 + "')")

        session.execute("park")


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 that test2.
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

Mathieu
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services