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

  1. 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.

  2. 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.

  3. 03A digit dropped from a transferred number

    Attended transfers that lose a digit produce a target that looks almost right and matches nothing.

  4. 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.

  5. 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

Related failures