Hello,<br><br>   I have a functionality that I am trying to implement via Freeswitch and mod_python, in which a user calls in, Freeswitch hangs up the call and then call the user back. All should happen from inside Freeswitch. Here is the code that I had written for it:<br>

<br>def handler(session, args):<br><br> if is_callback_set(app_instance):<br>            schedule_callback(app_instance, session.getCallerID())<br><br>is_callback_set(app_instance) : checks if we need to callback on this application instance. schedule_callback(app_instance, session.getCallerID()) : function to call the caller back<br>

<br>inside schedule_callback, I create a new thread called CallerbackThread, and start the callback in another thread. <br><br>Inside CallBackThread, following happens:<br><br>def run(self):<br><br>                new_session = Session(url)           <br>

                <br>                if new_session.answered():<br>                    <br>                    <a href="http://new_session.ai" target="_blank">new_session.ai</a> = self.app_instance                   <br>                    new_session.getCallerID = lambda: new_session.getVariable(&quot;destination_number&quot;)
      <br>                                     <br>                    new_session.setInputCallback(call_back)<br>
                    new_session.isHungup = lambda: new_session.getState() == &#39;CS_HANGUP&#39;<br>              <br>                    while not new_session.isHungup():<br>                        new_session.streamFile(&quot;abcd.mp3&quot;)<br>
                    <br>                    new_session.hangup()<br><br>def call_back(session,what,obj):<br>
    <br>
    logger.debug(&quot;hi callback&quot;)<br><br><br>The originate occurs and I am able to hear the file getting streamed correctly. But when I press any dtmf input, then on first input nothing happens, and in the next input I start getting &quot;TypeError : call_back expects 3 args, 0 given&quot; error. I dont know what can be the solution. Any help regarding this is highly appreciated!<br>
<br>Regards,<br>Dinesh<br><br><br>