voip study and implementation asterisk installation and configuration part 2 version 1.0 – author...

57
VoIP Study and Implementation Asterisk Installation and Configuration Part 2 Version 1.0 – Author : Marc PYBOURDIN / Julien BERTON Last Update : 15/05/2012

Upload: paul-mills

Post on 26-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

VoIP Study and ImplementationAsterisk Installation and Configuration Part 2

Version 1.0 – Author : Marc PYBOURDIN / Julien BERTONLast Update : 15/05/2012

Course objectives

• Ring Groups• Call Detail Records• Music On Hold• IVR• Conferences and

Text-to-Speech• Call parking• Interconnecting

Asterisk Servers

By completing this course, you will see:

Asterisk Overview

RING GROUPSAsterisk Installation and Configuration – Part 2

Ring group

• A ring group is a extension that binds several phones together

• Multiple strategy can be configured• Ring All• Round Robin

• As call strategies are configured like usual extensions, other behavior can be made as well.

Extensions.conf

Ring All Strategy

1. A telephone calls the ring group extension

2. All the members of the ring group rings

3. The first member to pick up the phone takes the call

Extensions.conf

Round Robin Strategy

1. A telephone calls the ring group extension

2. First member of the ring group rings for a fixed time

3. Then if no answer, rings to another ring group member

• Can be looped(or not)

Extensions.conf

Ring All Ring group configuration

• Example • The administrator wants a number 6600 to

be a ring group containing user 6000,6001 and 6002 during 20 seconds. If no answer, go to the voicemail number 6000.

• Inside the [my_context] context : 6600,1,Dial(SIP/6000&SIP/6001&SIP/6002,20)6600,2,Voicemail(6000@default)6600,3,Hangup()

Extensions.conf

Quiz

• The administrator wants a new ring group(Round Robin), number 6601, still including 6000, 6001, and 6002 inside the internal context.

• He wants to ring each phone sequentially during 20 seconds in a endlessly manner until someone in the ring group pick-up the phone

• Create new extension to answer to the question.• Use the Goto() application to help you achieve this task.

Extensions.conf

Quiz

• It’d give the following inside [my_context]:6601,1,Dial(SIP/6000,20)6601,2,Dial(SIP/6001,20)6601,3,Dial(SIP/6002,20)6601,4,Goto(my_context,6601,1)

• Take care about infinite loops here! If no phone are available(technically SIP registered to Asterisk), the extension will crash.

Extensions.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?

CALL DETAIL RECORDS Asterisk Installation and Configuration – Part 2

CDR (Call Detail Records)

• Track all calls made through Asterisk including details on them such as :- Caller ID, duration of the call, called number,…

• Export is done by default on a .csv file- /var/log/asterisk/cdr-csv/Master.csv- Export can be done on MySQL database

• Configuration can be customized in the cdr.conf file.

Cdr.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?

MUSIC ON HOLDAsterisk Installation and Configuration – Part 2

Music on Hold

• Plays music to callers who have been placed on hold.

• Configured in the /etc/asterisk/musiconhold.conf file.

• Can plays multiple format(with dependencies)• Encoded-codec files(µLaw,aLaw,gsm,…)• Live stream (dependency on mpg123)• MP3 Files (dependency on mpg123)

Musiconhold.conf

Music on Hold

• [default]mode=filesdirectory=moh

• [native-random]mode=filesdirectory=mohdigit=#sort=random

Musiconhold.conf

Music on Hold

• [native-alphabetical]mode=filesdirectory=mohsort=alpha

• [ulawstream]mode=customapplication=/usr/bin/streamplayer 192.168.100.52 888format=ulaw

Musiconhold.conf

Quiz

• Users wants to listen to SupRadio when calling 3000 number.

• Implement this solution using MoH.

• Define a new MoH context named « supradio »

• Use mono rate of 8000 and scale factor of 8192.

Musiconhold.conf

Quiz

• Install mpg123 package(using Debian’s aptitude)– apt-get install mpg123

• Make a streaming directory and a empty steaming file– mkdir /var/lib/asterisk/mohmp3/stream && touch /var/lib/asterisk/mohmp3/stream/stream.mp3

Musiconhold.conf

Quiz

• Create a MusicOnHold class named « supradio ».[supradio]mode=customdirectory=/var/lib/asterisk/mohmp3/streamapplication=/usr/bin/mpg123 -q -r 8000 -f 8192 -s --mono http://s10.netbreakdown.net:8000/source

• Define extension 3000 in current extension contextexten => 3000,1,Answer()exten => 3000,2,MusicOnHold(supradio)

Musiconhold.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?

IVRAsterisk Installation and Configuration – Part 2

IVR (Interactive Voice Response)

• Allows administrator to offer to callers an automated voice response system(very useful to guide automatically users in the right service).

• To configure this feature, it is important to have in mind the IVR scenario(what’ll be this behavior).

• Configuration can be done in the extensions.conf file.

Extensions.conf

IVR

• The administrator wants to obtain an IVR that’ll do the following : - An IVR number 7000- IVR scenario:

1. User call the IVR number2. IVR plays the welcome message with propositions:

– Press 1 to contact the IT service– Press 2 to contact the Accounting service– Press 3 to contact the Factory service

3. IVR listen for a digit and redirect the user4. If user don’t press a digit or press the wrong digit,

redirect him to the welcome message

Extensions.conf

IVR

• In extensions.conf file, we’ll need to create two elements • The IVR number in your internal context7000,1,Goto(ivr_context,s,1)

• A new context for IVR[ivr_context]s,1,Answer()s,2, Set(TIMEOUT(response)=10) ;if answer >= 10s, goto ‘t’ ext.s,3,Playback(welcome-prompt) ;customized prompt if wished1,1,Dial(SIP/6610) ;IT service ring group2,1,Dial(SIP/6611) ;Accouting ring group 3,1,Dial(SIP/6612) ;Factory ring group_[04-9*#],1,Goto(ivr_context,s,1) ;incorrect digitst,1,Goto(ivr_context,s,1) ;if timeout, start again

Extensions.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?

VOICE PROMPTS AND TEXT-TO-SPEECH

Asterisk Installation and Configuration – Part 2

Voice Prompt

• IVR needs to announce voice prompts to callers – Guide caller to the right service– Notify opening days and hours– Inform caller

• Voice prompt can be– recorded– live-generated

Extensions.conf

Text-To-Speech

• Text-To-Speech is a technique of converting string of characters to voice element

• With Asterisk, you can use several ways to implement it such as– Festival– eSpeak– GoogleTTS

Extensions.conf

GoogleTTS implementation

• GoogleTTS is a independant AGI/Perl-based script– render text to speech using Google’s voice

synthesis engine– supports several languages(english,

french, chinese, greek,…)

• Server needs to be connected to the Internet.

Extensions.conf

GoogleTTS implementation

• Installation of dependencies on Debian– apt-get perl libwww-perl sox mpg123

• Grab last version of the script– wget -o GoogleTTS.tar

http://github.com/zaf/asterisk-googletts/tarball/master

• Decompress and install it in the right directory– tar –xvf GoogleTTS.tar && cd zaf-asterisk-googletts-

51c2db5 && cp googletts.agi /var/lib/asterisk/agi-bin/

Extensions.conf

GoogleTTS implementation

• Extension call syntax– agi(googletts.agi,text,[language],[intkey])

• Sample extension – [internal_context]

exten => 1337,1,Answer()exten => 1337,2,agi(googletts.agi,"Space Court. For people in space. Judge space sun presiding!",en)exten => 1337,3,agi(googletts.agi,"Bam. Guilty. Of being in space. I’m in space.",en)exten => 1337,4,Hangup()

Extensions.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?

CONFERENCES WITH ASTERISKAsterisk Installation and Configuration – Part 2

MeetMe

• MeetMe is a conference room system integratedwith Asterisk

• It allows administrator to offer to callers conference rooms to organize meeting, brainstorming, …• To use this feature, keep in mind that DAHDI is

mandatory(even if you don’t have hardware cards).

• Configuration can be done in the meetme.conf and extensions.conf files.

Meetme.conf

MeetMe

• To configure MeetMe, you’ll need to create two elements :• The conference room in meetme.conf file(under the already

existing [rooms] context)conf => 7100 ;open conferenceconf => 7101,1234 ;conf. with a login password of 1234conf => 7102,1234,9876; conf. with an admin pass. 9876

• The extension associated with the MeetMe conference in extensions.conf file into your internal contextexten => 7100,1,MeetMe(7100)exten => 7101,1,MeetMe(7101)exten => 7102,1,MeetMe(7102)

Meetme.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?

CALL PARKINGAsterisk Installation and Configuration – Part 2

Call parking

• Call parking is a feature that can put on hold callers and allow callees to retake the call from every phone

• Sample scenario can be as described1. A callee take a call from his desk SIP phone

• Callee needs to move from his desk to the datacenter in the basement

2. Callee transfer call to parking number which return by synthetised voice the attributed call place

3. Callee got just to call the attributed call place to take again the call

Features.conf

Call parking

• Configured in features.conf and extensions.conf

• In features.conf, define parking extension and available parking lots[general]parkext => 700parkpos => 701-710context => parkedcalls

• In extensions.conf, include parking context in your extension contextinclude => parkedcalls

Features.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

INTERCONNECTING ASTERISK SERVERS

Asterisk Installation and Configuration – Part 2

IAX (Inter-Asterisk eXchange)

• Allows the administrator to interconnect Asterisk servers to• Form trunk between Asterisk server• Allow communication between users of

differents sites

• The configuration of this feature can be found in the iax.conf file.

Iax.conf

IAX configuration

• IAX topology that we wants to implement is the following

• Main objective here is to configure Asterisk servers to allow dial between sites

Iax.conf

InternetInternet

AST-PAR1

AST-LIL1

6000-6099 users

6100-6199 users

192.168.123.2 192.168.123.3

Internet VPN

IAX configuration

• On Asterisk servers, we’ll have to configure two elements :- The IAX configuration itself that

include - Iogin informations for the remote server- register statement for login into the remote server

- The extension to call the remote site through IAX trunk

Iax.conf

IAX configuration

• On AST-PAR1 :- In iax.conf file

register => AST-PAR-1:Th1si5Sp@rt@[email protected]

[AST-LIL-1]type=friendhost=192.168.123.3trunk=yessecret=Th1si5Sp@rt@!context=my_context qualify=yes

- In extensions.conf file in [my_context] _61XX,1,Dial(IAX2/AST-LIL-1/${EXTEN})_61XX,2,Playtones(congestion)_61XX,3,Congestion()

Iax.conf

IAX configuration

• On AST-LIL1 :- In iax.conf file

register => AST-LIL-1:Th1si5Sp@rt@[email protected]

[AST-PAR-1]type=friendhost=192.168.123.2trunk=yessecret=Th1si5Sp@rt@!context=my_context qualify=yes

- In extensions.conf file in [my_context] _60XX,1,Dial(IAX2/AST-PAR-1/${EXTEN})_60XX,2,Playtones(congestion)_60XX,3,Congestion()

Iax.conf

IAX configuration

• Once you’ve configured the IAX trunk, you’ll able to place calls between sites using the IAX trunk.

• You can verify the IAX trunk status in the Asterisk console with commands :• iax show peers• iax show registry

Iax.conf

Demonstration

• Show how to implement this solution on Asterisk and test it

Extensions.conf

Any questions?