[Freeswitch-users] More troubles with SQLAlchemy and mod_python

Michael S Collins msc at freeswitch.org
Wed Jan 28 19:16:57 PST 2009



Sent from my iPhone

On Jan 28, 2009, at 6:41 PM, Brian Deacon <bdeacon at highergear.com>  
wrote:

> Greetings,
>
> So I see from nabble and on the wiki that others have had problems  
> with
> sqlalchemy and the hangup hook, but I appear to be having a more basic
> problem.
>
> I'm running FS 1.0.2, python 2.4.3, and SqlAlchemy 0.4.7
>
> Here's an extension in my public.xml that works:
>    <extension name="Python_Test_On_5186">
>        <condition field="destination_number"  
> expression="^6468715186$">
>            <action application="set"
> data="group_confirm_file=voicemail/8000/vm-hello.wav" />
>            <action application="set" data="group_confirm_key=4" />
>            <action application="set" data="call_timeout=60" />
>            <action application="set" data="destination_number_python=
> ${python(callcontrol.routing.DummyRouteHandler)}" />
>            <action application="bridge"
> data="${destination_number_python}" />
>        </condition>
>    </extension>
>
> With this silly DummyRouteHandler.py:
> import os
> from freeswitch import *
> #import sqlalchemy
>
> def fsapi(session, stream, env, args):
>    stream.write('sofia/internal/1000%10.48.5.207')
>
> (Note the commented out sqlalchemy import.  Uncommenting the import  
> gets
> me an "error importing module" or "error reloading module" in the  
> fs_cli
> output)
>
> Oooh, and just now trying to reproduce I got my first crash.
>
> Thoughts?
>

Use Lua? ;)
Seriously, Lua is a breeze to learn and is more stable than Python.  
Python is *not* designed to be embedded however Lua is designed  
precisely for that reason. Think WoW.

Other than that I believe that your experiences with Python might help  
the devs uncover more issues. Please visit the "reporting bugs" page  
on the wiki and start collecting the information that will help them  
solve this one.

-MC

> Brian
>
>
>
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




More information about the FreeSWITCH-users mailing list