I just made an update to app_waitforsilence.c on 08-15-2008 which should fix the hangup issue completely.
http://downloads.vicidial.com/asterisk- ... rsilence.c
The original author was under the impression that the ast_waitfor() function would throw an error if the channel hung up, which it does not. I put a call into the ast_check_hungup() function and exit if it returns true, This fixed the problem.
Thanks for pointing this out. I was actually under the impression that the call to ast_waitfor() would actually throw an error on a hungup channel. Though I based this on the concept that the author actually knew what he was doing. It might have actually done so originally for all I know. I was actually thinking that the calls being stuck were caused by calls to IVRs where there was too much back ground noise.