Skip to main content

Interactive voice response (IVR)

ivr asterisk


ACD (Agent Channel Driver) distributes incoming calls to the agents of a Queue. Agents are configured in the queues.conf file.
Rename the agents.conf file (Location: /etc/asterisk/agents.conf) to agents_old.conf for example. Create a new agents.conf empty file and insert the following lines into the file:

agent => 101,101,Phone1


Rename the queues.conf file (Location: /etc/asterisk/queues.conf) to queues_old.conf for example. Create a new queues.conf empty file and insert the following lines into the file:
persistentmembers = yes

joinempty = yes

member => Agent/101


Download the addtional asterisk sound files. Untar it and copy all files in the “/var/lib/asterisk/sounds/” directory.
cd /var/lib/asterisk/sounds/
wget ""
tar -zxvf asterisk-sounds-en-gsm-1.4.11.tar.gz
mv * /var/lib/asterisk/sounds/


Edit the extensions.conf file (Location: /etc/asterisk/extensions.conf).
Add the following lines in the asterisk tab:
exten => 1900,1,AgentLogin()
Add the following lines at the beginning of the asterisk tab:
include => ivr
Add the following lines at the end of the extensions.conf file:
exten => 1000,1,Ringing()
exten => 1000,2,Wait(4)
exten => 1000,3,Goto(welcome,s,1)

exten => s,1,Set(GLOBAL(sounds_path)=/var/lib/asterisk/sounds/)
exten => s,2,Background(${sounds_path}welcome)
exten => s,3,Goto(menu,s,10)
exten => i,1,Playback(${sounds_path}unavailable)
exten => t,1,Goto(welcome,s,1)

exten => s,10,Background(${sounds_path}menu)
exten => s,n,Background(${sounds_path}press-1)
exten => s,n,Background(${sounds_path}for-tech-support)
exten => s,n,Background(${sounds_path}press-2)
exten => s,n,Background(${sounds_path}to-hear-menu-again)
exten => s,n,Background(${sounds_path}press-3)
exten => s,n,Background(${sounds_path}to-hang-up)
exten => s,n,WaitExten(5)
exten => 1,1,Goto(support,s,1)
exten => 2,1,Goto(menu,s,10)
exten => 3,1,Goto(hangup,s,1)
exten => i,1,Playback(${sounds_path}please-try-again)
exten => i,2,Goto(menu,s,10)
exten => t,1,Goto(menu,s,10)

exten => s,1,Goto(menu,s,10)
exten => s,n,Playback(${sounds_path}pls-stay-on-line)
exten => s,n,Queue(support)
exten => t,1,Hangup()

exten => s,1,Goto(menu,s,10)

exten => s,1,Background(${sounds_path}goodbye)
exten => s,n,Hangup()


Reload the asterisk configuration by running the following command in the CLI console:
  • core reload

With the 101 sip phone, dial 1900, enter the agent number followed by the pound key (101#), enter the password followed by the pound key (101) and you will be registered in the support queue.
With your sip phone, dial number 1000, you will hear the welcome message and the menu message:
  • Press 2: Repeat the menu
  • Press 3: Hang up the line
With the other sip phone, dial 1000, press 1 and you will be connected to the support queue.


Popular posts from this blog

Asterisk – CLI commands

Agent commands agent logoff  - Sets an agent offline agent show  - Show status of agents agent show online  - Show all online agents AGI commands agi dump html  - Dumps a list of AGI commands in HTML format agi exec  - Add AGI command to a channel in Async AGI agi set debug [on|off]  - Enable/Disable AGI debugging agi show commands [topic]  - List AGI commands or specific help dnsmgr refresh  - Performs an immediate refresh dnsmgr reload  - Reloads the DNS manager configuration dnsmgr status  - Display the DNS manager status Calendar commands calendar dump sched  - Dump calendar sched context calendar show calendar  - Display information about a calendar calendar show calendars  - Show registered calendars Channel commands channel originate  - Originate a call channel redirect  - Redirect a call channel request hangup  - Request a hangup on a given channel Cli commands cli check permissions  - Try a permissions config for a user cli reload permi

Step by step: Configure call recording - Asterisk tutorials

This article will cover enabling asterisk to record calls. You may want this to interview people over the phone, podcast, or some other purpose. In features.conf, under: [featuremap] uncomment the line that looks like this: automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor — Make sure to set the X and/or x option in the Dial() or    Queue() app call! Then, enable the X option for Dial() in your dialplan in extensions.conf: PLEASE NOTE:  change you need to make – add the X  your dial rule make look different with me. exten => s,n,Dial(SIP/100,60) make it this instead: exten => s,n,Dial(SIP/100,60,X) The X is what tells Asterisk to allow callers to dial *3 during a call to enable or disable recording. From the asterisk console (run asterisk -r), you should see a line like this appear when the user starts a recording: – User hit ‘*3′ to record call. filename: auto-xxxxx-EXTENSION-DIALEDNUMBER When the recording ends, un

Making video calls – Asterisk tutorial

sip.conf To be able to send video during a call, codec h263 and video support must be enabled. This is done by adding three lines in the sip.conf file (Location: /etc/asterisk/sip.conf). Add the following lines in the [general] tab of the file. videosupport = yes ; Enable video allow = h263 ; H.263 is our video codec allow = h263p ; H.263p is the enhanced video codec Reload Reload the sip.conf file by running the following command in the CLI console:  reload Config in Softphone  Click “Softphone”  Click “Preferences”    Click “Video Codecs”  Verify that h263 and h263+ are selected Click “OK”  Click the video (Webcam) icon to display the video  Dial the other sip phone (number 1002)  Click “Show Video” on the two sip phones.