WaitForSilence Fixed

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

WaitForSilence Fixed

Postby mcargile » Wed Oct 15, 2008 12:06 pm

I just put a new version of app_waitforsilence.c on our downloads page:

http://downloads.vicidial.com/asterisk- ... rsilence.c

This version fixes several problems. It does change the behavior a little bit though. It only works with asterisk 1.2. I will be making these changes to the 1.4 version soon as it is also effected by these bugs.

Now WaitForSilence defaults to a 60 second timeout. You can still make it unlimited by just setting the timeout to 0.

I fixed a bug where by WaitForSilence would just exit on a digitally muted channel.

I also made it so that for verbosity 21 and less WaitForSilence will only put out 1/10 the "Waited for X ms.... " messages. For verbosity 22 and over it will still spew out hundreds of messages a minute. This should dramatically reduce the amount of log messages on systems that use WaitForSilence frequently.

Lastly if the channel hangs up WaitForSilence exits properly. The original author thought that the ast_waitfor() function would throw an error on hung up. It might have done so originally but it does not do so currently. I put in a call to ast_check_hungup() and exit if it returns true. This last bug was causing systems that did not have a timeout set in WaitForSilence to fill up their hard drive with the messages from the verbose messages.

If you have any issues with this version of app_waitforsilence.c please post them in the eflo bug tracker.
Last edited by mcargile on Mon Nov 24, 2008 10:34 am, edited 2 times in total.
Michael Cargile | Director of Engineering | ViciDialGroup | http://www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 614
Joined: Tue Jan 16, 2007 9:38 am

Postby mcargile » Thu Oct 16, 2008 9:45 am

I just fixed another bug that could cause a possible memory leak. The original application would only free audio frames. Things like DTMF frames would never get freed. Thanks to Corydon from the #asterisk-dev irc channel on freenode for this.

I also made it so that the channel variable WAITSTATUS gets set to ERROR if WaitForSilence exits with an error, such as the customer hangs up.
Michael Cargile | Director of Engineering | ViciDialGroup | http://www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 614
Joined: Tue Jan 16, 2007 9:38 am

Postby Nortelguy » Sun Oct 19, 2008 1:25 pm

Good show ... Thanks :)
Nortelguy
 
Posts: 120
Joined: Wed Sep 24, 2008 9:06 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 296 guests