There is a big chance some of your problems can come from your system copy of python.
This is one of the reasons we were against using system libs because you need python built a certain way to
work right with embedded code.

If you really want to get to the bottom of it you may want to explore installing a non standard copy of python the way
we used to do and compare results.

On Wed, Jan 28, 2009 at 9:16 PM, Michael S Collins <msc@freeswitch.org> wrote:


Sent from my iPhone

On Jan 28, 2009, at 6:41 PM, Brian Deacon <bdeacon@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



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400