pbx.c
"Cannot find extension" in Asterisk
A jump went somewhere that does not exist. The log names both the extension and the context it looked in, which between them nearly always identify the mistake without any further searching.
What it looks like in the log
[2026-08-17 09:07:31] WARNING[4471][C-000002bb] pbx.c: Cannot find extension 'voicemail-menu' in context 'internal'
What it means
Asterisk's dialplan is a set of contexts, each containing extensions, each with numbered priorities. A Goto(), a transfer, or a queue exit names a target as some combination of the three. When any part of that triple does not resolve, execution stops and this warning is logged.
What makes it easy to fix is that the log prints exactly what it searched for and exactly where it looked. Most of the diagnosis is reading the line carefully.
Most common causes
-
01A typo in the extension or context name
The everyday cause. Copy-paste between contexts leaves a name that was right in its original home.
-
02A context renamed on one side of a jump
Renaming a context updates its definition but not every reference to it. The jump still names the old one and finds nothing.
-
03A digit dropped from a transferred number
Attended transfers that lose a digit produce a target that looks almost right and matches nothing.
-
04An include that was removed
If the target extension lived in an included context and the
include =>line was deleted, the extension still exists but is no longer visible from where the jump happens. -
05A menu option pointing at a deleted destination
IVR options outlive the destinations they point to. The option still answers, the jump still fires, and the target is gone.
How to tell which one it is
Take the extension and context names straight from the warning and search the dialplan for both. If the extension exists but in a different context, the jump needs the context qualifying or the context needs including. If it does not exist anywhere, it was renamed or removed.
Check the priority too. A jump to a specific priority that does not exist fails the same way even when the extension is perfectly present.
How to fix it
-
Correct the name at the reference, not the definition
When a context was renamed deliberately, update the jumps that point at the old name rather than recreating the old context.
-
Add the missing include
If the target is in a context that should be reachable, an
include =>in the calling context restores visibility without moving anything. -
Add a catch-all invalid handler
An
iextension in the context gives failed jumps somewhere to land, so a caller hears a message instead of silence. -
Audit IVR destinations after a dialplan change
Menu targets are the references most likely to be missed when contexts are reorganised.