Asterisk pbx voip s gateway to the future l.jpg
Sponsored Links
This presentation is the property of its rightful owner.
1 / 41

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


  • 97 Views
  • 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

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

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

  • 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

  • Integration of Data & Voice

  • Simplification

    • Less equipment management

  • Network Efficiently

    • Save on Bandwidth (silence suppression)

  • Cost Reduction

    • Bypass PSTN toll fees


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

  • 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

  • Overview of a VoIP connection:

  • Codecs supported by *

    • G.723 – 6.4kbps

    • G.729 – 8kbps

    • G.711 – 64kbps


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

Uses Internet URLs

  • Supports both Internet and PSTN addresses

  • General form is [email protected]

  • To complete a call, needs to be resolved down to [email protected]

  • Examples:

    sip: [email protected]

    sip:Alex Home <[email protected]>

    sip:[email protected];user=phone

    sip:[email protected]


VoIP: SIP Call Setup

SIP

User Agent

Client

SIP

User Agent

Server

INVITE sip:[email protected]

200 OK

ACK

RTP Stream

BYE

200 OK

142.55.55.202

pbx.ayalanetworks.com


VoIP: SIP Requests

Example: INVITE


VoIP: SIP REGISTER

Session Initiation Protocol

Request line: REGISTER sip:pbx.ayalanetworks.com SIP/2.0

Method: REGISTER

Message Header

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

From: Alex <sip:[email protected]>

To: Alex <sip:[email protected]>

Contact: "Alex Ipaq" <sip:[email protected]:5060>

Call-ID: <random seed>@pbx.ayalanetworks.com

CSeq: 43034 REGISTER

Expires: 1800

Max-Forwards: 70

User-Agent: X-Lite build 1082

Content-Length: 0


VoIP: SIP INVITE

Session Initiation Protocol

Request line: INVITE sip:[email protected] SIP/2.0

Message Header

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

From: Alex Home <sip:[email protected]>;tag=<omit>

To: <sip:[email protected]>

Contact: <sip:[email protected]:5060>

Call-ID: <omit>@142.55.55.202

CSeq: 23277 INVITE

Max-Forwards: 70

Content-Type: application/sdp

User-Agent: X-Lite build 1088

Proxy-Authorization: Digest

username="3001",realm="asterisk",nonce=4c3e876b,

response=“<hash>”,uri="sip:[email protected]"

Content-Length: 297


VoIP: SDP

Session Description Protocol Version (v): 0

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

Session Name (s): X-Lite

Connection Information (c): IN IP4 142.55.55.202

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


VoIP: SIP Responses (cont)

Required Fields:

SIP/2.0 200 OK

Via: SIP/2.0/UDP 142.55.55.202:5060

From: Alex Home <sip:[email protected]>

To: <sip:[email protected]>

Call-ID: <omit>@142.55.55.202

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

  • 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

ENCRYPTION

  • SIP offers various approaches

    • End 2 end encryption

    • Hob by hop encryption

      AUTHENTICATION

  • 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?

  • 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

  • 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


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

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

    extensions.conf

    [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)

sip.conf

[4001]

Username=4001

Context=from-sip

extensions.conf

[from-sip]

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

exten => 1001,2,Voicemail2(u1001)


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 e164.arpa)

    • 905-845-9430  0.3.4.9.5.4.8.5.0.9.e164.arpa


Asterisk: Enum Example


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)

  • 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


Convenient, unambiguous single

non-alphanumeric abbreviation: *

Number 10


Number 9

Dial-an-MP3


Number 8

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


Number 7

Only way to build a call center on your laptop


Number 6

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


Number 5

You can have a 31337 answering machine.


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

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


Number 2

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


Number 1

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

astmaster like me!


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

Telecom Class ‘03


  • Login