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.