[Freeswitch-users] onInputCallback unstable in Python
Michael S Collins
msc at freeswitch.org
Mon Dec 29 07:40:06 PST 2008
A jira for the core dumps would be good, especially if you can
reproduce the behavior.
Question: where does mod_vmd come into play?
-MC
Sent from my iPhone
On Dec 29, 2008, at 6:28 AM, "Adam Wilt" <wiltingtree at gmail.com> wrote:
> Should I add this to Jira?
>
>
>
> On Sat, Dec 27, 2008 at 9:15 PM, Adam Wilt <wiltingtree at gmail.com>
> wrote:
> I'm using builds 10724 and 10914 to place an outbound call from the
> FreeSwitch console and use the onInputCallback functionality. My
> goal is to get mod_vmd working for me.
>
> When I run my script and press a touchtone to invoke the callback
> function, I get some unstable behavior; sometimes it works fine,
> sometimes I get a core dump (send me an email at
> wiltingtree at gmail.com if anybody wants the core dump), sometimes it
> gives me the following error:
>
> TypeError: onInputCallback() takes exactly 3 arguments (0 given)
>
> In the documentation onInputCallback() takes 3 arguments, and I
> don't see how it would be very useful with zero.
>
> Here is a test script I put together which shows this behavior:
>
> import os
> from freeswitch import *
> def onInputCallback(session, what, obj):
> consoleLog("INFO","IM IN THE CALLBACK!\n")
> return("continue")
>
> def fsapi(session, stream, env, args):
> consoleLog("INFO","Hello there!!!\n")
> session = Session("{ignore_early_media=true}sofia/gateway/gafachi/
> 1xxxxxxxxxx")
> session.sleep(500)
> session.setInputCallback(onInputCallback)
> session.streamFile("/root/intro.wav")
> consoleLog("info","Bye!\n")
> session.hangup()
> return(session)
>
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081229/8d07ac09/attachment.html
More information about the Freeswitch-users
mailing list