Recommendations for configuring the Asterisk system

Материал из WiKi - UserSide

en | ru

Basic Asterisk settings that the usm_asterisk module is designed for

This article provides a typical basic contact center configuration, which allows you to receive incoming calls from a SIP line and transfer them to a queue to which users are connected.

Follow the instructions for installing the telephone system: http://blog.denisbondar.com/post/asterisk11-chan_dongle_e1550-ubuntu14

Input data for the demo configuration

  • one external SIP line [SIPOPOPERATOR], from the side of which incoming phone calls are received. Phone number 0551234567, password qwerty123456, user server IP address 11.22.33.44
  • one serial search group (call queue)
  • four internal SIP lines on which contact centre users work - all of them are included in one queue

sip.conf

Contents of the file responsible for SIP lines

; general settings
[general]
language = ru
bindport=5060
callcounter = yes
limitonpeers = yes
dtmf=rfc2833
compensate=yes
defaultexpirey=3600
disallow=all
allow=alaw
registertimeout=3600
; here you need to list all external sip lines in the specified format
register=0551234567:qwerty123456@11.22.33.44/0551234567

; next, the settings for the external user that provides the phone number
[SIPOPERATOR]
type=friend
host=11.22.33.44
port=5060
defaultip=here_ip_address_on_interface_to_the_user_side
fromdomain=here_domain_name_of_the_user_softswitch_name
fromuser=0551234567
username=0551234567
secret=qwerty123456
registertimeout=3600
defaultexpirey=3600
nat=no
canreinvite=no
disallow=all
allow=alaw
qualify=yes
dtmfmode=inband
insecure=port,invite
context=from-external-sip ; this context will be used in routing when calling from an external sip line

; here are the general settings for all internal sip lines
[CallCenter](!)
call-limit=1 ; Limit simultaneous calls (users receive only one call)
qualify = no
dtmfmode=rfc2833
canreinvite=no
pickupgroup=1
callgroup=1
host=dynamic
type=friend
port=5060
qualify=yes
deny=0.0.0.0/0.0.0.0
permit=0.0.0.0.0/0.0.0.0.0 ; allowed to connect from anywhere. Change if needed otherwise
callcounter=yes
faxdetect=no
disallow=all
allow=alaw
allow=gsm
context=from-internal-sip ; this context will be used in routing for calls from contact centre user lines

The 4 internal telephone lines with common settings are described below
[500](CallCenter)
username=500
nat=no
secret=here_password
callerid=user 500 <500>

[501](CallCenter)
username=501
nat=no
secret=here_password
callerid=user 501 <501>

[502](CallCenter)
username=502
nat=no
secret=here_password
callerid=user 502 <502>

[503](CallCenter)
username=503
nat=no
secret=here_password
callerid=user 503 <503>

queues.conf

The group in the configuration file with the settings of serial search groups (queues) is discussed below

[callcenter-queue]
monitor-type = MixMonitor
music = file_name ; name of the file without extension, which will be played to the user in the user's answer waiting mode.
strategy = ringall ; serial search strategy - call all users at once
timeout = 30
retry = 2
joinempty = yes ; a call can join the queue even if no user is connected to it
ringinuse = no ; do not accept calls to people who are already on a call
leavewhenempty = yes
announce-frequency = 30
announce-holdtime = no
; the members of the group are then listed
member => SIP/500
member => SIP/501
member => SIP/502
member => SIP/503

extensions.conf

The following file configures routing. A fragment that routes incoming calls to the group and outgoing calls through the external SIP line is considered

; incoming calls are those that come from the external sip line towards the contact centre
[from-external-sip]
exten => s,1,Ringing() ; if required, send a ringing signal to the caller (if not required, delete the line).
exten => s,n,Wait(2) ; wait two seconds for the caller to hear the first beep after dialling the number, if you answer immediately without beeping - the caller gets scared :)
exten => s,n,Answer(300) ; answer the call
exten => s,n,Playback(hello) ; play the hello file (file name without extension).
exten => s,n,Queue(callcenter-queue) ; direct the call to the "callcenter-queue" queue 
exten => s,n,Hangup() ; direct the caller to the hangup queue

; outgoing calls - those that originate from the contact centre users to the PSTN
[from-internal-sip]
exten => _X.,1,Set(CALLERID(num)=380551234567) ; Change the Caller_ID before sending the call to the PSTN to the outside line number
exten => _X.,n,Dial(SIP/SIPOPOPERATOR/${EXTEN},300) ; Direct the call towards SIPOPERATOR

Do not make any other settings if you do not know what they are for.

If you configure the system through various web-interfaces (trixbox, elastix, freepbx, etc.), then it is impossible to guarantee the work of usm_asterisk module, because the logic of Asterisk operation after such configuration is often unpredictable and it is impossible to trace the call passing through the standard module.