Azure Monitor & Application Insight to monitor Infrastructure & Application
Wideband Audio Conferencing with Asterisk
1. AG Projects ICE: the ultimate way of beating NAT in SIP
The SIP Infrastructure Experts
AstriCon 2010
Wideband Audio Conferencing with Asterisk
Saúl Ibarra Corretgé | AG Projects
Because G711 is not enough
2. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Index
● What is Wideband voice?
● Should I use Wideband anyway?
● Asterisk wideband capabilities
● Conference calls with Asterisk
● Testing and results
3. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
What is Wideband voice?
● Higher quality voice
● Higher detailed voice
● Richer sound
Nothing new! G722 is from 1988!
4. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
What is Wideband voice? (II)
● Human voice ranges from 30 to 18000 Hz
● The more frequencies we transmit the
richer the voice is
5. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
What is Wideband voice? (III)
● Nyquist sampling theorem
● If we want to transmit X amount of frequencies
they need to be sampled at 2X sample rate
● G711
● ~50 – 4000 Hz -> 8000 Hz sample rate
● G722
● ~0 – 7000 Hz -> 16000 Hz sample rate
6. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
What is Wideband voice? (IV)
How can G711 and G722 use same
bitrate (64 kbps) then?
● G711
● Uses PCM. 8 bits per sample * 8000 samples =
64 kbps
● G722
● Uses SB-ADPCM
– 48 kbps for the lower band
– 16 kbps for the higher band
7. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
What is Wideband voice? (V)
8. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Should I use Wideband anyway?
Short answer: yes.
Long(er) answer: yes, of course.
● “Cleaner” sound
● Easier way to identify voices
● Clearer diference between close sounds: “sailing” vs “failing”,
etc.
● Just don't say “what?” ever again.
25% of calls at SIP2SIP.info use wideband
Only 2% did use wideband same period last year
9. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Asterisk codec capabilities
Narrowband codecs
● G711
● GSM
● G729
● iLBC
● G723.1
● G726
● ...
Wideband codecs
● G722
● G722.1 (Siren 7 and Siren
14)
● Speex 16 KHz (new in 1.8!)
● G719 passthrough (new in
1.8!)
10. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Conferencing
Multiple callers involved in a single call
11. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Conferencing (II)
● Client side
● Server side
● Hosted service
12. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Asterisk conferencing capabilities
Asterisk supports several channel independent
applications for conferencing:
● MeetMe
● It's been around since forever
● Mixing is done in DAHDI really
● No wideband support (mixing is done in
DAHDI at 8 Khz)
13. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Asterisk conferencing capabilities (II)
● ConfBridge
● New as of Asterisk 1.6.2
● Uses “new” Brdging API
● No DAHDI needed
● Wideband capable!
● Can do mixing at 16 Khz or 8 Khz, but not both
● Not as many options as MeetMe... yet!
14. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Asterisk conferencing capabilities (III)
● AppKonference
● Third party application
● Fork of AppConference, around since Asterisk
1.0.x
● No DAHDI required
● Wideband capable!
● Video capable!
● Not working with Asterisk 1.8 yet
15. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
A note on timing sources
● Full explanation on doc/timing.txt
● Asterisk supports several sources which can be used to
provide internal timing
● res_timing_timerfd
– Only available on Linux systems with Kernel >= 2.6.25 & glibc >=
2.8
– Very reliable source of timing
● res_timing_kqueue
– Only available on BSD systems (yes, also works on the Mac)
● res_timing_dahdi
– Uses DAHDI to provide timing
● res_timing_pthread
– Uses the pthread library to provide timing
– Least efective, but more portable
16. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
ConfBridge
● No confguration fle
● Smart bridging: 2 party and multiparty mixing
● Be careful, you can't mix diferent sample rates
● Inbound codec can't be forced
● Not as complete as MeetMe...
● ... I'm sure patches would be welcome :-)
exten => _*7XXXX,1,NoOp(Entering conference ${EXTEN:4})
same => n,Answer
same => n,ConfBridge(${EXTEN:4},M)
17. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
AppKonference
● No confguration fle
● Inbound codec can't be forced
● Minimize encoding/decoding
● One speaker: frames sent directly to each
participant. Frames transcoded once per codec type
● Two speakers: each speaker gets the other speakers
frames. The two speakers frames are then mixed
and transcoded once per codec type
exten => _*7XXXX,1,NoOp(Entering conference ${EXTEN:4})
same => n,Answer
same => n,Konference(${EXTEN:4},H)
18. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Testing
● See how diferent options perform in terms of
CPU usage
● AppKonference
● ConfBridge (with TimerFD timing)
● ConfBridge (with Pthreads timing)
● Test scenarios (always 50 users)
● 1 speaker
● 2 speakers
● Everyone speaking, madness!
19. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Tools
● pcapsipdump: capture SIP + RTP in PCAP format
discarding everything else
● Wireshark: edit captured PCAP
● SIPp: SIP + RTP trafc generation
● sysstat: system stats generation
● OpenOfce: graphics. It sucks, btw.
● Human hear
● Hardware
● Code2Duo desktop computer with 8GB of DDR3 RAM
● Gigabit Ethernet
24. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Results analysis
● AppKonference had more audio cuts (according to
Human Hear TM)
● Short audio-loss when lots of calls were starting
(ConfBridge)
● Overall TimerFD performed better than Pthread
● AppKonference was tested on a diferent
release version
● With 50 speakers AppKonference produces no
audio at all
● ConfBridge doesn't have as many features as
good old MeetMe
25. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Recap
● Wideband can make our conference calls more
understandable
● With G722 we use same bandwidth as G711
● Asterisk provides all the necesary tools for a
nice and wideband conference call experience
● ConfBridge looks like the way to go
● All hardware devices involved need to
support wideband
26. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Spam!
● Join the VoIP Users Conference!
● Every friday at 12:00 EDT
● Highly skilled speakers talking about VoIP
● Anyone can join the conference!
● In G722, of course!
http://vuc.me
27. AG Projects Wideband Audio Conferencing with Asterisk
The SIP Infrastructure Experts
AstriCon 2010
Questions?