Like every other website on the planet, SmallNetBuilder uses cookies. Our cookies track login status, but we only allow admins to log in anyway, so those don't apply to you. Any other cookies you pick up during your visit come from advertisers, which we don't control.
If you continue to use the site, you agree to tolerate our use of cookies. Thank you!

Router Charts

Click for Router Charts

Router Ranker

Click for Router Ranker

NAS Charts

Click for NAS Charts

NAS Ranker

Click for NAS Ranker

More Tools

Click for More Tools

Configuring Asterisk as an Answering Machine

Now that we have a working system we'd like to create our own message and use it as the main greeting. The quickest way to do this is to let Asterisk record your message. The configuration for the menu system is stored in /etc/asterisk/extensions.conf. This file has many examples of different configurations you might want to use. For the time being we just want to add a temporary extension as a way to record our welcome message.

By the way, I recommend making a copy of this file before you started changing it so that you can refer to the original at a later time. You can do this via:

cp extensions.conf extensions.conf.bak

Now you can open the file for editing

nano extensions.conf

At the end of the file, create an extension by adding these three lines:

exten => 1205,1,Wait(2)
exten => 1205,2,Record(/tmp/asterisk-recording:gsm)
exten => 1205,3,Hangup

Now reload Asterisk (since you changed a configuration file, remember?) and dial back in from your outside line. Once the demo starts to explain the available extensions, dial 1205 to trigger your new extension. You should hear a beep and you can then record your greeting, which we will use instead of the demo greeting in a moment. Now that you've recorded your greeting, let's move it where Asterisk can use it:

mv /tmp/asterisk-recording.gsm /usr/share/asterisk/sounds/

The extensions.conf file is very powerful and many articles could be written describing all of the functionality and flexibility it offers. But to keep things simple, we're going to just modify the demo. Once again, open the file with nano:

nano extensions.conf

And search for:

[demo]

We'll first a few more seconds to give you time to answer the phone. Replace:

exten => s,1,Wait,1

with

exten => s,1,Wait,7

Next, comment out the default demo greetings by adding a semi-colon to the start of the lines:

;exten => s,5,BackGround(demo-congrats)
;exten => s,6,BackGround(demo-instruct)

and add two new replacement instructions to play your greeting and send the caller to voicemail:

exten => s,5,BackGround(asterisk-recording)
exten => s,6,Voicemail(u1234)

To stay consistent with other prompts, let's add a method to hang up using the # key:

exten => #,1,Hangup

There is a lot of demo functionality in the file that we don't really need, such as doing test VOIP calls and echo tests. So I added a semi-colon in front of every line down to:

; Give voicemail at extension 8500

Optionally, you may also want to remove or comment out the 1205 extension we added earlier at the end of the file.

Once you've made and checked your changes, save them and exit nano and then reload the Asterisk configuration:

/etc/init.d/asterisk reload

If you'd like to trim the extensions.conf file to a minimum here is how it would look:

[general]
static=yes
writeprotect=no
[demo]
exten => s,1,Wait,7
exten => s,2,Answer
exten => s,3,DigitTimeout,5
exten => s,4,ResponseTimeout,10
exten => s,5,BackGround(asterisk-recording)
exten => s,6,Voicemail(u1234)
exten => #,1,Hangup
exten => 8500,1,VoicemailMain
exten => 8500,2,Goto(s,6)
[default]
include => demo

At this point your new answering machine is set up to receive calls and record voicemail. You can call in and check your messages by entering extension 8500 during the initial greeting. The default Asterisk voice will ask you for a mailbox number, which in our case is 1234. It will then ask you for a password, which is currently 4242.

Wi-Fi System Tools
Check out our Wi-Fi System Charts, Ranker and Finder!

Support Us!

If you like what we do and want to thank us, just buy something on Amazon. We'll get a small commission on anything you buy. Thanks!

Over In The Forums

v4.1.0Updated 2020-11-26spdMerlin is an internet speedtest and monitoring tool for AsusWRT Merlin with charts for daily, weekly and monthly summaries....
hi all, i crammed a lot in the subject line, but it's pretty descriptive.i bought at an AC68U in July (i have a 4 year old one faithfully operating as...
Firmware: 384.14_2Model: RT-AC86UIssues: LAN speed is limit at 200mbps, but my WiFi speed can go up to 100% at 500mbps.There's no NAT Acceleration se...
I noticed that my Adblock stats have not updated in several days. Adblock is working, just not telling me what its doing? Is there a command to kick s...
On my RT-AC68U -running firmware 384.19- I have 1 OpenVPN server active.My Synology NAS backups to two similar Synology NAS devices on geographical di...

Don't Miss These

  • 1
  • 2
  • 3