36
IP Telephony Sunday A. Folayan

IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Embed Size (px)

Citation preview

Page 1: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

IP Telephony

Sunday A. Folayan

Page 2: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Disclaimer

I am NOT an expert in VoIP technology

I am NOT PRETENDING to be one.

I am a user who just got interested in the technology. … and its Cool

What I say may not be what it is, but how I understand it.

Do not believe what I say wholesome, but seek your own understanding

Page 3: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Paradigm Shift

• In the beginning … geeks struggled to convert data (IP) into sound, and move it over plain old telephone system (POTS) infrastructure [using MODEMs]

• Now … geeks are struggling to convert sound into data, and move it over well established IP links. [using CODECs]

• Yes of Course … suits smile to the bank …

Page 4: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

So …What is IP Telephony?

The packetisation and transport of classic public switched telephone system audio over an IP network.

The analog audio stream is encoding in a digital format, with possible compression and filtering, before encapsulating it in IP for transport over your LAN/WAN or the public internet Infrastructure

We can (safely) inter-use IP Telephony and Voice over IP (VoIP)

Page 5: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

TCP vs VoIP

VoIP is not a protocol. VoIP is a collection of protocols and devices that allow for the encoding, transport and routing of audio calls over IP networks.

VoIP VoIP [P2P, Skype, Messanger]

VoIP PSTN [Net2Phone]

PSTN VoIP PSTN [ITXC]

Page 6: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

That Simple?

• No!! Imagine paying for Internet Access, by Traceroute. VoIP is incompatible with PSTNs’ charge model

• PSTNs traditionally (Graham Bell Era) stuff a single call on a single cable pair … and charge for 1 pair!

• PSTNs now stuff multiple calls on a single cable pair using a technique called Time Division Multiplexing (TDM) and charge as multiple pairs!!

– BRI, PRI, ISDN, E1 T1 etc are all TDM technologies with diverse switching and Trunking technologies

Page 7: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Cisco ATA

IP Phone

RAD TDMoIP

POTS

Voice

PSTN2

PSTN1

IPISP2

ISP1

Domains

??

TDM

PRI

FXS/FXO

Channel Bank

FXS/FXO

Page 8: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

VoIP Building block

VoIP is not built on TCP, but RTP• RTP (Real-Time Transport Protocol)• RTCP (Real-Time Control Protocol)

– RTP is a UDP stream with no intelligence for QOS or resource reservation

– Contains a packet number for detection of packet loss and re-sequencing of out of order packets.

– Unidirectional : two streams in any call

Page 9: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

VoIP Building block

• Calls are CODed to IP or DECoded from IP.• CODECS vary in sample size, usually Kbits

per second• Decoding can include echo cancellation• Decoding can compensate for jitter• IP routers do not need to decode voice

passing through them

Page 10: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

VoIP Building block

Sample CODEC Sizes– G711alaw 64k– G711ulaw 64k– ILBC 15k– Speex 2.15 – 44.2k– Gsm 13k– G729 8k– G723 5.3 - 6.3k– Iax2 (trunked) 4k

Page 11: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

FreeworldDialup

Psg.com

asterisk Server

Psg.comDB based

subscribers

Query

NAPTR

Fixed Line

PSTN

Mobile Telco

AS5300

Call forwardingto AS 5300

Invite:[email protected]

PRI: +43 1 79564

[email protected]

[email protected]

[email protected]

[email protected]

Roaming

+27 217 451230

Mobile operator .sn

HP Ze5500

[email protected]

ENUMlookup

TESPOK SIP Proxy

e164.arpa

dns ENUMtree

A wide choice of Providers and paths

Page 12: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Control Protocols

• H323 – Complex, multiple flow, ancient– Has a large install base

• Session Initiation Protocol (SIP)– New, simple, only sets up RTP streams

• Cisco Skinny (Propritary)– Allows complete phone customization

• MGCP (mediatrix Gateway Control Protocol)– Went the way of AMIGA. Good but Not widely deployed

because it was initially close source • IAX (Inter-Asterisk eXchange)

– Simple, transverses NAT, Compessed

Page 13: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

SIP• SIP is responsible for the increased use of

VoIP • Supports Video • There's lots of hardware SIP units available

– Grandstream BT-101/2– Cisco 79xx )

• Not suited for Trunking (pbx to pbx)• SIP messages are HTTP-like and readable

Page 14: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

IAX(2)• Inter Asterisk Exchange

• Not many Hardware phones support IAX.

• Soft Clients available for *unix/Windows

• Works behind NAT

• Has Trunking support built in

• Very low bandwidth requirement

• Built for asterisk

Page 15: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Phones• Hard phones

– Cisco 79XX’s– Grandstream BT 10X’s– Snom 100/200’s– LOTS of h.323 phones from .tw ;-)– Many other phones

Page 16: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Phones• Soft phones

– X-lite - www.xten.com (Windows)– Lipz - www.lipz4.com (Linux)– DIAX– Gnophone– Linphone - www.linphone.org (FreeBSD)– Sjphone– Lots of others

Page 17: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Most IP phones can work Peer to Peer

It is the Ability to use a PC as switch or PBX that really makes VoIP rock!! Simply loading a software PBX on a PC offers new possibilities …

Page 18: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

PBX Software

Cisco Call Manager– Closed Source– 13 16 CD’s– Web Interface– Requires CCNA to setup– Needs extremely powerful Server– Leaves PRI/FXO/FXS to other devices

Asterisk– Open Source– Uses industry-wide devices and equipment

Page 19: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Asterisk is a ….

• Telephony gateway (TDM - PRI,POTS)

• VoIP Gateway (IP channels)

• IVR system (Interactive Voice Response)

• Voicemail system

• Meetme Conference system

• Scriptable telephony-to-anything (Perl, C, etc.)

• Automatic Call distribution (ACD) system

Page 20: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Asterisk is not …

• A billing system

• A CRM system

• A web server or XML server (re: Cisco 79xx)

• A configuration tool for VoIP devices

• A voice recognition system

• A USENET or email client

Page 21: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

System Requirements

• No clear rule of thumb on processor size; at least 400mhz PIII recommended

• Almost any version of Linux supported; RH 7.x or 8 is dev platform (9 has some issues)

• Source + binaries (including sounds) are ~35m• Using complex codecs (i.e.: G.729, speex, etc.) will

increase processor load dramatically• Best to have a >1.5ghz machine for multi-channel

use• Linux preferred, though FreeBSD slowly starting to

become stable for non-hardware channels

Page 22: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Channel types - non-IP

• POTS cards (Digium, Zapata, Voicetronix, etc.)• TDM Digital (AdTran VoFR, Digium E1/T1,

etc.)• CAPI (ISDN card support for Linux ISDN

driver)• USB dongle for FXS• Modem drivers for certain modems• Speaker/headphones via soundcard

Page 23: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Configuration options

• SOHO Users– FXO

• Plugs straight into the phone line– Wildcard X100P Zapata cards

– Internet jack

– A few others

– ISDN• Three Major ways of doing this with asterisk

– ISDN4L

– CAPI

– BRI

Page 24: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Configuration options

• Business Users– BRI IDSN

• Two Major ways of doing this with asterisk– CAPI

– BRI

– PRI ISDN– Single T1 or E1 Cards

– 4 port T1 or E1 cards

Page 25: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Basic Configuration

1. Load Appropriate drivers [None is needed for IP or soft phone]

1. Configure modules.conf

2. Configure either sip.conf or iax.conf

3. Configure extensions.conf

2. Start Asterisk

3. Make calls!

Page 26: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Call Flow

• Calls come in on channels and are then handed to the “extensions.conf” file, which is the dialplan

• Dialplan contains logical sections of matches called ‘Contexts,’ and each channel sends a call into the dialplan with a context name and a dialed number

• The dialplan then matches (with modified regexp’s) the number being dialed, and runs applications accordingly

• Each match on the dialed number has an order of steps called ‘Priorities’, and are indicated with an integral incrementing number (BASIC-like)

Page 27: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Regular expressions (briefly)

• All regular expressions start with “_” character in dial examinations.

• “X” means any number, “N” is any number other than 0 or 1

• “.” means any number of characters• Brackets represent groups, with standard “-” and

“,” meanings ([1-9] or [0,1,2])• Example: _1410985012X is the same as

_1410985012[0-9]

Page 28: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Call Flow (cont’d)

[afnog]exten => 141,1,Answerexten => 141,2,Wait(2)exten => 141,3,Playback(monkeys)exten => 141,4,Goto(conference,123,1)

[noc]exten => _12X,1,Playback(sorry-no-more)exten => _12X,2,Hangup

Page 29: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Variables

• ${VARNAME} is how variables are used• Variables must be declared before Booleans can

be performed (gah - no null value comparitor)• Variables can be nested during setting

– Exten => 123,1,SetVar(BAR=blah)– Exten => 123,2,SetVar(FOO=3)– Exten => 123,3,SetVar(NEWVAR.${FOO} = $

{BAR})– This results in ${NEWVAR.3} being set to “blah”

Page 30: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Special Variables

• ${EXTEN} - always the most important variable. This is the number that is being currently evaluated.

• ${CALLERIDNUM} - the ANI (if available) of the call leg that is creating the call

• Some others, less used: ${EPOCH}, ${ENV(var)}, ${CONTEXT}, ${PRIORITY}, several other descriptors of the call leg we’re processing

Page 31: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Some Applications

• Dial - connects an inbound call with some other channel. Need to specify the technology (SIP, Zap, H323, etc.) the number to be dialed, the Ring-No-Answer delay, and options (if desired)

exten => 1234,1,Dial(SIP/1234,25)exten => 1234,2,Voicemail2(u1234)

Page 32: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Some Applications (cont’d)

• Playback(filename)– Plays a sound file in .gsm format

• Background(filename)– Plays a sound file and gets (touch tone) input

• MeetMe(conf#)– Adds the caller to a conference room (optionally muted or

unmuted)[test]exten => 123,1,Background(press-a-number)exten => 123,2,Goto(1)exten => _X,1,SayDigits(${EXTEN})

Page 33: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Some Applications (cont’d)

• DISA– Lets callers from one channel get dialtone on another

channel

• SetMusicOnHold– You can specify .mp3 files as music on hold

selections (random or sequential)

• MP3Player– You can specify files or streams of .mp3 to be played

to callers.

Page 34: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Practical Uses (office)

• Ditch your LD company (see prior slide)• Interconnect office PBXs at zero network cost• Get “Unified Messaging” • Give ubiquitous access to the PBX for

home/traveling employees• Disaster recovery scenarios• Move phones into your IT department and away

from your expensive PBX consulting firm• Eliminate adds/moves/changes as physical chores

Page 35: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

Advanced Topics

• Call queues - you can build a call center with Asterisk, with various call weightings and agent logins/hot seating

• Multi-ring, cascading ring with different technologies (inbound calls forward to your desk line and your cell phone - first answer gets it)

• Multi-language support with same dialplan• Festival integration for voice synthesis

Page 36: IP Telephony Sunday A. Folayan. Disclaimer I am NOT an expert in VoIP technology I am NOT PRETENDING to be one. I am a user who just got interested in

References ….• http://www.asterisk.org/• http://www.digium.com/• http://www.loligo.com/asterisk/• http://www.wwworks-inc.com/asterisk/• http://www.xten.com/• http://www.onlamp.com/pub/a/onlamp/2003/07/03/asterisk.html• http://www.nznog.org/crigby-voip-intro.ppt• http://www.loligo.com/asterisk/misc/presentations/asterisk-

overview.v1.0.ppt• http://docbox.etsi.org/tispan/open/enum-workshop-20040224-sophia/

08.%20r%20stastny%20austria_v4.ppt• http://www.ietf.org/proceedings/03jul/slides/enum-3/enum-3.ppt• http://www.ispa.at/downloads/c8431676f72b_2003-

05_ispa_enum_voip_stastny.ppt• www.voip-info.org