Top Banner
www.itexpo.com October 10-13, 2006• San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis
26

Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

Mar 26, 2015

Download

Documents

Kyle Daniel
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Asterisk Jargon

Carl Davis

Page 2: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Agenda

• What is Asterisk?– PBX Definition and Functionality– Architecture Overview

– Network Interfaces– VoIP Connections– Dial Plan– Codec– Channel

• Jargon– Context– Extension– Application– Variable– Macro

Page 3: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

What is Asterisk?

• Popular Open Source, multi-protocol PBX (Private Branch Exchange)

• Provides a library of basic telephony applications for use as building blocks for advanced functionality

• Includes Common PBX functionality such as voicemail, call queuing, conferencing, music on hold and more

• Asterisk is one of the few PBXs in existence that connects legacy telephony technologies (Analog, PRI) to VoIP interfaces (SIP,H.323)

Page 4: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Asterisk Architecture

Page 5: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Network Interfaces

• PSTN– Analog (FXS/FXO)– Digital (E1/T1,BRI)

• IP– SIP– H.323– IAX– SCCP/Skinny

Page 6: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

FXS/FXO

• Analog Line Interface

• FXS – Foreign Exchange Station– Generates Dialtone– Generates Ring– Connects to Analog Phones (aka Stations)

• FXO – Foreign Exchange Office– Accepts Dialtone from Central Office (CO)– Provides Connection to the CO

Page 7: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

T1

• Primarily Used In US• T1 – PSTN Digital Interface

– CAS – Channel Associated Signaling (Wink, Immediate, etc)• 24 Voice Channels• MF/DTMF In-band Signaling

– PRI – Primary Rate Interface (“D” Channel)• 23 Voice Channels• 1 Data Channel• Q.931 Messages

Page 8: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

E1

• ITU-T Specification• Digital Interface

– CAS – Channel Associated Signaling• 30 Voice Channels• R2MF

– PRI – Primary Rate Interface (“D” Channel)• 28 Voice Channels• 2 Data Channel• Q.931 Messages

Page 9: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Telephony Channels

• Telephony Connections– Channels map physical FXO and FXS

connections to logical Asterisk channels– Trunkgroups – an advanced topic

• Non-Facility Associated Signaling (NFAS)• Generic Requirement-303 (GR-303)

• These relationships are defined in the zapata.conf channel configuration

Page 10: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Connections (Users/Peers/Friends)

• VoIP Connections– Users -> connections that authenticate to

us (phones, etc)– Peers –> authenticate us (to a service

provider)– Friends ->Connections that may do both

• These relationships are defined in the channel configuration (sip.conf, iax.conf)

Page 11: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Channels

• Telephony connections to the PBX

• Call Processing in Asterisk Is Centered Around Channels

• Drivers for various kinds of connections– IP (SIP,H.323,IAX,SCCP,MGCP)

– PSTN (Analog, PRI, BRI)

Page 12: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Channel TypesChannel Types can be Physical or Logical• Agent: ACD Agent channel • Console: Linux console client driver for sound cards (using OSS

or ALSA) • H.323: An older VOIP protocol • IAX and IAX2: Inter-Asterisk Exchange protocol, Asterisk's own

VOIP protocol • MGCP: Media Gateway Control Protocol, another VOIP protocol • SIP: Session Initiation Protocol, the most common VOIP

protocol • Skinny and SCCP: Drivers for Cisco Skinny Client Control

Protocol (a VOIP protocol)• VOFR: voice over frame relay Adtran style • VPB: For connecting ordinary telephone and telephone lines

using Voicetronix cards • Zap: For connecting ordinary telephones and telephone lines

using Digium cards. Also for TDMoE and for zaphfc

Page 13: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Channel Drivers

Channel drivers offering other technologies can be optionally installed:

• Bluetooth: Allows the use of bluetooth devices to change routing - see CVS "chan_btp"

• CAPI: ISDN CAPI channel • mISDN: mISDN channel • vISDN: vISDN channel (native BRI channel for HFC

chipsets)• SCCP: An alternate Skinny/SCCP channel • Sirrix: ISDN BRI for Sirrix cards (with optional ISDN

encryption) • UNISTIM: Nortel Unistim channel • Unicall: Replacement for zaptel, with R2 support • SS7: SS7 (ISUP on MTP2/3) channel

Page 14: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Codec

Codec – Short for Coder/Decoder• Codecs determine the sustained data bit rate

which is required for each channel.• The codec converts the analog voice signal to a

digitally encoded one that should take less space.

• The quality and data bit-rate vary from one codec to the next.

• Examples:– ulaw, alaw, gsm, g.723, g.726, g.729

Page 15: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Dialplan

The "road map" for your Asterisk PBX.

• specifies how Asterisk handles calls. • consists of a list of instructions or steps that

Asterisk should follow.

To successfully set up your Asterisk system, it is absolutely vital that you understand dialplans.

Page 16: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Contexts

• Named group of Extensions• Extensions are unique only inside a context• Example of a context label: [incoming]• Special Contexts

– [globals] – [general]

• Contexts are used for security and to differentiate services

Page 17: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Extensions

• An extension is an instruction triggered by an incoming call or by digits being dialed on a Channel.

• Defined Within Context• Specify what happens to calls as they make

their way through the dialplan. • Can be numeric or alphanumeric• Can be defined using wildcard syntax to provide

handling for predefined extension groups

Page 18: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

More Extensions

• An extension is composed of three components:– descriptor– priority (each extension can include

multiple steps; the step number is called the “priority”)

– application that performs action for the call• Example

– exten => 123,1,Answer( )– exten=> _NXX976XXXX,1,Congestion()

Page 19: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Special Extension

• ‘s’ - extension• Calls entering a context without a specific

destination (i.e. ring on FXO line), they are handled automatically by the s extension.

• Example– [incoming]– exten => s,1,Answer( )– exten => s,n,Playback(hello-world)– exten => s,n,Hangup( )

Page 20: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Priority

• Defines step number in an Extension script• Numbered sequentially, starting with 1• Unnumbered Priority

– ‘n’ priority, - “next”– Takes the number of the previous priority and adds 1– No need to re-number dial plan when changes are made.– Example:

• exten => 123,1,Answer( )• exten => 123,n,do something• exten => 123,n,do something else• exten => 123,n,Hangup( )

– Label Priority• exten => 123,n(label),do something

• Executes one Specific Application

Page 21: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Variables• A channel variable (such as the Caller*ID number) is

associated only with a particular call. • Predefined channel variables are available for use within

the dialplan and are explained in the README.variables file

• Channel variables are set via the Set( ) application:– exten => 123,1,Set(MAGICNUMBER=42)

• Environment variables are a way of accessing Unix environment variables from within Asterisk. – Example: ${ENV(var)}– Global Variables

• [globals] – Special Context in extensions.conf– JOHN=ZIP/1– JANE=SIP/JANE– exten => 123,1,SetGlobalVar(JOHN=Zap/1)

Page 22: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Applications

• Applications are the workhorses of the dialplan.– performs a specific action on the current channel

• Types– Generic (Authenticate, VMAuthenticate, etc)– Billing (SetAccount, SetAMAFlags)– Call Processing (Answer, Busy, Dial, Hangup)– Caller Presentation (SetCallerID, SetCallerCIDName)– Database (DBdel, DBget, DBput)– Application Interface (AGI, EAGI, PERL, PHP)– Audio (Playback, Playtones, MusicOnHold)– Voicemail & Conferencing (MeetMe, VoiceMailMain)– Queue/ACD (AddQueueMember, AgentLogin)

Page 23: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Macros

• Macros are used to reduce the amount of redundant code in the dialplan.

• Passing arguments to a macro allows generalization

• Single line invocation from dialplan• Macros are identified in the dialplan by starting a

context name with "macro-".• ’s’ extension is used within macros since we

want the actions to be performed automatically• Arguments in macros are accessed as {ARGn}

Page 24: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Example Macro[macro-dialuser]

exten => s,1,GotoIf($[${DB_EXISTS(CFD/${MACRO_EXTEN})} = 0]?checkdnd)

exten => s,n,set(CFD=${DB_RESULT})

exten => s,n,set(MYEXTEN=${MACRO_EXTEN})

exten => s,n,goto(staff_incoming,${CFD},1)

exten => s,n(checkdnd),GotoIf($[${DB_EXISTS(DND/${MACRO_EXTEN})} = 0]?dialuser,1)

; Tell them we are not all there

exten => s,n,Playback(tt-monkeysintro)

exten => s,n,Hangup

exten => dialuser,1,dial(${ARG1},15)

exten => dialuser,n,goto(d-${DIALSTATUS},1)

Page 25: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Example Macro (cont)exten => d-NOANSWER,1,Answer

exten => d-NOANSWER,n,wait(2)

exten => d-NOANSWER,n,Playback(vm-nobodyavail)

exten => d-NOANSWER,n,Hangup

exten => d-BUSY,1,Answer

exten => d-BUSY,n,wait(2)

exten => d-BUSY,n,Playback(tt-allbusy)

exten => d-BUSY,n,Hangup

exten => _d-.,1,Answer

exten => _d-.,n,wait(2)

exten => _d-.,n,Playback(pbx-invalid)

exten => _d-.,n,Hangup

Page 26: Www.itexpo.com October 10-13, 2006 San Diego Convention Center, San Diego California Asterisk Jargon Carl Davis.

www.itexpo.com

October 10-13, 2006• San Diego Convention Center, San Diego California

Q&A

Carl Davis

President & Chief Architect

Stellar System Technologies, Inc

[email protected]

www.stellarsystech.com

Executive Director

High Tech Business Council of Rochester

www.htbc.org