One last thing... put this as the last line of your script:<div><br></div><div>1;</div><div><br></div><div>In other words, end it with w &quot;true&quot; value. I saw that on the wiki, and as you know, wikis are NEVER wrong. :P</div>
<div><br></div><div>-MC<br><div><br><div class="gmail_quote">On Tue, Aug 2, 2011 at 3:48 PM, Sam <span dir="ltr">&lt;<a href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I made the corrections you suggested in my code, but still the same behavior. The bridge app seems to be in some type of internal loop and it does not end.<br>
</span></div><div><br></div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Arial"><div class="im">
<hr size="1"><b><span style="font-weight:bold">From:</span></b> Michael Collins &lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
</div><b><span style="font-weight:bold">Sent:</span></b> Tuesday, August 2, 2011 3:14 PM<div><div></div><div class="h5"><br><b><span style="font-weight:bold">Subject:</span></b> Re: [Freeswitch-users] (no subject)<br></div>
</div></font><div><div></div><div class="h5"><br><div>Just a thought... try adding another &quot;breakout&quot; for your loop...<div><br></div><div><span style="font-size:16px;background-color:rgb(255, 255, 255)"><div><font face="&#39;courier new&#39;, monospace">#!/usr/bin/perl -w</font></div>

<div><font face="&#39;courier new&#39;, monospace"><br>our $session;<br><br>my $ringback_tone = &quot;%(2000,4000,440,480)&quot;;    #US RINGBACK TONE</font></div><div><font face="&#39;courier new&#39;, monospace">my $end_call = 0;<br>

if ( $session-&gt;ready() &amp;&amp; !$end_call ) <br>{      <br>    #set bridge settings<br>    $session-&gt;execute(&quot;set&quot;, &quot;ringback=$ringback_tone&quot;);    #set the ringback tone type<br>    $session-&gt;execute(&quot;set&quot;, &quot;instant_ringback=true&quot;);    #set to ring instantly<br>

    $session-&gt;execute(&quot;set&quot;, &quot;ignore_early_media=false&quot;);    #set to NOT ignore early media<br>    $session-&gt;execute(&quot;set&quot;, &quot;call_timeout=20&quot;);        #only works if &quot;ignore_early_media=true&quot;<br>

    $session-&gt;execute(&quot;set&quot;, &quot;bridge_answer_timeout=20&quot;);                                                                 <br>    $session-&gt;execute(&quot;set&quot;, &quot;progress_timeout=15&quot;);<br>

    $session-&gt;execute(&quot;set&quot;, &quot;continue_on_fail=false&quot;);<br>    $session-&gt;execute(&quot;set&quot;, &quot;hangup_after_bridge=true&quot;); <br>    $session-&gt;execute(&quot;set&quot;, &quot;bridge_pre_execute_bleg_app=info&quot;); <br>

    $session-&gt;execute(&quot;bridge&quot;, &quot;sofia/gateway/carrier1/5214498052059&quot;);<br></font><font face="&#39;courier new&#39;, monospace">    $session-&gt;hangup();<br>    $end_call = 1; </font></div>
<div><font face="&#39;courier new&#39;, monospace">}</font></div><div></div><div></div><div><font face="&#39;courier new&#39;, monospace"><br></font></div></span><div>Also, I don&#39;t know if it was a typo or not, but you had this:</div>

<div><br></div><div>if ($session-&gt;ready ())</div><div><br></div><div>as opposed to </div><div><br></div><div>if ($session-&gt;ready())</div><div><br></div><div>Make sure that you fix that before testing further. :)</div>

<div><br></div><div>-MC</div><br><div>On Tue, Aug 2, 2011 at 1:38 PM, Sam <span dir="ltr">&lt;<a rel="nofollow" href="mailto:lakersman2006@yahoo.com" target="_blank">lakersman2006@yahoo.com</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>In the pastebin, that was only 1 single call that was executed with the bridge app. The issue is that once the call channel is shutdown, a new channel gets created even though the call should be hung up. And I have noticed that this occurs when I leave out $session-&gt;answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out </span><span>$session-&gt;answer(); since the call has already been answered by the dialplan.<br>

</span></div><div><br></div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Arial"><div>

<hr size="1"><b><span style="font-weight:bold">From:</span></b> Michael Collins &lt;<a rel="nofollow" href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help &lt;<a rel="nofollow" href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>

</div><b><span style="font-weight:bold">Sent:</span></b> Tuesday, August 2, 2011 1:29 PM<div><div></div><div><br><b><span style="font-weight:bold">Subject:</span></b> Re: [Freeswitch-users] (no subject)<br></div>
</div></font><div><div></div><div><br><div>In your pastebin of the call log, how many different calls was that? I saw like 4 incoming calls, however I couldn&#39;t specifically see the issue you were experiencing. Can you look at your log and see if you can isolate the approximate log lines where the issue is occurring?<div>


<br></div><div>-MC<br><br><div>On Tue, Aug 2, 2011 at 1:19 PM, Sam <span dir="ltr">&lt;<a rel="nofollow" href="mailto:lakersman2006@yahoo.com" target="_blank">lakersman2006@yahoo.com</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Here is my dialplan, pretty straight forward.</span></div><div><br><span></span></div><div>

<span>&lt;extension name=&quot;public_did&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{11})|(\d{10})$&quot;&gt;<br>      &lt;action application=&quot;perl&quot; data=&quot;/usr/local/freeswitch/scripts/<a rel="nofollow" href="http://test2.pl" target="_blank">test2.pl</a>&quot;/&gt;<br>


    &lt;/condition&gt;<br>  &lt;/extension&gt;</span></div><div><br></div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family:times new roman, new york, times, serif;font-size:12pt">


<font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold">From:</span></b> Michael Collins &lt;<a rel="nofollow" href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help
 &lt;<a rel="nofollow" href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br><b><span style="font-weight:bold">Sent:</span></b> Tuesday, August 2, 2011 1:08 PM<br>

<b><span style="font-weight:bold">Subject:</span></b> Re: [Freeswitch-users] (no subject)<br>
</font><div><div></div><div><br><div><br><br><div>On Tue, Aug 2, 2011 at 12:30 PM, Sam <span dir="ltr">&lt;<a rel="nofollow" href="mailto:lakersman2006@yahoo.com" target="_blank">lakersman2006@yahoo.com</a>&gt;</span> wrote:<br>


<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>MC,</span></div><div><br><span></span></div><div><span>Here is the link to the console/ sip trace log <a rel="nofollow" href="http://pastebin.freeswitch.org/16945" target="_blank">http://pastebin.freeswitch.org/16945</a></span></div>



<div><br></div></div></div></blockquote><div><br></div><div>Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.</div><div><br></div><div>-MC </div>



</div>
</div><br></div></div>_______________________________________________<br>Join us at ClueCon 2011, Aug 9-11, Chicago<br><a rel="nofollow" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>

<br>FreeSWITCH-users mailing list<br>
<a rel="nofollow" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>


UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>


<br><br></div></div></div></div><br>_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a rel="nofollow" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div><br>_______________________________________________<br>Join us at ClueCon 2011, Aug 9-11, Chicago<br><a rel="nofollow" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br><br>FreeSWITCH-users mailing list<br>

<a rel="nofollow" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>

UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>

<br><br></div></div></div></div></div></div><br>_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a rel="nofollow" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div><br>_______________________________________________<br>Join us at ClueCon 2011, Aug 9-11, Chicago<br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br><br>FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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><br></div></div></div></div></div></div><br>_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<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></div>