Hi, is there a way to hangup after a certain amount of silence? my problem is that with regular PSTN calls I don't get a BYE from my provider until around 1 minute after the phone has been hanged up. This is pretty standard, and the provider is not at fault, but I would like to hangup the call after I detect a certain amount of silence time. The only thing I could find was wait_for_silence on the wiki, but that application only delays dialplan execution, and I would need something like: hangup_on_silence=30, where 30 means to hangup if 30 seconds of silence have passed. Thanks for your help! Nicolas
You can call wait_for_silence with timeout as 1 minute. It'll wait for max 1 minute, but it'll return immediately when there is silence of mentioned length. You can next invoke hangup in the dialplan. Or, you can use event socket library to call "wait_for_silence" and wait for "CHANNEL_EXECUTE_COMPLETE" with variable_current_application=wait_for_silence, upon which you can hangup. Helps? On Mon, Jan 4, 2010 at 8:40 PM, Nicolas Brenner <nicolas@medularis.com>wrote:
Hi, is there a way to hangup after a certain amount of silence? my problem is that with regular PSTN calls I don't get a BYE from my provider until around 1 minute after the phone has been hanged up. This is pretty standard, and the provider is not at fault, but I would like to hangup the call after I detect a certain amount of silence time. The only thing I could find was wait_for_silence on the wiki, but that application only delays dialplan execution, and I would need something like: hangup_on_silence=30, where 30 means to hangup if 30 seconds of silence have passed.
Thanks for your help!
Nicolas
_______________________________________________ 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
Vinuth, thank you very much for your response. I guess the event socket solution is the best for me, since I'm not using the dialplan. for these calls Do you think there's an alternative for Javascript though? hehe. On Mon, Jan 4, 2010 at 12:41 PM, Vinuth Madinur <vinuth.madinur@gmail.com> wrote:
You can call wait_for_silence with timeout as 1 minute. It'll wait for max 1 minute, but it'll return immediately when there is silence of mentioned length. You can next invoke hangup in the dialplan. Or, you can use event socket library to call "wait_for_silence" and wait for "CHANNEL_EXECUTE_COMPLETE" with variable_current_application=wait_for_silence, upon which you can hangup. Helps?
you can bind events in javascript in much the same way. Why is it normal to not get a hangup for 60 seconds? Mike On Jan 4, 2010, at 10:59 AM, Nicolas Brenner wrote:
Vinuth, thank you very much for your response. I guess the event socket solution is the best for me, since I'm not using the dialplan. for these calls Do you think there's an alternative for Javascript though? hehe.
On Mon, Jan 4, 2010 at 12:41 PM, Vinuth Madinur <vinuth.madinur@gmail.com> wrote:
You can call wait_for_silence with timeout as 1 minute. It'll wait for max 1 minute, but it'll return immediately when there is silence of mentioned length. You can next invoke hangup in the dialplan. Or, you can use event socket library to call "wait_for_silence" and wait for "CHANNEL_EXECUTE_COMPLETE" with variable_current_application=wait_for_silence, upon which you can hangup. Helps?
Event-based javascript? like Node.js? how would I bind the end of a wait_for_silence to some script or callback function? Here, when you call from a regular landline to another, the person receiving the call may hangup and the call will still be alive, this is so the person can "transfer" the call between phones connected to the same line (e.g. kitchen and room phones). Only if the person originating the call hangs up, the call is terminated right away. Maybe 60 seconds is too much, but that's the way the PSTN works here. On Mon, Jan 4, 2010 at 1:41 PM, Michael Jerris <mike@jerris.com> wrote:
you can bind events in javascript in much the same way. Why is it normal to not get a hangup for 60 seconds?
Mike
participants (3)
-
Michael Jerris
-
Nicolas Brenner
-
Vinuth Madinur