Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications”...

33
www.convergencetechnologycenter. DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary Systems, Inc. [email protected]

Transcript of Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications”...

Page 1: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

www.convergencetechnologycenter.org DUE 402356

Asterisk“The Future of Telecommunications”

Vincente D’IngianniDirector of Professional ServicesBinary Systems, [email protected]

Page 2: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

2 www.convergencetechnologycenter.org

What is Asterisk?

Asterisk is a complete VoIP Softswitch, designed to reproduce the features of standard office PBX system.

Asterisk is also a Voice over IP toolkit which allows interaction between these PBX features and IP-based networks (local and remote.)

Asterisk is hardware independent, and is designed to run on numerous operating systems.

Page 3: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

3 www.convergencetechnologycenter.org

Mark Spencer – Creator of Asterisk

Mark Spencer and Vincente D’Ingianni presenting at SIP Sizzles 2003

Page 4: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

4 www.convergencetechnologycenter.org

Proprietary API

Media Gateways / Endpoints

MGCP

PCI Bus Ethernet

SCCPH.323

Asterisk

IAX

EthernetEthernet

SIP

Asterisk Softswitch System Architecture

Page 5: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

5 www.convergencetechnologycenter.org

Asterisk Capabilities

Telephony gateway (TDM channels - PRI,POTS)

VoIP Gateway (IP channels)

IVR system (Interactive Voice Response)

Voicemail System

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

much, much more…

Page 6: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

6 www.convergencetechnologycenter.org

Asterisk is not…

A Billing system A CRM system A web server or XML server A configuration tool for VoIP devices A voice recognition system A USENET or email client

…but it is often bundled with these subsystems to form a complete solution.

Page 7: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

7 www.convergencetechnologycenter.org

Asterisk Goals

Provide Open-Source implementations of basic PBX functionality

Be vendor neutral (despite last point here) Be as all-encompassing as possible for features Be flexible and provide hooks for advanced features Move proprietary hardware features into open

source software (HMP functionality) Integrate with 3rd party telephony hardware devices

(DSP functionality) Sell TDM hardware cards for Digium

Page 8: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

8 www.convergencetechnologycenter.org

Who is Digium? Primary supporter of Asterisk development. Owner of the CVS server/bug system/mailing

list boxes/etc. Approves all patches and features by

community Produces TDM cards (“Wildcard” hardware)

which works particularly well with Asterisk Owner of the disclaimers for all contributions

to Asterisk, holder of copyright

Page 9: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

9 www.convergencetechnologycenter.org

Asterisk is not quite GPL

Asterisk is GPL, but with an important clause Digium can license branches of the source such

that those branches are not GPL Digium gets disclaimers from all contributors

saying that Digium can license branches of the code.

Page 10: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

10 www.convergencetechnologycenter.org

VoIP Channels

SIP - Session Initiation Protocol (internal stack) H.323 – via OpenH323 Project MGCP - Media Gateway Control Protocol

(internal stack) SCCP – Cisco Skinny Protocol (internal stack)

IAX – Inter-Asterisk eXcange Protocol Special open-source protocol developed for

communicaiton between Asterisk servers.

Page 11: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

11 www.convergencetechnologycenter.org

VoIP Channel Endpoints Phones for VoIP (SIP):

Grandstream 102 Cisco ATA 186 Sipura Cisco 7960/7940 Polycom IP-501, IP-601, etc. Snome Many others

Software for VoIP (SIP) www.xten.com - free SIP client (“Lite”) gnophone.com - Linux SIP client Windows Messenger

Page 12: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

12 www.convergencetechnologycenter.org

TDM and Other Channels

TDM POTS cards (Digium, Zapata, Voicetronix, etc.)

TDM Digital (AdTran VoFR, Digium E1/T1, etc.) All TDM cards require install of Zaptel driver suite CAPI (ISDN card support for Linux ISDN driver) USB dongle for FXS Modem drivers for certain modems Speaker/headphones

Page 13: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

13 www.convergencetechnologycenter.org

System Requirements No clear rule of thumb on processor size; at least 500 MHz

PIII recommended. Almost any version of Linux is supported. Source & binaries (including sounds) are ~35 MB Using complex codecs (i.e.: G.729, Speex, etc.) will

increase processor load dramatically Remember this is processed on the host processor – HMP

Best to have a > 1.5 GHz machine for multi-channel use. Mac OS X / FreeBSD is becoming stable for non-hardware

channels. VMWare and Parallels Virtual Machines

Page 14: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

14 www.convergencetechnologycenter.org

Call Flow (briefly)

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.

Page 15: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

15 www.convergencetechnologycenter.org

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 16: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

16 www.convergencetechnologycenter.org

Call Flow (cont’d)

[from-my-pri]exten => 14109850123,1,Answerexten => 14109850123,2,Wait(2)exten => 14109850123,3,Playback(monkeys)exten => 14109850123,4,Goto(more-monkeys,123,1)

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

Page 17: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

17 www.convergencetechnologycenter.org

Redirection based on ANI

You can match against calling number instead of called number.

This is known as “The ex-girlfriend filter” by the inventor of the routines

This pattern matches against called number (1410…) and also against calling numer (301…)

exten => 14109850123/3013659999,1,Busy

Page 18: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

18 www.convergencetechnologycenter.org

Redirection of Call Flow

GotoIf - can parse basic Booleans GotoIfTime - handy way to deal with time-based

redirection Some applications will add 101 to the existing

priority when certain errors occur (notably, Dial does this on busy, and DBget/DBput do this on errors reading from the internal database)

Any other type of errors result in channel hangup

Page 19: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

19 www.convergencetechnologycenter.org

Variables

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

can be performed 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 20: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

20 www.convergencetechnologycenter.org

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 21: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

21 www.convergencetechnologycenter.org

Some Applications

Dial - connects an inbound call with some other channel.

The first argument specifies the technology (SIP, Zap, H323, etc.) and 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 22: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

22 www.convergencetechnologycenter.org

Some Applications (cont’d)

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

Background(filename) Plays a sound file while listening for DTMF (touch

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

Page 23: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

23 www.convergencetechnologycenter.org

Some Applications (cont’d)

MeetMe(conf#) Adds the caller to a conference room (optionally

muted or unmuted) Monitor

Records channel (in and out) to .wav or .gsm files PrivacyManager

Forces anonymous calls to enter valid ANI

Page 24: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

24 www.convergencetechnologycenter.org

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 Fairly useless, but fun. You can specify files or

streams of .mp3 to be played to callers.

Page 25: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

25 www.convergencetechnologycenter.org

Some Applications (cont’d)

There are over 80 different applications in the system – more created each day.

Applications are easily created and added if you’re a decent C coder or scripting coder.

Channels are generic, so you don’t have to know about any of the ugly VoIP or TDM stuff.

Page 26: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

26 www.convergencetechnologycenter.org

Voicemail

Voicemail can be sent as email as well as stored on disk (1 minute = 100KB)

Short pages can be sent to email addresses when VM received

Customizable timezones and time readouts per user - supports multiple languages

WAV or GSM file format for storage or email Dial by name directory hinges on VM data

Page 27: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

27 www.convergencetechnologycenter.org

Practical Uses

Ditch your long distance company! SIP long distance (domestic and int) providers starting to crop up at low rates. Use Asterisk to gateway to them.

Prevent phone spam! Callers with no CID get ditched.

Filter your phone lines. Allow or forward callers who are on “priority” lists based on ANI.

Page 28: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

28 www.convergencetechnologycenter.org

Practical Uses

Enterprise-quality SIP connection services are now available.

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 29: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

29 www.convergencetechnologycenter.org

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 30: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

30 www.convergencetechnologycenter.org

Really Advanced Topics

Manager interface: TCP socket based interface for controlling and monitoring the system; meant for automated manager tools (see: gastman)

AGI scripts: built-in scriptable hooks to allow passing of data back and forth between Asterisk and external programs.

Asterisk.pm - Perl module that works with AGI to handle grunt work of call handling

Page 31: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

31 www.convergencetechnologycenter.org

Really Advanced Topics (cont)

Sybase and MySQL modules

CDR (call detail record) output can be customized or put into database instead of flat file

Use IAX2 trunk mode to get up to 200% more calls in the same bandwidth as other VoIP systems

Dynamically Route your calls to least-cost providers

Page 32: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

32 www.convergencetechnologycenter.org

Other Asterisk Applications

Can run PPP or HDLC over channels Asterisk can be a RAS server or a router

Can use speaker/microphone as a “phone line”

Video Calls or Conferencing

ENUM e.164 DNS-based call routing Example: 2.1.2.1.2.5.4.3.0.5.1.e164.arpa.

TDM over ethernet for front-end processing

Page 33: Www.convergencetechnologycenter.org DUE 402356 Asterisk “The Future of Telecommunications” Vincente D’Ingianni Director of Professional Services Binary.

33 www.convergencetechnologycenter.org

Asterisk Resources

http://www.asterisk.org/ - Latest Source Code

http://www.digium.com/ - Asterisk TDM hardware

http://www.voip-info.org/ - General VoIP How-To Info

http://www.xten.com/ - Softphone

http://www.asterisk-vonage.com/ - Asterisk to Vonage connectivity

http://www.binary-systems.com/ - Asterisk Consulting & Training Services