[asterisk-dev] Comfort noise - the Roibus branch

Sean Kelly keenskelly at gmail.com
Tue Sep 18 11:43:30 CDT 2012


Hello,

I will be watching for your progress/updates on this. I maintain a couple
custom Asterisk modules for 1.2 and did a major rework under 1.8 (only
minor changes were needed for 1.8 compatibility, but the modules themselves
needed a lot of instrumenting for ongoing support and debugging). We use
Asterisk as the dialer and communication framework for mass message
delivery.

As a part of this project, our support folks indicated that they were
having problems delivering messages to certain AT&T VOIP systems on the
East coast which were disconnecting us within a fraction of a second of
waiting for us to deliver a voicemail. After spending a couple days
experimenting with what we guessed might be the problem, we found that
simply sending silence packets when we are not transmitting audio is
sufficient to keep AT&T from dropping us.

Our application plays and stops various streams on the channel according to
a scripted sequence, so I simply made it stop the silence when a stream
starts, and start the silence when a stream stops. I use
f.ast_channel_start_silence_generator() and
f.ast_channel_stop_silence_generator() for this purpose. Examining the
Asterisk code, I see that it simply sends 0-filled channel frame buffers.
This is sufficient for our current needs, however we are somewhat concerned
that we will eventually run into some system running silence suppression
which will drop these packets and again either kill our connection, or
cause strange choppiness in the streams due to inexactness of the
suppression technique.

Out of sheer paranoia, I wrote a small bit that fills the buffer instead
with random low-level noise (+/- 10 on a signed short) in the hopes that
this would not be perceived as an empty packet that may be discarded. At a
higher amplitude, this makes a horribly shrill sound, so something more in
line with actual comfort noise would be great and the amplitude could be
brought up to an audible level at that point.

I understand that your comfort noise solution is generally expected to
perform a somewhat different function, however if there were some way to
invoke it with a generator similar to the way the silence generator is,
that would be much preferable to hacking my own.

Regards,
- Sean

On Tue, Sep 18, 2012 at 9:21 AM, Olle E. Johansson <oej at edvina.net> wrote:

> Friends,
>
> Just a heads up on a new project. I'm trying to implement support for cng
> in Asterisk. I've started the easy way with cmantunes patch found in issue
> https://issues.asterisk.org/jira/browse/ASTERISK-5263 ...which is marked
> post-1.2 ;-)
>
> I've checked with cmantues and he's happy that we're looking into this
> code.
>
> I will use this generator to generate noise on the outbound channel if the
> inbound channel starts sending CNG packets. That's level one, to fill in
> the gaps.
>
> I haven't looked into if we have support for silence detection that could
> be used to send CN out of Asterisk. If anyone has any ideas or suggestions
> on how to detect silence in a bridged call I'm listening :-)
>
> The README that shows the starting point and my thoughts about this work
> plus quotes from the RFC about CNG in RTP  is attached.
>
> As usual, I look forward to the feedback!
>
> /O
>
> ***** README *******
> Edvina AB
> Olle E. Johansson
>
>
> Started: 2012-09-18
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120918/388c6e8e/attachment.htm>


More information about the asterisk-dev mailing list