stop your loop if session.ready() is false.On Wed, Jun 25, 2014 at 12:01 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
_________________________________________________________________________"channel is hangup and curl does not have zombie exec flag."I run a python script that keeps on running until user presses * in while loop and it works fine with *.But in while loop ig user hangup call(channel hangup) i keep getting this error.
def handler(session, args):
session.answer()
digits=session.read(1, 1, "http://localhost/dtmf/dtmf.wav", 300, "#")
session.execute("curl","http://127.0.0.1/info.php post lang=%s" %digits)
cur=session.getVariable("curl_response_data")
rec='';
if (digits!='0'):
while True:
session.execute("curl","http://127.0.0.1/info2.php post currentshout=%s" %rec)
rec=session.getVariable("curl_response_data")
ex=session.read(1, 1, "http://localhost/reciters//%s.mp3" %rec, 1, "#")
if (ex=='*'):
break
ex=session.read(1, 1, "http://localhost/languages/%s/%s.mp3" %(cur,rec), 1, "#")
if (ex=='*'):
break
how can i terminate session on channel hangup.?Any help in this regard would be appreciated.Thanks
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org