I am writing a perl script to bridge a call and need to be able to pass back any early media to the caller so I have set "ignore_early_media=false". My problem is that when I am getting early media and then the call finishes, the app seems to be calling the bridge app again to make a new call, even though I have no loops programmed into the script. I have set "hangup_after_bridge=true" but that does not help. Any help would be greatly appreciated. ###################################My code############################################# #!/usr/bin/perl -w our $session; my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE if ($session->ready ()) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20"); $session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); }
Get a console log w/ siptrace and drop it into pastebin.freeswitch.org. Be sure to use "FreeSWITCH Log" as the syntax highlighting. Usually the logs will have ample information to help determine what is happening. -MC On Tue, Aug 2, 2011 at 10:43 AM, Sam <lakersman2006@yahoo.com> wrote:
I am writing a perl script to bridge a call and need to be able to pass back any early media to the caller so I have set "ignore_early_media=false". My problem is that when I am getting early media and then the call finishes, the app seems to be calling the bridge app again to make a new call, even though I have no loops programmed into the script. I have set "hangup_after_bridge=true" but that does not help. Any help would be greatly appreciated.
###################################My code############################################# #!/usr/bin/perl -w
our $session;
my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE
if ($session->ready ()) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20");
$session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); }
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
MC, Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945 ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 12:16 PM Subject: Re: [Freeswitch-users] (no subject) Get a console log w/ siptrace and drop it into pastebin.freeswitch.org. Be sure to use "FreeSWITCH Log" as the syntax highlighting. Usually the logs will have ample information to help determine what is happening. -MC On Tue, Aug 2, 2011 at 10:43 AM, Sam <lakersman2006@yahoo.com> wrote: I am writing a perl script to bridge a call and need to be able to pass back any early media to the caller so I have set "ignore_early_media=false". My problem is that when I am getting early media and then the call finishes, the app seems to be calling the bridge app again to make a new call, even though I have no loops programmed into the script. I have set "hangup_after_bridge=true" but that does not help. Any help would be greatly appreciated.
###################################My code#############################################
#!/usr/bin/perl -w
our $session;
my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE
if ($session->ready ()) { #set
bridge settings
$session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20"); $session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); } _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on. -MC
Here is my dialplan, pretty straight forward. <extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/test2.pl"/> </condition> </extension> ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:08 PM Subject: Re: [Freeswitch-users] (no subject) On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote: MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on. -MC _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
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? -MC On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote:
Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/ test2.pl"/> </condition> </extension>
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:08 PM *Subject:* Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
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->answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out $session->answer(); since the call has already been answered by the dialplan. ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:29 PM Subject: Re: [Freeswitch-users] (no subject) 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? -MC On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote: Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/test2.pl"/> </condition> </extension>
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:08 PM Subject: Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
Just a thought... try adding another "breakout" for your loop... #!/usr/bin/perl -w our $session; my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE my $end_call = 0; if ( $session->ready() && !$end_call ) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20"); $session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); $end_call = 1; } Also, I don't know if it was a typo or not, but you had this: if ($session->ready ()) as opposed to if ($session->ready()) Make sure that you fix that before testing further. :) -MC On Tue, Aug 2, 2011 at 1:38 PM, Sam <lakersman2006@yahoo.com> wrote:
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->answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out $session->answer(); since the call has already been answered by the dialplan.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:29 PM
*Subject:* Re: [Freeswitch-users] (no subject)
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?
-MC
On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote:
Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/ test2.pl"/> </condition> </extension>
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:08 PM *Subject:* Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
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. ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 3:14 PM Subject: Re: [Freeswitch-users] (no subject) Just a thought... try adding another "breakout" for your loop... #!/usr/bin/perl -w our $session; my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE my $end_call = 0; if ( $session->ready() && !$end_call ) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20"); $session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); $end_call = 1; } Also, I don't know if it was a typo or not, but you had this: if ($session->ready ()) as opposed to if ($session->ready()) Make sure that you fix that before testing further. :) -MC On Tue, Aug 2, 2011 at 1:38 PM, Sam <lakersman2006@yahoo.com> wrote: 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->answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out $session->answer(); since the call has already been answered by the dialplan.
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:29 PM
Subject: Re: [Freeswitch-users] (no subject)
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?
-MC
On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote:
Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/test2.pl"/> </condition> </extension>
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:08 PM Subject: Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
One last thing... put this as the last line of your script: 1; In other words, end it with w "true" value. I saw that on the wiki, and as you know, wikis are NEVER wrong. :P -MC On Tue, Aug 2, 2011 at 3:48 PM, Sam <lakersman2006@yahoo.com> wrote:
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.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 3:14 PM
*Subject:* Re: [Freeswitch-users] (no subject)
Just a thought... try adding another "breakout" for your loop...
#!/usr/bin/perl -w
our $session;
my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE my $end_call = 0; if ( $session->ready() && !$end_call ) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20");
$session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); $end_call = 1; }
Also, I don't know if it was a typo or not, but you had this:
if ($session->ready ())
as opposed to
if ($session->ready())
Make sure that you fix that before testing further. :)
-MC
On Tue, Aug 2, 2011 at 1:38 PM, Sam <lakersman2006@yahoo.com> wrote:
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->answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out $session->answer(); since the call has already been answered by the dialplan.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:29 PM
*Subject:* Re: [Freeswitch-users] (no subject)
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?
-MC
On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote:
Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/ test2.pl"/> </condition> </extension>
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:08 PM *Subject:* Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
No, still same behavior. ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 3:56 PM Subject: Re: [Freeswitch-users] (no subject) One last thing... put this as the last line of your script: 1; In other words, end it with w "true" value. I saw that on the wiki, and as you know, wikis are NEVER wrong. :P -MC On Tue, Aug 2, 2011 at 3:48 PM, Sam <lakersman2006@yahoo.com> wrote: 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.
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 3:14 PM
Subject: Re: [Freeswitch-users] (no subject)
Just a thought... try adding another "breakout" for your loop...
#!/usr/bin/perl -w
our $session;
my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE my $end_call = 0; if ( $session->ready() && !$end_call ) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20"); $session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); $end_call = 1; }
Also, I don't know if it was a typo or not, but you had this:
if ($session->ready ())
as opposed to
if ($session->ready())
Make sure that you fix that before testing further. :)
-MC
On Tue, Aug 2, 2011 at 1:38 PM, Sam <lakersman2006@yahoo.com> wrote:
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->answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out $session->answer(); since the call has already been answered by the dialplan.
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:29 PM
Subject: Re: [Freeswitch-users] (no subject)
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?
-MC
On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote:
Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/test2.pl"/> </condition> </extension>
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 2, 2011 1:08 PM Subject: Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
okay, i'm out of ideas, other than to ask... why are you doing this in a script and not the dialplan? -MC On Tue, Aug 2, 2011 at 4:26 PM, Sam <lakersman2006@yahoo.com> wrote:
No, still same behavior.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 3:56 PM
*Subject:* Re: [Freeswitch-users] (no subject)
One last thing... put this as the last line of your script:
1;
In other words, end it with w "true" value. I saw that on the wiki, and as you know, wikis are NEVER wrong. :P
-MC
On Tue, Aug 2, 2011 at 3:48 PM, Sam <lakersman2006@yahoo.com> wrote:
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.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 3:14 PM
*Subject:* Re: [Freeswitch-users] (no subject)
Just a thought... try adding another "breakout" for your loop...
#!/usr/bin/perl -w
our $session;
my $ringback_tone = "%(2000,4000,440,480)"; #US RINGBACK TONE my $end_call = 0; if ( $session->ready() && !$end_call ) { #set bridge settings $session->execute("set", "ringback=$ringback_tone"); #set the ringback tone type $session->execute("set", "instant_ringback=true"); #set to ring instantly $session->execute("set", "ignore_early_media=false"); #set to NOT ignore early media $session->execute("set", "call_timeout=20"); #only works if "ignore_early_media=true" $session->execute("set", "bridge_answer_timeout=20");
$session->execute("set", "progress_timeout=15"); $session->execute("set", "continue_on_fail=false"); $session->execute("set", "hangup_after_bridge=true"); $session->execute("set", "bridge_pre_execute_bleg_app=info"); $session->execute("bridge", "sofia/gateway/carrier1/5214498052059"); $session->hangup(); $end_call = 1; }
Also, I don't know if it was a typo or not, but you had this:
if ($session->ready ())
as opposed to
if ($session->ready())
Make sure that you fix that before testing further. :)
-MC
On Tue, Aug 2, 2011 at 1:38 PM, Sam <lakersman2006@yahoo.com> wrote:
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->answer(); in the beginning of the script. I was told by someone else on the mailing list to leave out $session->answer(); since the call has already been answered by the dialplan.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:29 PM
*Subject:* Re: [Freeswitch-users] (no subject)
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?
-MC
On Tue, Aug 2, 2011 at 1:19 PM, Sam <lakersman2006@yahoo.com> wrote:
Here is my dialplan, pretty straight forward.
<extension name="public_did"> <condition field="destination_number" expression="^(\d{11})|(\d{10})$"> <action application="perl" data="/usr/local/freeswitch/scripts/ test2.pl"/> </condition> </extension>
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 2, 2011 1:08 PM *Subject:* Re: [Freeswitch-users] (no subject)
On Tue, Aug 2, 2011 at 12:30 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Here is the link to the console/ sip trace log http://pastebin.freeswitch.org/16945
Not sure what is happening. Pastebin the dialplan extension(s) that handle this call. Something interesting must be going on.
-MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
Sam is your trace log including everything? sofia siptrace global on? It seems like there a things missing from the other profile? Also please don't open discussions here and on Jira. There is only so much volunteers can do in there spare time. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/no-subject-tp6645805p6648986.h... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (3)
-
Jeff Lenk
-
Michael Collins
-
Sam