Asterisk IVR: IVR and Custom Prompt Intro (Latest Versions)
Updated guide for modern Asterisk (PJSIP era): ivr and custom prompt intro with real configs, common mistakes, and troubleshooting steps.
An IVR (Interactive Voice Response) system is the first real interaction many customers have with your business phone system. A well-designed IVR guides callers quickly to the right department, reduces agent workload, and creates a professional impression.
In modern Asterisk (PJSIP-based) deployments, IVRs are fully controlled by the dialplan and supported by custom audio prompts.
This guide introduces IVR fundamentals, explains how custom prompts work, and prepares you for building real production IVR menus.
What Is an IVR in Asterisk?
An IVR is a call flow that:
- Answers an incoming call automatically
- Plays a recorded menu message
- Waits for caller keypad input (DTMF)
- Routes the call based on the selected option
Example: “Press 1 for Sales, Press 2 for Support.”
Core Building Blocks of an IVR
- Answer() → picks up the call
- Playback() / Background() → plays menu prompt
- WaitExten() → waits for keypad input
- Dial() or Queue() → routes the call
These simple applications create powerful call-handling logic.
Basic IVR Example (Minimal Working Menu)
[main-ivr]
exten => s,1,Answer()
same => n,Background(main-menu)
same => n,WaitExten(5)
exten => 1,1,Dial(PJSIP/1001,20)
same => n,Hangup()
exten => 2,1,Queue(support)
same => n,Hangup()
exten => t,1,Playback(vm-goodbye)
same => n,Hangup()
Behavior:
- Caller hears menu
- Press 1 → Sales agent rings
- Press 2 → Caller enters support queue
- No input → call ends after timeout
Playback() vs Background() — Important Difference
- Playback() → plays audio and ignores keypad input
- Background() → plays audio while listening for digits
IVRs must use Background() to capture caller input.
What Are Custom Prompts?
Custom prompts are recorded audio files used instead of default Asterisk system sounds.
Businesses use custom prompts to:
- Provide branded welcome messages
- Give department-specific instructions
- Announce working hours or holidays
Where Custom Prompt Files Are Stored
Standard audio directory:
/var/lib/asterisk/sounds/
Custom prompts are often placed in:
/var/lib/asterisk/sounds/custom/
Example file:
/var/lib/asterisk/sounds/custom/main-menu.wav
Audio Format Requirements for IVR Prompts
- Mono channel
- 8000 Hz sample rate (telephony standard)
- 16-bit PCM WAV recommended
Incorrect audio format is one of the most common IVR problems.
Connecting IVR to Incoming Calls
[from-trunk]
exten => s,1,Goto(main-ivr,s,1)
This routes all incoming calls into the IVR menu.
Common IVR Problems and Fixes
Caller Cannot Press Options
- Using Playback() instead of Background()
- DTMF not passing through SIP trunk (RFC2833 mismatch)
Prompt Does Not Play
- Wrong file name or path
- Incorrect audio permissions
Caller Hears Silence
- RTP/NAT audio issue
- Firewall blocking media ports
Best Practices for Professional IVRs
- Keep menu short and clear
- Limit options to 3–5 choices
- Provide queue fallback if no input
- Use human-recorded voice for trust
- Test IVR from real external numbers
IVR quality directly affects customer experience and conversion.
What Comes Next?
After understanding IVR basics, the next steps include:
- Installing and managing custom prompts
- Building multi-level IVR menus
- Creating looping IVRs and timeout handling
- Integrating IVR with queues and databases
Key Takeaway
IVR and custom prompts form the front door of your telecom system. Using Background(), WaitExten(), and well-recorded prompts, Asterisk can guide callers efficiently to the correct destination.
A clear IVR is not just a technical feature — it is a core part of professional customer communication.
Want to see API-driven CRM + Telecom workflows in action? Try the WhatsApp bot or explore the demos.
Comments (0)
Be the first to comment.