Asterisk - KReSIT Convergence
Download
Report
Transcript Asterisk - KReSIT Convergence
Asterisk and VoIP issues
Chetan Vaity
March 2007
Copyrights © 2006. All rights Reserved.
What is Asterisk
Asterisk is an open source software IP PBX
Digium is the primary developer and sponsor of Asterisk
In addition, Digium develops PBX hardware and provides contract support
and development services for Asterisk
Protocols
SIP (Session Initiation Protocol)
SIP is primarily used in setting up and tearing down voice calls
Media protocols
RTP
RTCP
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Getting started…
Get a Linux box
Install Asterisk
Get source from http://www.asterisk.org/
Create SIP users by adding entries to
sip.conf
Modify the dialplan by editing
extensions.ael
Install softphones on client computers
and register
Try X-Lite 3.0 from http://www.xten.com/
Make a call!
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Getting started…
Example of a user entry in sip.conf
[user1]
secret=123user1
type=friend
host=dynamic
context=sipextensions
mailbox=301
callerid="user1" <301>
dmtfmode=rfc2833
canreinvite=yes
Example dialplan in extensions.ael
context sipextensions {
301 => {
Dial(SIP/user1);
Hangup();
};
302 => {
Dial(SIP/user1);
Hangup();
};
};
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Asterisk features
Connect to the PSTN world
Hardware - PCI cards from Digium to connect to analog PSTN or digital
(PRI) lines
Asterisk can then act as a VoIP to PSTN gateway.
Feature-rich and Extensible
Extension patterns
Conference, Voicemail
Recording
TTS integration with Festival
AGI – Run your own programs!
Say cricket score
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Voice Quality
Bad links
Packet loss
Media goes over UDP
Jitter
Delay
Disordered packet arrivals
Codecs should be resistant to packet loss
iLBC used by Skype, GoogleTalk etc. (developed by GIPS)
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Delay and Jitter
A delay of less than 150 ms is acceptable and usually goes unnoticed
by humans
With delay greater than 400 ms, conversation starts becoming irritating
Coder delay is the time taken to compress a block of PCM samples
This delay varies with the codec used and processor speed
For G.729, delay is around 30ms
Packetization delay is the time taken to fill a packet payload with
encoded speech
Queuing delay and Propagation delay at various network components
Jitter buffer delay
Variation in delay of packets is called Jitter
The effects of jitter can be mitigated by storing voice packets in a buffer
upon arrival, before playing out
Increases delay by the length of the buffer
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Echo
Echo in telephony systems is caused by two main phenomena
Electrical echo due to imperfect impedance matching
Acoustic echo due to microphone pickup of audio output
Echo becomes noticeable only when there is a delay between speaking
and hearing your voice echoed. (more than about 50 ms)
In PSTN calls, there is always echo, but it remains unnoticed because
the delay is quite small
VoIP intrinsically has packetization, depacketization and processing
delays built into its protocols
VoIP phones don't cause echo. They just make it audible by introducing an
extra delay
Echo cancellation: Subtract from the received signal
Based on the response of the system to a short spike of sound
Echo cancellation is a hugely CPU-intensive process
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Advantages of VoIP
Reduction in costs
Uses the internet for long distance calls
Uses underutilized existing network capacity
Functionality
Especially for computer users – (click on name to call)
Merging of Data and Voice infrastructures
No need for separate cabling
Mobility
Wherever you are connected to the Internet, you can receive VoIP calls
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com
Disadvantages of VoIP
Quality
Due to low/variable bandwidth
Echo
Internet connection
VoIP usage is entirely dependent on the quality, reliability and speed of the
internet connection
If the net is down, you have no telephony
Power
No phone calls in a power outage
Security (lack of it)
Anyone listening on the LAN can potentially capture packets and
reconstruct the conversation
Copyright © GS Lab 2006-7. All rights Reserved. http://www.gslab.com