<html><body><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"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Michael Collins &lt;msc@freeswitch.org&gt;<br><b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, August 2, 2011 3:14 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] (no subject)<br></font><br><div
 id="yiv1507900105">Just a thought... try adding another "breakout" for your loop...<div><br></div><div><span class="yiv1507900105Apple-style-span" style="font-size:16px;background-color:rgb(255, 255, 255);"><div><font class="yiv1507900105Apple-style-span" face="'courier new', monospace">#!/usr/bin/perl -w</font></div>
<div><font class="yiv1507900105Apple-style-span" face="'courier new', monospace"><br>our $session;<br><br>my $ringback_tone = "%(2000,4000,440,480)";&nbsp;&nbsp;&nbsp; #US RINGBACK TONE</font></div><div><font class="yiv1507900105Apple-style-span" face="'courier new', monospace">my $end_call = 0;<br>
if ( $session-&gt;ready() &amp;&amp; !$end_call )&nbsp;<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; #set bridge settings<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "ringback=$ringback_tone");&nbsp;&nbsp;&nbsp; #set the ringback tone type<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "instant_ringback=true");&nbsp;&nbsp;&nbsp; #set to ring instantly<br>
&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "ignore_early_media=false");&nbsp;&nbsp;&nbsp; #set to NOT ignore early media<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "call_timeout=20");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #only works if "ignore_early_media=true"<br>
&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "bridge_answer_timeout=20"); &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "progress_timeout=15");<br>
&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "continue_on_fail=false");<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "hangup_after_bridge=true");&nbsp;<br>&nbsp;&nbsp;&nbsp; $session-&gt;execute("set", "bridge_pre_execute_bleg_app=info");&nbsp;<br>
&nbsp;&nbsp;&nbsp; $session-&gt;execute("bridge", "sofia/gateway/carrier1/5214498052059");<br></font><font class="yiv1507900105Apple-style-span" face="'courier new', monospace">&nbsp;&nbsp;&nbsp; $session-&gt;hangup();<br>&nbsp; &nbsp; $end_call = 1;&nbsp;</font></div>
<div><font class="yiv1507900105Apple-style-span" face="'courier new', monospace">}</font></div><div></div><div></div><div><font class="yiv1507900105Apple-style-span" face="'courier new', monospace"><br></font></div></span><div>Also, I don'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&nbsp;</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 class="yiv1507900105gmail_quote">On Tue, Aug 2, 2011 at 1:38 PM, Sam <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:lakersman2006@yahoo.com" target="_blank" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="yiv1507900105gmail_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>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 class="yiv1507900105im">
<hr size="1"><b><span style="font-weight:bold;">From:</span></b> Michael Collins &lt;<a rel="nofollow" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight:bold;">To:</span></b> FreeSWITCH Users Help &lt;<a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users@lists.freeswitch.org">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 class="yiv1507900105h5"><br><b><span style="font-weight:bold;">Subject:</span></b> Re: [Freeswitch-users] (no subject)<br></div>
</div></font><div><div></div><div class="yiv1507900105h5"><br><div>In your pastebin of the call log, how many different calls was that? I saw like 4 incoming calls, however I couldn'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" ymailto="mailto:lakersman2006@yahoo.com" target="_blank" href="mailto:lakersman2006@yahoo.com">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="public_did"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;condition field="destination_number" expression="^(\d{11})|(\d{10})$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="perl" data="/usr/local/freeswitch/scripts/<a rel="nofollow" target="_blank" href="http://test2.pl">test2.pl</a>"/&gt;<br>

&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp; &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" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight:bold;">To:</span></b> FreeSWITCH Users Help
 &lt;<a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users@lists.freeswitch.org">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" ymailto="mailto:lakersman2006@yahoo.com" target="_blank" href="mailto:lakersman2006@yahoo.com">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" target="_blank" href="http://pastebin.freeswitch.org/16945">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&nbsp;</div>


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

UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a rel="nofollow" target="_blank" href="http://www.freeswitch.org">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" target="_blank" href="http://www.cluecon.com">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">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" target="_blank" href="http://www.cluecon.com">http://www.cluecon.com</a> 877-7-4ACLUE<br><br>FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a rel="nofollow" target="_blank" href="http://www.freeswitch.org">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" target="_blank" href="http://www.cluecon.com">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">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 ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" 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><br></div></div></div></body></html>