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