Call hangup not working in perl session
Hi Guys, I am using perl session to handle call flow. I need to hangup call at exact 1 minute. For that i have set below line, but somehow its not working. Call keeps running. $session->execute( "set", "execute_on_answer=sched_hangup +60" ); Can anybody please point out the issue or something I missing. Thanks in advance. ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per... Sent from the freeswitch-users mailing list archive at Nabble.com.
Is $session already answered? On 15 October 2013 15:59, Samir Doshi <smrdoshi@gmail.com> wrote:
Hi Guys,
I am using perl session to handle call flow. I need to hangup call at exact 1 minute. For that i have set below line, but somehow its not working. Call keeps running. $session->execute( "set", "execute_on_answer=sched_hangup +60" );
Can anybody please point out the issue or something I missing.
Thanks in advance.
----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Hi, I had this working sometime back when I was testing a pre-paid application using Perl. Here is what I had in my script. my $max_session_time = 30; $session->execute("set", "execute_on_answer=sched_hangup +" . $max_session_time); Where in the script are you placing the execute command? Sam -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Samir Doshi Sent: Tuesday, October 15, 2013 10:00 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Call hangup not working in perl session Hi Guys, I am using perl session to handle call flow. I need to hangup call at exact 1 minute. For that i have set below line, but somehow its not working. Call keeps running. $session->execute( "set", "execute_on_answer=sched_hangup +60" ); Can anybody please point out the issue or something I missing. Thanks in advance. ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per l-session-tp7595714.html Sent from the freeswitch-users mailing list archive at Nabble.com. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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
Yeah $session is already answered at the beginning of call. $session->answer(); I have placed it just before bridge application, like this $session->execute( "set", "execute_on_answer=sched_hangup +60" ); $session->execute( "bridge", "$data_string" ); ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per... Sent from the freeswitch-users mailing list archive at Nabble.com.
Comment out the $session->answer(); and try it. -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Samir Doshi Sent: Tuesday, October 15, 2013 1:08 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call hangup not working in perl session Yeah $session is already answered at the beginning of call. $session->answer(); I have placed it just before bridge application, like this $session->execute( "set", "execute_on_answer=sched_hangup +60" ); $session->execute( "bridge", "$data_string" ); ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per l-session-tp7595714p7595722.html Sent from the freeswitch-users mailing list archive at Nabble.com. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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
That works. Thanks However I notice one thing, If I set 60 seconds sched time then my call hang up at 57 seconds. I tried many times and all the time it hangup at 57 seconds. Not sure if that's something related to fs. Any thoughts? ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per... Sent from the freeswitch-users mailing list archive at Nabble.com.
You could also export it instead so it executes on the bleg not the aleg. That should work regardless of whether you have the aleg answered already or not. I'd personally prefer not answering the aleg unless you need to - most systems start billing from time answered. So the caller'll get charged for ringing time even if the call isn't answered. Not sure what would cause the 3s difference. If anything there should be a small delay on answer before executing sched_hangup - I could understand 61s much more than 57s. -Steve On 16 October 2013 08:29, Samir Doshi <smrdoshi@gmail.com> wrote:
That works. Thanks
However I notice one thing, If I set 60 seconds sched time then my call hang up at 57 seconds. I tried many times and all the time it hangup at 57 seconds. Not sure if that's something related to fs. Any thoughts?
----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Where are you noting the hang up time? Is it in FS , a test tool, or a network trace? I remember seeing something similar on a test tool. -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Samir Doshi Sent: Wednesday, October 16, 2013 2:30 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call hangup not working in perl session That works. Thanks However I notice one thing, If I set 60 seconds sched time then my call hang up at 57 seconds. I tried many times and all the time it hangup at 57 seconds. Not sure if that's something related to fs. Any thoughts? ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per l-session-tp7595714p7595737.html Sent from the freeswitch-users mailing list archive at Nabble.com. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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
Thanks guys for your support. Its looks like working fine now without any change. Maybe temporary issue or something. I will keep monitor on it and get back to you in case i found anything. Thanks again. ----- Thanks, Samir -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-hangup-not-working-in-per... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (3)
-
Sam Montour
-
Samir Doshi
-
Steven Ayre