[Freeswitch-users] mod_python fetching data from mysql for VM
Michael Jerris
mike at jerris.com
Sat Feb 13 13:21:04 PST 2010
Can you describe what your trying to accomplish, I don't understand what the goal is. What feature are you looking for that does not already exist in mod_voiceamil.
Mike
On Feb 13, 2010, at 3:03 PM, mbsip wrote:
> Hello,
>
> I am trying to use mod_python to fetch data from Mysql db (through
> ODBC) and execute voicemail application.
> Below a part of my script:
>
> db=MySQLdb.connect("localhost","root","","test")
> Cursor=db.cursor()
> sql = "SELECT email FROM VM WHERE called_num=%s" % the_dest
> Cursor.execute(sql)
> while (1):
> Results = Cursor.fetchone()
> if Results == None:
> break
> consoleLog("debug", "Found email " + Results[0] +"\n")
> the_recipient = Results[0]
> db.close()
>
> Now i have email address corresponding with called number. The
> question is how to use it for voicemail application?
> So it also means how to omit all /directory/default/....xml, where
> there are all VM parameters set and use fetched data.
>
> session.answer()
> session.execute("voicemail", "default ${domain} " + the_dest)
>
> Is this possible or should I start all VM app in python from the scratch?
More information about the FreeSWITCH-users
mailing list