[asterisk-dev] Audiohook dropping frames
Olle E. Johansson
oej at edvina.net
Tue Apr 8 06:40:36 CDT 2014
On 08 Apr 2014, at 13:32, Joshua Colp <jcolp at digium.com> wrote:
> Olle E. Johansson wrote:
> Kia ora,
>> In my adventures with silence detection and suppression I want my
>> audiohook to drop frames. I see that I can manipulate but can I also
>> drop frames?
> Right now the manipulation expects the contents of the audio frame to be changed, not the entire frame itself to be changed of type so two things come to mind:
> 1. Change the frame enough to make it seem as though it does not contain any audio. Changing datalen for example.
> 2. Make it so manipulate can return NULL to indicate it has suppressed the frame. This shouldn't be that bad. The audiohook got just has to replace the frame with &ast_null_frame if a manipulation audiohook returns NULL.
3. Invent AST_FRAME_DROP and make sure that we drop it instead of sending it out to network...
The whole point is to not send any RTP packets (in the case of chan_sip, which right now is the only user).
More information about the asterisk-dev