You can also use the AGI interface function "RECORD FILE" and specify a max record duration of 5s and silence detection of 1s. Time the duration of the call to asterisk - if its longer than 1 second you know you've got voice. If you need to check for voice over a longer period of time - repeat the call x times. This way you'll wait for approx 'x' seconds for voice or silence. I've done this using some "C" code and works very well as a "grunt" detector - timing out after 5 seconds of silence or returning immediately when voice is received.
Paul ----- Original Message ----- From: "Christian Hecimovic" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, October 04, 2003 10:39 AM Subject: Re: [Asterisk-Users] Voice detection > dsp.c has silence detection that works quite well for detecting end-of-voice > silence. It is used to allow only a certain amount of silence at the end of > voicemails, for instance. See app_voicemail2.c on how to use it, specifically > the function play_and_record(). Note that the silence threshold (how > sensitive you are to silence) is read in from the voicemail.conf file. > > Since the silence detection stuff has a nice public API, you can use it for > any app you write. See app_skel.c for a basic "shell", and follow something > like app_voicemail2.c. Read in the acceptable values for threshold and so > forth from a configuration file (there is a nice Asterisk API for this, > also), and you're set. For your purposes (playing a file after detecting > silence in a remote voice stream), such an app should be quite simple. > > Christian > _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users