<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, &quot;<a href="http://localhost/dtmf/dtmf.wav">http://localhost/dtmf/dtmf.wav</a>&quot;, 300, &quot;#&quot;)<br>
        session.execute(&quot;curl&quot;,&quot;<a href="http://127.0.0.1/info.php">http://127.0.0.1/info.php</a> post lang=%s&quot; %digits)<br>        cur=session.getVariable(&quot;curl_response_data&quot;)<br>        rec=&#39;&#39;;<br>
        if (digits!=&#39;0&#39;):<br>                while True:<br>                        session.execute(&quot;curl&quot;,&quot;<a href="http://127.0.0.1/info2.php">http://127.0.0.1/info2.php</a> post currentshout=%s&quot; %rec)<br>
                        rec=session.getVariable(&quot;curl_response_data&quot;)<br>                        ex=session.read(1, 1, &quot;<a href="http://localhost/reciters//%s.mp3">http://localhost/reciters//%s.mp3</a>&quot; %rec, 1, &quot;#&quot;)<br>
                        if (ex==&#39;*&#39;):<br>                                break<br>                        ex=session.read(1, 1, &quot;<a href="http://localhost/languages/%s/%s.mp3">http://localhost/languages/%s/%s.mp3</a>&quot; %(cur,rec), 1, &quot;#&quot;)<br>
                        if (ex==&#39;*&#39;):<br>                                 break<br><br></div>But in while loop ig user hangup call(channel hangup) i keep getting this error.<br><br></div>&quot;channel is hangup and curl does not have zombie exec flag.&quot;<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>