Asterisk PBX: VoIP’s gateway to the future - PowerPoint PPT Presentation

Asterisk pbx voip s gateway to the future l.jpg
1 / 41

  • Uploaded on
  • Presentation posted in: General

Asterisk PBX: VoIP’s gateway to the future. By Alex Ayala For Telecom class of 2003. Agenda. Introduction to VoIP Benefits Challenges CODECS Session Initiation Protocol Asterisk PBX Demonstration. What is VoIP?. Based on packet switching technology using Internet as transport

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Asterisk PBX: VoIP’s gateway to the future

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Asterisk pbx voip s gateway to the future l.jpg

Asterisk PBX: VoIP’s gateway to the future

By Alex Ayala

For Telecom class of 2003

Agenda l.jpg


  • Introduction to VoIP

    • Benefits

    • Challenges

    • CODECS

  • Session Initiation Protocol

  • Asterisk PBX

  • Demonstration

What is voip l.jpg

What is VoIP?

  • Based on packet switching technology using Internet as transport

  • Opposed to the traditional circuit switching technology, which dominates the Public Switched Telephone Network (PSTN)

  • Driven by low cost; flat-rate billing

  • So why haven’t we switch to VoIP??

Voip benefits l.jpg

VoIP: Benefits

  • Integration of Data & Voice

  • Simplification

    • Less equipment management

  • Network Efficiently

    • Save on Bandwidth (silence suppression)

  • Cost Reduction

    • Bypass PSTN toll fees

Voip challenges l.jpg

VoIP: Challenges

  • 3 main factors affect the quality of voice

    • Latency

    • Jitter

    • Packet Loss

  • If cost is the only criteria Managers/Administration would be only ones who wouldn’t mind bad voice quality. Employees won’t compromise quality to reduce company’s bills.

Voip quality of voice l.jpg

VoIP: Quality of Voice

  • Quality of CODEC

    • give good quality low delay

  • Echo cancellation

    • 2 wire -> 4 wire PBX (hybrid circuit used for conversion)

    • if delay > 10mS echo is notice

  • Delay

    • Total Delay ( > 200mS one-way; talkers overlap )

    • Jitter ( variable packet arrival )

    • Delay Management

      • Prioritize (RSVP)

      • Packet replay (Jitter buffer)

      • Segmenting data packets (exit router faster)

Voip codecs l.jpg


  • Overview of a VoIP connection:

  • Codecs supported by *

    • G.723 – 6.4kbps

    • G.729 – 8kbps

    • G.711 – 64kbps

Voip protocols l.jpg

VoIP: Protocols

  • RSVP (Resource ReSerVation Protocol)

  • RTP (Real Time Protocol)

  • RTCP (Real Time Control Protocol)

  • SIP (Session Initiation Protocol)

  • SDP (Session Description Protocol)

Voip sip addressing l.jpg

VoIP: SIP Addressing

Uses Internet URLs

  • Supports both Internet and PSTN addresses

  • General form is name@domain

  • To complete a call, needs to be resolved down to User@Host

  • Examples:


    sip:Alex Home <>;user=phone

Voip sip call setup l.jpg

VoIP: SIP Call Setup


User Agent



User Agent



200 OK


RTP Stream


200 OK

Voip sip requests l.jpg

VoIP: SIP Requests

Example: INVITE

Voip sip register l.jpg


Session Initiation Protocol

Request line: REGISTER SIP/2.0


Message Header

Via: SIP/2.0/UDP142.55.31.239:5060;rport;branch= <omit>

From: Alex <>

To: Alex <>

Contact: "Alex Ipaq" <sip:3004@>

Call-ID: <random seed>

CSeq: 43034 REGISTER

Expires: 1800

Max-Forwards: 70

User-Agent: X-Lite build 1082

Content-Length: 0

Voip sip invite l.jpg


Session Initiation Protocol

Request line: INVITE SIP/2.0

Message Header

Via: SIP/2.0/UDP;rport;branch=<omit>

From: Alex Home <>;tag=<omit>

To: <>

Contact: <sip:3001@>

Call-ID: <omit>@

CSeq: 23277 INVITE

Max-Forwards: 70

Content-Type: application/sdp

User-Agent: X-Lite build 1088

Proxy-Authorization: Digest



Content-Length: 297

Voip sdp l.jpg


Session Description Protocol Version (v): 0

Owner/Creator, Session Id (o): 3001 173802875 173802875 IN IP4

Session Name (s): X-Lite

Connection Information (c): IN IP4

Time Description, active time (t): 0 0

Media Description, name and address (m): audio 8000 RTP/AVP 0 8 …

Media Attribute (a): rtpmap:0 pcmu/8000

Media Attribute (a): rtpmap:8 pcma/8000

Media Attribute (a): rtpmap:3 gsm/8000

Media Attribute (a): rtpmap:98 iLBC/8000

Media Attribute (a): rtpmap:97 speex/8000

Voip sip responses l.jpg

VoIP: SIP Responses

Voip sip responses cont l.jpg

VoIP: SIP Responses (cont)

Required Fields:

SIP/2.0 200 OK

Via: SIP/2.0/UDP

From: Alex Home <>

To: <>

Call-ID: <omit>@

CSeq: 23278 INVITE

  • These are copied from the request corresponding to 200 OK

  • To and From are NOT swapped

  • CSeq is incremented by 1

Voip sip routing l.jpg

VoIP: SIP Routing

  • VIA headers are used for routing SIP messages

  • Requests

    • Request Initiator puts address in VIA header

  • Responses

    • Response initiator copies request VIA header

Voip sip security l.jpg

VoIP: SIP Security


  • SIP offers various approaches

    • End 2 end encryption

    • Hob by hop encryption


  • Proxies might require auth

    • Responds to INVITE with 407 proxy auth req.

    • Client re-INVITE with Proxy Authorization header

  • UAS/Registrars might require auth

    • Responds to INVITE with 401 unauthorize

    • Client re-INVITE with Authorization header

Asterisk what is it l.jpg

Asterisk:What is it?

  • A complete PBX software for Linux platform developed by Digium (M.S.)

  • Does PBX call switching, CODEC translation, and various applications

  • Open Source under GNU license

Asterisk applications l.jpg

Asterisk: Applications

  • Voicemail

  • Dial an interface (ZAP, SIP, IAX, etc)

  • Conference Bridging

  • ACD Queues (great for Call centres)

  • IVR ( press “1” if you know the ext)

  • DB operations

  • ENUMlookup

  • AGI (asterisk gateway interface, like CGI)

    • For advance scripting

Asterisk overview l.jpg

Asterisk: Overview

Asterisk call logic l.jpg

Asterisk: Call Logic

  • Asterisk uses a State Machine to determine what to do with a Call

    • Context : The Origin of the call (SIP, PSTN, etc)

    • Extension: The number Dialed by user

    • Priority: A counter that orders a sequence of commands

Asterisk call logic example l.jpg

Asterisk: Call Logic Example

  • A user dials 3001, which is extension for Voicemail Central. The user is define in context => local



    exten => 3001,1,Voicemailmain2

  • A sip user (4001) dials 1001 which is an analog phone (Zap/1), and drop in voicemail if unavailable (no one answers for 30 secs)







exten => 1001,1,Dial(Zap/1,30)

exten => 1001,2,Voicemail2(u1001)

Asterisk enum l.jpg

Asterisk: ENUM

  • A PSTN user wants to call a SIP user? Only have a dialpad. How to dial a URI?

  • ENUM. Creates a global directory which map telephone number to sip address (or email ).

  • DNS lookup (E.164 -> URIs)

  • E.164 queries are formed as reversed dot-separated digits and attach the enum.domain.tld at the end (usualy

    • 905-845-9430 

Asterisk enum example l.jpg

Asterisk: Enum Example

Asterisk iax l.jpg

Asterisk: IAX

  • Inter-Asterisk eXchange used by Asterisk as an alternative to SIP, H.323, etc

  • Supports PKI-style security and trunking

  • When trunking, it allocates BW in used only

  • Quality is similar to SIP, but as connections increase IAX (in trunk mode) becomes better.

  • Versions: IAX and IAX2

Asterisk iax cont l.jpg

Asterisk: IAX (cont)

  • IAX is NAT/PAT transparent

  • IAX2 trunking triples per megabyte

    • 100 calls/MB (with G.729)

  • Over 1000 iaxtel registered users (like FWD)

Top ten reasons to run asterisk l.jpg

Top Ten Reasons to Run Asterisk

Convenient unambiguous single non alphanumeric abbreviation l.jpg

Convenient, unambiguous single

non-alphanumeric abbreviation: *

Number 10

Number 9 l.jpg

Number 9


Number 8 l.jpg

Number 8

Can call you 5 minutes into a blind date as 'emergency exit'

Number 7 l.jpg

Number 7

Only way to build a call center on your laptop

Number 6 l.jpg

Number 6

Teleconferencing with your friends allows you to be more lazy/unsocial than you already are

Number 5 l.jpg

Number 5

You can have a 31337 answering machine.

Number 4 l.jpg

Number 4

Finally you can tell telemarketers , “all representatives of our household are busy attending other telemarketers, your call will be answer in order of received”.

Number 3 l.jpg

Number 3

Answer unwanted calls (ex-girlfriend) with a looping IVR “press 1 to speak to Alex…<beep>..Invalid option, please try again…”

Number 2 l.jpg

Number 2

Have screaming parents,siblings,etc after they can’t call long distance,…Password protected.

Number 1 l.jpg

Number 1

Why settle for being just another webmaster, hostmaster, or postmaster when you too can be an

astmaster like me!

Asterisk demo l.jpg

Asterisk: Demo

  • 2 Asterisk servers

  • 4 Sip clients , 4 local phones (2 in each server)

  • IAX2 trunk between servers

  • Both will act as sip proxies

  • Server A is connected to PSTN via FXO

  • Using ENUM for least cost routing

Thank you l.jpg


Telecom Class ‘03

  • Login