Howwise RSS
VoIP & Phone Systems8 min read

FreePBX IVR Timeout and Invalid Fallback: Fix Dead Ends

Short answer

To set up a FreePBX IVR timeout invalid fallback, set the Invalid and Timeout Destinations to a real operator ring group or voicemail, limit retries to 2 or 3, and put a Time Condition in front of the menu.

Key takeaways
  • The IVR's `i` (invalid) and `t` (timeout) extensions only run after the retry counters are used up, so set both destinations explicitly.
  • Put the Time Condition between the Inbound Route and the IVR so after-hours callers never hear the menu.
  • Overlapping IVR digits and extension numbers make Asterisk wait for more digits, which callers experience as a delay or silence.
  • The operator ring group needs its own no-answer destination, such as voicemail, or the fallback itself becomes a dead end.
  • Watch `Goto (ivr-N,i,1)` and `Goto (ivr-N,t,1)` in `asterisk -rvvvvv` to prove each branch works.

What path should every caller take through the IVR?

A FreePBX auto-attendant fails when some outcome has no defined destination. Callers then get a hangup, an endless loop or silence. Before you click anything, list the outcomes: a valid digit, a wrong digit, no input, retries used up, after hours, holiday and an operator who does not answer.

The call order should be Inbound Route, then Time Condition, then IVR. The inbound route points at the Time Condition. The true branch (open hours) goes to the IVR. The false branch goes to an after-hours IVR, an announcement or a general voicemail box.

Putting the time check in front means the after-hours logic is not buried inside menu options, and the same IVR can be reused by several routes.

How do I build the greeting and digit options?

Keep the greeting under about 15 seconds and say the options first, for example: "For sales press 1, for support press 2, for the operator press 0, or dial an extension now." Callers who know what they want can act early. Long company histories make people press random keys, which feeds the invalid branch.

Use a recording Asterisk plays natively: 8 kHz, mono, 16-bit WAV. Recordings made in System Recordings are converted automatically. If you upload a file yourself, convert it first so Asterisk does not transcode on every call, or fail to play it.

Map 0 to the operator ring group and 1 to 9 to departments, ring groups or queues. Leave unused digits unassigned, so they trigger the invalid path.

How do the FreePBX IVR invalid and timeout fallbacks work?

FreePBX creates a context named ivr-N for each IVR, where N is the IVR ID. Each digit you configure becomes an extension in that context. The IVR plays the greeting with Background(), which listens for digits while the audio plays.

Two special extensions exist. `i` is the invalid handler, reached when the caller enters a digit with no matching option. `t` is the timeout handler, reached when nothing is dialed within the Timeout period. In the GUI, these are the Invalid and Timeout settings, not options you add by hand.

Set Timeout to 10 seconds. That gives callers time to listen without leaving long silence. Set Invalid Retries and Timeout Retries to 2 or 3.

Each time a retry is used, the IVR plays the Retry Recording, if set, then re-prompts. Once the counter is exhausted, the call goes to the Invalid Destination or Timeout Destination. If you leave these unset, the call can hang up.

Set both destinations explicitly to an operator ring group, a general voicemail box or a queue. Never send them back to the same IVR without a retry limit, because every pass restarts the counters and the caller loops forever. The same applies to the Return to IVR options: use them only when a bounded exit exists elsewhere.

Warning: A destination that points to a deleted extension, ring group or voicemail box shows as broken in the GUI, but a call to it can still fail silently or hang up. After deleting any object, search the IVR, Time Condition and ring group destinations for references to it.

Why do overlapping digits and extensions cause delays?

Direct Dial can be Disabled, set to Extensions, or set to a Directory. With Extensions enabled, callers can dial a user's extension during the greeting. This is useful, but it competes with the menu digits.

If an IVR option is 1 and extensions are 100 to 199, pressing 1 matches the option, but Asterisk also sees that more digits could make a longer match. It waits for the digit timeout before choosing, which feels like a stalled menu. A related symptom is dropped leading digits, covered in the separate IVR digit dropping article.

Avoid the clash by using extension numbers that do not start with an option digit, or disable Direct Dial and use a Directory. If no extension begins with the option digit (for example, option 1 with extensions 300 to 399), there is no pause. If one does, expect the delay until you change the numbers or disable Direct Dial.

How do I make the operator fallback and after-hours route safe?

The operator ring group is the usual last stop, so it must not be a dead end. Give the ring group a No Answer destination, such as a general voicemail box. The ring group voicemail article explains that setup. Without it, an unanswered operator group rings out and the caller hears nothing.

For after hours, create a Time Group such as Mon to Fri, 08:00 to 17:00. Create a Time Condition that uses it, with the IVR as the true destination and the after-hours destination as false. For holidays, add a Calendar or a second Time Group in a separate condition that is checked first, and send it to a holiday announcement.

The Time Condition reads the server clock, so the wrong timezone silently flips open and closed. Set it in three places: the system, PHP and FreePBX.

Add an override so staff can force night mode. The Time Condition's override feature code, or a Call Flow Control toggle with a BLF key, does this. See the Call Flow Control article for the setup.

# System timezone (Asterisk follows this)
timedatectl
sudo timedatectl set-timezone America/Chicago

# PHP timezone: set date.timezone in php.ini, then restart web
grep -R "date.timezone" /etc/php* 2>/dev/null

# Apply and reload after changes
fwconsole reload
asterisk -rx "core show uptime"
Warning: Changing the system timezone and running fwconsole reload can drop or disturb calls in progress and shifts the timestamps in call records. Back up first (for example with the Backup & Restore module) and make the change outside business hours.

How do I debug and test every IVR branch?

Open the CLI with `asterisk -rvvvvv`, place a test call and watch the verbose lines. A digit press shows as a Goto into the matching extension. An invalid key shows `Goto (ivr-N,i,1)`. A timeout shows `Goto (ivr-N,t,1)`. If the greeting is missing, look at the `Playback` and `Background` lines for a file that cannot be found or opened.

Use `dialplan show ivr-N` to confirm the options and destinations that were actually written. If the GUI and the dialplan disagree, you did not apply the changes. Click Apply Config after every edit, because nothing takes effect until the reload finishes.

Use the table below as the acceptance sheet. A branch passes only when you observed the expected log line and the call ended at the stated place.

BranchTriggerSettingExpected result
Valid digitPress 1 to 9IVR option destinationGoto (ivr-N,digit,1), then the department rings
OperatorPress 0Option 0 to ring groupRing group rings, then voicemail on no answer
Direct dialDial a valid extensionDirect Dial: ExtensionsExtension rings, no extra delay
Invalid digitPress an unassigned keyInvalid Retries and Retry RecordingRe-prompt, then Goto (ivr-N,i,1)
Invalid retries usedWrong key 3 timesInvalid DestinationOperator or voicemail answers
TimeoutSay or press nothing for 10 secondsTimeout and Timeout RetriesRe-prompt, then Goto (ivr-N,t,1)
Timeout retries usedSilent for every promptTimeout DestinationOperator or voicemail answers
After hoursCall outside the Time GroupTime Condition false branchAfter-hours announcement or voicemail
HolidayCall on a holiday dateCalendar or holiday Time GroupHoliday announcement
OverrideToggle night mode feature codeTime Condition overrideMenu skipped, false branch used
Operator no answerLet the operator group ring outRing group No Answer destinationVoicemail takes a message
  1. Run `asterisk -rvvvvv` and `dialplan show ivr-N` for the correct ID.
  2. Call in during open hours and press each configured digit once.
  3. Press an unassigned digit and count the re-prompts until the Invalid Destination answers.
  4. Stay silent and count the timeout re-prompts until the Timeout Destination answers.
  5. Dial an extension directly during the greeting.
  6. Force after hours with the override and call again, then repeat with the holiday group active.
  7. Let the operator ring group ring out and confirm it reaches voicemail.
asterisk -rvvvvv
*CLI> dialplan show ivr-3
*CLI> core show channels
# expected verbose lines during a test call:
#   Goto (ivr-3,1,1)     valid digit 1
#   Goto (ivr-3,i,1)     invalid digit, retries used up
#   Goto (ivr-3,t,1)     timeout, retries used up

Which common mistakes break an IVR?

Most failures come from a short list. The first is forgetting Apply Config, so the live dialplan is still the old one. The second is a missing recording, which gives silence where a prompt should be. Both show quickly in the CLI.

A Return to IVR option with no retry limit loops forever. A destination that points at a deleted extension or voicemail box breaks one branch quietly.

If digits are not detected at all, check the trunk DTMF mode. A mismatch between RFC 2833 and inband leaves the IVR playing the greeting, then timing out. See the SIP trunk DTMF article for the PJSIP setting.

Finally, a wrong timezone makes the menu play at night or the after-hours message play at noon, and the Time Condition looks fine in the GUI.

Common questions

Why does my FreePBX IVR hang up instead of using the timeout destination?

The Timeout Destination is probably left unset, or points to an object that was deleted. Set it explicitly to a ring group, queue or voicemail box and Apply Config. Then confirm with `dialplan show ivr-N` that the `t` extension goes where you expect.

Why does the IVR play the greeting again and again?

Either the retry counters are high, or a Return to IVR option or a destination sends the call back to the same IVR. Each return resets the counters. Set retries to 2 or 3 and point the final destination at a non-IVR target.

Can I send IVR timeouts straight to voicemail?

Yes. Set the Timeout Destination to a voicemail box, or to a ring group that falls through to voicemail. A dedicated general mailbox is easier to monitor than a person's mailbox.

Why does the IVR wait several seconds after I press a digit?

Asterisk is probably waiting for more digits because Direct Dial is on and an extension begins with the digit you pressed. Change the extension range or the option digits, or disable Direct Dial.

How do I test the after-hours route without waiting until evening?

Use the Time Condition override feature code or a Call Flow Control toggle to force the false branch, then call in. Switch it back afterward, since an override left on keeps the business closed to callers.

Related topics:freepbxivrtime-conditionasteriskpjsip