Silence suppression in Asterisk 1.8
- Codename Roibos
email@example.com * Twitter @oej
Copyright 2014, Edvina AB, Sollentuna Sweden.All rights reserved.
Want to save at least
40% of the bandwidth used for
media in your Asterisk server?
This work is funded by Bressner Technology GMBH
(bressner.de) that makes a series of Lync integration
They also distribute Industrial PCs that are excellent as
Thank you, Bressner, for contributing to Asterisk.
If you use Asterisk,
make sure you contribute back
Thank you Josh and Matt
for the support!
An RTP session
Typical RTP streams consists of UDP/RTP packets sent
every 20 millisecond. With Asterisk today, we need a constant
stream of packets.
But… In a normal
conversation one person
listens while the other one
With silence suppression
When the sender detects silence, it sends a CN - Comfort
Noise - request frame. After that no RTP trafﬁc will be seen until
the audio comes back.
This saves a lot of bandwidth in a
normal conversation. Up to 40% bandwidth
savings in a normal call.
When we get no RTP from the other side,
Asterisk needs to produce some noise.
CN is agreed on in SDP Offfer/answer and
is only used if both parties support it.
After a few frames of silence, alerts RTP to send
a CN frame and starts dropping frames.
Listens to outbound audio stream and
detects silence. An Asterisk audiohook and DSP.
The various parts
support in SDP and RTP
Add the ”cn” codec to allowed codecs in sip.conf
in the [general] section or device section of sip.conf
Note: If you enable the CN codec but not silence suppression,
we will accept CN but never send a CN frame.
This saves some CPU for silence detection,
but still uses CPU for noice generation.
svn checkout http://svn.digium.com/svn/asterisk/team/oej/roibos-cng-support-1.8"
Test it and report bugs to the
bug tracker, as indicated in the
If this code get good feedback,
it’s going to get ported to 12 and trunk,
to be integrated into the standard
version of Asterisk."
We do need your help testing it to get there.
Due to release policies it can
not be part of Asterisk
1.8 or 11.
Simply because that’s what we use in the project
this was developed for. Funding for porting it to
other releases is welcome.
chan_pjsip doesn’t exist in 1.8 (see above). Most of the
work is in the core of Asterisk and will be updated to
other releases after testing and when funding exists.
IAX2? chan_iax2 does not use RTP media framing.
Most of this work is generic in
Asterisk. Other channels may beneﬁt too,
as long as they are using RTP.
Like chan_pjsip in 12 and the
XMPP Jingle drivers.
Time to start coding?
Do you need a new
If you need a new Asterisk feature or want to
get general Asterisk or Kamailio
support or training from Edvina,
please contact us - firstname.lastname@example.org
Roibus will soon be part of our
version of Asterisk 1.8 - EDVx -
with improved RTCP support, Lync integration
PRACK support, Improved SRTP negotiation,
RTP packet loss concealment and much more.
http://edvina.net * Twitter @edvina