Create an automated attendant

Let’s create a simple automated attendant. Here is the call flow we will try to achieve:

Enter the following code in the extensions.conf file:

exten => 800,1,Playback(our-greeting)
 same => n,Background(main-menu)
 same => n,WaitExten(4)
 same => n,Goto(0,1)
exten => 1,1,Verbose(2, The caller has pressed 1)
 same => n,Dial(SIP/alice)
exten => 2,1,Verbose(2, The caller has pressed 2)
 same => n,Dial(SIP/bob)
exten => 0,1,Verbose(2, The caller has pressed 0)
 same => n,Dial(SIP/george)
exten => t,1,Verbose(1, Caller ${CALLERID(all)} has timed out)
 same => n,Goto(0,1)

Here is the breakdown of our AA:

1. First, the caller will hear the greeting we’ve recorded earlier.
2. After the greeting, the caller will be presented with the main menu and prompted for the selection.
3. If the caller presses 1, the sales department (Alice) will be called.
4. If the caller presses 2, the marketing department (Bob) will be called.
5. If the caller presses 0, the operator (George) will receive the call.
6. If the caller doesn’t press anything, the call will be forwarded to the operator (George)

 

 

Geek University 2022