Telecom

Asterisk Voicemail: Voicemail Basis (Latest Versions)

MYLINEHUB Team • 2026-02-10 • 7 min

Updated guide for modern Asterisk (PJSIP era): voicemail basis with real configs, common mistakes, and troubleshooting steps.

Asterisk Voicemail: Voicemail Basis (Latest Versions)

Voicemail is a foundational feature in Asterisk. When agents don’t answer, voicemail ensures the caller can still leave a message, and the business can respond later.

In real deployments, voicemail is not just “leave a message” — it becomes a missed-call capture system that protects revenue and trust.

This guide explains the basics of voicemail in modern Asterisk, using clean dialplan patterns that work with PJSIP.

How Voicemail Works in Asterisk

Voicemail involves three parts:

  • Voicemail boxes (users/extensions)
  • Dialplan routing to send calls to voicemail
  • Message storage on disk + optional email delivery

Asterisk voicemail is built into the module: app_voicemail.

Main Voicemail Files and Folders

Voicemail configuration file:

/etc/asterisk/voicemail.conf

Voicemail storage path (default):

/var/spool/asterisk/voicemail/

Example mailbox storage path:

/var/spool/asterisk/voicemail/default/1001/

Step 1 — Create a Mailbox in voicemail.conf

In /etc/asterisk/voicemail.conf:

[default]
1001 => 1234,Agent 1001,agent1001@example.com

Format:

  • 1001 → mailbox number
  • 1234 → PIN for voicemail access
  • Agent 1001 → display name
  • email → optional email delivery

Step 2 — Send Unanswered Calls to Voicemail

Example inbound routing:

[from-trunk]
exten => s,1,Answer()
 same => n,Playback(thank-you-for-calling)
 same => n,Dial(PJSIP/1001,20)
 same => n,Voicemail(1001@default)
 same => n,Hangup()

This is the classic voicemail fallback:

  • Try ringing agent
  • If not answered → go to voicemail

Step 3 — Control Voicemail Behavior with Options

Voicemail() supports options like:

  • u → play unavailable greeting
  • b → play busy greeting
  • s → skip instructions
  • t → play “temporary” greeting if set

Examples:

Voicemail(1001@default,u)
Voicemail(1001@default,b)
Voicemail(1001@default,us)

Voicemail Access for Users (Checking Messages)

Users can check voicemail using:

VoiceMailMain()

Example internal extension 500:

[from-internal]
exten => 500,1,Answer()
 same => n,VoiceMailMain()
 same => n,Hangup()

The user enters:

  • Mailbox number (e.g., 1001)
  • PIN (e.g., 1234)

Voicemail and DIALSTATUS (Correct Production Logic)

You should not blindly send every call to voicemail. Use ${DIALSTATUS}.

exten => s,1,Dial(PJSIP/1001,20)
 same => n,GotoIf($["${DIALSTATUS}"="BUSY"]?busy)
 same => n,GotoIf($["${DIALSTATUS}"="NOANSWER"]?noanswer)
 same => n,Hangup()

 same => n(busy),Voicemail(1001@default,b)
 same => n,Hangup()

 same => n(noanswer),Voicemail(1001@default,u)
 same => n,Hangup()

This produces correct greetings and better customer experience.

Common Voicemail Problems and Fixes

Voicemail Does Not Answer / Goes Silent

  • Audio/RTP issue (caller can’t hear prompts)
  • Missing sound files

Messages Not Saved

  • Disk permissions on /var/spool/asterisk/voicemail
  • Storage full

User Cannot Access Mailbox

  • Wrong PIN
  • Mailbox not defined in correct context (default)

Voicemail Best Practices for Businesses

  • Always enable voicemail for missed calls
  • Use professional greetings (unavailable + busy)
  • Email voicemail to responsible teams if needed
  • Store voicemail with correct disk backup strategy
  • Track missed call events in CRM (high value leads)

For call centers, voicemail is not an “extra feature” — it is a lead-saving system.

Key Takeaway

Voicemail is a simple but critical component of telecom reliability.

Create mailboxes in voicemail.conf, route calls using Voicemail() intelligently with DIALSTATUS, and provide users access through VoiceMailMain().

Once voicemail basics are correct, you can move to advanced topics like: custom greetings, email delivery, voicemail-to-text, and CRM integration.

Try it

Want to see API-driven CRM + Telecom workflows in action? Try the WhatsApp bot or explore the demos.

💬 Try WhatsApp Bot ▶️ Watch CRM YouTube Demos
Tip: Comment “Try the bot” on our YouTube videos to see automation in action.
M
MYLINEHUB Team
Published: 2026-02-10
Quick feedback
Was this helpful? (Yes 0 • No 0)
Reaction

Comments (0)

Be the first to comment.