Does anyone how you might detect a period of x milliseconds of silence using AGI ? Rgds, Stuart
In AGI you can't as there is no access to the audio stream. In EAGI you get access to the audio stream on FD 4, You can then use that for detection on your own. But the best option might be to write a function into agi that uses the silence detection that I believe is available via dsp.c. I'm not sure what type of event you would want to through back at the script when the threshold was exceeded. On Thu, 2003-07-17 at 17:14, Stuart Hirst wrote:> Does anyone how you might detect a period of x milliseconds of silence > using AGI ? > > Rgds, > > Stuart > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users-- Steven Critchfield <critch@basesys.com>
On Thu, 17 Jul 2003, Stuart Hirst wrote:> Does anyone how you might detect a period of x milliseconds of silence > using AGI ?I added silence detection to the Record() application and to the record function in the AGI interface in asterisk. It's based on dsp.c, like someone else said. Basically, it waits for X milliseconds of silence and then stops recording, and then deletes those X milliseconds of silence from the end of the recording. If you look at the record function in AGI, you should be able to see how to do this pretty easily. The part about detecting silence shouldn't be difficult, but I'm not sure how you would tell the AGI program that it was detected. -- Nick EagleQuest, Inc. Metro Telephony, Inc. Rochester, Michigan