<div>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.</div>
<div> </div>
<div>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 <a href="mailto:wiltingtree@gmail.com">wiltingtree@gmail.com</a> if anybody wants the core dump), sometimes it gives me the following error:</div>
<div> </div>
<div> TypeError: onInputCallback() takes exactly 3 arguments (0 given)</div>
<div> </div>
<div>In the documentation onInputCallback() takes 3 arguments, and I don't see how it would be very useful with zero.</div>
<div> </div>
<div>Here is a test script I put together which shows this behavior:</div>
<div> </div>
<div>import os<br>from freeswitch import *</div>
<div>def onInputCallback(session, what, obj):<br> consoleLog("INFO","IM IN THE CALLBACK!\n")<br> return("continue")</div>
<div><br>def fsapi(session, stream, env, args):</div>
<div> consoleLog("INFO","Hello there!!!\n")<br> session = Session("{ignore_early_media=true}sofia/gateway/gafachi/1xxxxxxxxxx")<br> session.sleep(500)<br> session.setInputCallback(onInputCallback)<br>
session.streamFile("/root/intro.wav")<br> consoleLog("info","Bye!\n")<br> session.hangup()<br> return(session)<br><br></div>