SlideShare une entreprise Scribd logo
1  sur  11
Silence suppression in Asterisk 1.8 

- Codename Roibos
oej@edvina.net * 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
products. 



They also distribute Industrial PCs that are excellent as
Asterisk platforms.



Thank you, Bressner, for contributing to Asterisk.
Thank you
If you use Asterisk,

make sure you contribute back

whenever possible.
Thank you Josh and Matt
for the support!
An RTP session
Alice Bob
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
speaks.
With silence suppression
Alice Bob
CN
CN
When the sender detects silence, it sends a CN - Comfort
Noise - request frame. After that no RTP traffic 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
Silence

detection
Silence

suppression
Comfort Noise

support in SDP and RTP
Noise generator
silencedetection.c
silencedetection.c
chan_sip.c, res_rtp_asterisk.c
channel.c
Configuration
Add the ”cn” codec to allowed codecs in sip.conf
Add ”silencesuppression=yes” 

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.
1.
2.
Download roibos
svn checkout http://svn.digium.com/svn/asterisk/team/oej/roibos-cng-support-1.8"
cd roibos-cng-support-1.8

more README.roibos"
./configure"
make"
make install"
!
Test it and report bugs to the
bug tracker, as indicated in the
README file.
Issue: ASTERISK-23624
What next?
?
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.
F.A.Q.
Why 1.8?
Simply because that’s what we use in the project

this was developed for. Funding for porting it to

other releases is welcome.
Why
chan_sip?
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.
Why not
IAX2? chan_iax2 does not use RTP media framing.
Other RTP-channels
Most of this work is generic in
Asterisk. Other channels may benefit 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

Asterisk feature?
If you need a new Asterisk feature or want to 

get general Asterisk or Kamailio

support or training from Edvina, 

please contact us - info@edvina.net

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

Contenu connexe

En vedette

Granada 1878-g
Granada  1878-gGranada  1878-g
Granada 1878-g
amfelisa
 
Day 3 2nd_weekcris
Day 3 2nd_weekcrisDay 3 2nd_weekcris
Day 3 2nd_weekcris
cristiarnau
 
P O W E R P O I N T C I M DÀ L I G U E S
P O W E R  P O I N T  C I M  DÀ L I G U E SP O W E R  P O I N T  C I M  DÀ L I G U E S
P O W E R P O I N T C I M DÀ L I G U E S
guest1bf92f
 
Kevlin Henney Effective Design
Kevlin Henney Effective DesignKevlin Henney Effective Design
Kevlin Henney Effective Design
deimos
 
Research 101 - Effective Research with Google
Research 101 - Effective Research with GoogleResearch 101 - Effective Research with Google
Research 101 - Effective Research with Google
Andrew McCarthy
 
Forgotten Password
Forgotten PasswordForgotten Password
Forgotten Password
Con Morris
 
2007 development of a who growth reference for school aged children and adole...
2007 development of a who growth reference for school aged children and adole...2007 development of a who growth reference for school aged children and adole...
2007 development of a who growth reference for school aged children and adole...
Raul Rojas
 

En vedette (20)

Granada 1878-g
Granada  1878-gGranada  1878-g
Granada 1878-g
 
Day 3 2nd_weekcris
Day 3 2nd_weekcrisDay 3 2nd_weekcris
Day 3 2nd_weekcris
 
TV lecture: Technology
TV lecture: TechnologyTV lecture: Technology
TV lecture: Technology
 
P O W E R P O I N T C I M DÀ L I G U E S
P O W E R  P O I N T  C I M  DÀ L I G U E SP O W E R  P O I N T  C I M  DÀ L I G U E S
P O W E R P O I N T C I M DÀ L I G U E S
 
Job creation with audio
Job creation with audioJob creation with audio
Job creation with audio
 
'Advanced' Link Building
'Advanced' Link Building'Advanced' Link Building
'Advanced' Link Building
 
Kevlin Henney Effective Design
Kevlin Henney Effective DesignKevlin Henney Effective Design
Kevlin Henney Effective Design
 
The Social Web & Your Library
The Social Web & Your LibraryThe Social Web & Your Library
The Social Web & Your Library
 
Small Business and Social Media
Small Business and Social MediaSmall Business and Social Media
Small Business and Social Media
 
IA, UX and SEO
IA, UX and SEOIA, UX and SEO
IA, UX and SEO
 
Apresiasi NSPM Penataan Ruang (srn-ed07)
Apresiasi NSPM Penataan Ruang (srn-ed07)Apresiasi NSPM Penataan Ruang (srn-ed07)
Apresiasi NSPM Penataan Ruang (srn-ed07)
 
Research 101 - Effective Research with Google
Research 101 - Effective Research with GoogleResearch 101 - Effective Research with Google
Research 101 - Effective Research with Google
 
God
GodGod
God
 
Forgotten Password
Forgotten PasswordForgotten Password
Forgotten Password
 
Top50 Romania
Top50 RomaniaTop50 Romania
Top50 Romania
 
web2.0
web2.0web2.0
web2.0
 
Library 101 82208
Library 101 82208Library 101 82208
Library 101 82208
 
Mikstreet Pr-2010
Mikstreet Pr-2010Mikstreet Pr-2010
Mikstreet Pr-2010
 
2007 development of a who growth reference for school aged children and adole...
2007 development of a who growth reference for school aged children and adole...2007 development of a who growth reference for school aged children and adole...
2007 development of a who growth reference for school aged children and adole...
 
Nahum
NahumNahum
Nahum
 

Similaire à roibos-asterisk-bandwidth-saving

Fatah Uddin (072831056)
Fatah Uddin (072831056)Fatah Uddin (072831056)
Fatah Uddin (072831056)
mashiur
 
Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009
eCommConf
 
Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009
eCommConf
 
London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...
Kieran Kunhya
 

Similaire à roibos-asterisk-bandwidth-saving (20)

Asterisk security with kingasterisk
Asterisk security with kingasteriskAsterisk security with kingasterisk
Asterisk security with kingasterisk
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
200706 kathmann shared by voip.com.vn
200706 kathmann shared by voip.com.vn200706 kathmann shared by voip.com.vn
200706 kathmann shared by voip.com.vn
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of view
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Fatah Uddin (072831056)
Fatah Uddin (072831056)Fatah Uddin (072831056)
Fatah Uddin (072831056)
 
Internetix Video Kills
Internetix Video KillsInternetix Video Kills
Internetix Video Kills
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
DEFCON 23 - Ian Latter - remote access the apt
DEFCON 23 - Ian Latter - remote access the aptDEFCON 23 - Ian Latter - remote access the apt
DEFCON 23 - Ian Latter - remote access the apt
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009
 
Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009Jonathan Christensen's Presentation at eComm 2009
Jonathan Christensen's Presentation at eComm 2009
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...
 
Time Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux KernelTime Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux Kernel
 
RF Experiments in Raspberry Pi
RF Experiments in Raspberry PiRF Experiments in Raspberry Pi
RF Experiments in Raspberry Pi
 
Icecrypt
IcecryptIcecrypt
Icecrypt
 

Plus de Olle E Johansson

Plus de Olle E Johansson (20)

Cybernode.se: Securing the software supply chain (CRA)
Cybernode.se: Securing the software supply chain (CRA)Cybernode.se: Securing the software supply chain (CRA)
Cybernode.se: Securing the software supply chain (CRA)
 
CRA - overview of vulnerability handling
CRA - overview of vulnerability handlingCRA - overview of vulnerability handling
CRA - overview of vulnerability handling
 
Introduction to the proposed EU cyber resilience act (CRA)
Introduction to the proposed EU cyber resilience act (CRA)Introduction to the proposed EU cyber resilience act (CRA)
Introduction to the proposed EU cyber resilience act (CRA)
 
The birth and death of PSTN
The birth and death of PSTNThe birth and death of PSTN
The birth and death of PSTN
 
WebRTC and Janus intro for FOSS Stockholm January 2019
WebRTC and Janus intro for FOSS Stockholm January 2019WebRTC and Janus intro for FOSS Stockholm January 2019
WebRTC and Janus intro for FOSS Stockholm January 2019
 
Kamailio World 2018: Having fun with new stuff
Kamailio World 2018: Having fun with new stuffKamailio World 2018: Having fun with new stuff
Kamailio World 2018: Having fun with new stuff
 
Kamailio on air
Kamailio on airKamailio on air
Kamailio on air
 
Webrtc overview
Webrtc overviewWebrtc overview
Webrtc overview
 
Realtime communication over a dual stack network
Realtime communication over a dual stack networkRealtime communication over a dual stack network
Realtime communication over a dual stack network
 
The Realtime Story - part 2
The Realtime Story - part 2The Realtime Story - part 2
The Realtime Story - part 2
 
Sip2016 - a talk at VOIP2DAY 2016
Sip2016 - a talk at VOIP2DAY 2016Sip2016 - a talk at VOIP2DAY 2016
Sip2016 - a talk at VOIP2DAY 2016
 
Sips must die, die, die - about TLS usage in the SIP protocol
Sips must die, die, die - about TLS usage in the SIP protocolSips must die, die, die - about TLS usage in the SIP protocol
Sips must die, die, die - about TLS usage in the SIP protocol
 
SIP :: Half outbound (random notes)
SIP :: Half outbound (random notes)SIP :: Half outbound (random notes)
SIP :: Half outbound (random notes)
 
Kamailio World 2016: Update your SIP!
Kamailio World 2016: Update your SIP!Kamailio World 2016: Update your SIP!
Kamailio World 2016: Update your SIP!
 
SIP & TLS - Security in a peer to peer world
SIP & TLS - Security in a peer to peer worldSIP & TLS - Security in a peer to peer world
SIP & TLS - Security in a peer to peer world
 
Tio tester av TLS - Transport Layer Security (TLS-O-MATIC.COM)
Tio tester av TLS - Transport Layer Security (TLS-O-MATIC.COM)Tio tester av TLS - Transport Layer Security (TLS-O-MATIC.COM)
Tio tester av TLS - Transport Layer Security (TLS-O-MATIC.COM)
 
2015 update: SIP and IPv6 issues - staying Happy in SIP
2015 update: SIP and IPv6 issues - staying Happy in SIP2015 update: SIP and IPv6 issues - staying Happy in SIP
2015 update: SIP and IPv6 issues - staying Happy in SIP
 
TCP/IP Geeks Stockholm :: Introduction to IPv6
TCP/IP Geeks Stockholm :: Introduction to IPv6TCP/IP Geeks Stockholm :: Introduction to IPv6
TCP/IP Geeks Stockholm :: Introduction to IPv6
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.
 
RFC 7435 - Opportunistic security - Some protection most of the time
RFC 7435 - Opportunistic security - Some protection most of the timeRFC 7435 - Opportunistic security - Some protection most of the time
RFC 7435 - Opportunistic security - Some protection most of the time
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

roibos-asterisk-bandwidth-saving

  • 1. Silence suppression in Asterisk 1.8 
 - Codename Roibos oej@edvina.net * 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?
  • 2. This work is funded by Bressner Technology GMBH (bressner.de) that makes a series of Lync integration products. 
 
 They also distribute Industrial PCs that are excellent as Asterisk platforms.
 
 Thank you, Bressner, for contributing to Asterisk. Thank you If you use Asterisk,
 make sure you contribute back
 whenever possible. Thank you Josh and Matt for the support!
  • 3. An RTP session Alice Bob 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 speaks.
  • 4. With silence suppression Alice Bob CN CN When the sender detects silence, it sends a CN - Comfort Noise - request frame. After that no RTP traffic 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.
  • 5. 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 Silence
 detection Silence
 suppression Comfort Noise
 support in SDP and RTP Noise generator silencedetection.c silencedetection.c chan_sip.c, res_rtp_asterisk.c channel.c
  • 6. Configuration Add the ”cn” codec to allowed codecs in sip.conf Add ”silencesuppression=yes” 
 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. 1. 2.
  • 7. Download roibos svn checkout http://svn.digium.com/svn/asterisk/team/oej/roibos-cng-support-1.8" cd roibos-cng-support-1.8
 more README.roibos" ./configure" make" make install" ! Test it and report bugs to the bug tracker, as indicated in the README file. Issue: ASTERISK-23624
  • 8. What next? ? 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.
  • 9. F.A.Q. Why 1.8? Simply because that’s what we use in the project
 this was developed for. Funding for porting it to
 other releases is welcome. Why chan_sip? 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. Why not IAX2? chan_iax2 does not use RTP media framing.
  • 10. Other RTP-channels Most of this work is generic in Asterisk. Other channels may benefit too, as long as they are using RTP. Like chan_pjsip in 12 and the XMPP Jingle drivers. 
 Time to start coding?
  • 11. Do you need a new
 Asterisk feature? If you need a new Asterisk feature or want to 
 get general Asterisk or Kamailio
 support or training from Edvina, 
 please contact us - info@edvina.net
 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