VoIP.info Troubleshooting

Asterisk VALID_EXTEN is missing after upgrade or DIALPLAN_EXISTS is wrong

Freeze the upgrade boundary, prove the registered function and loaded target, then distinguish omitted arguments, labels, priorities and pattern selection.

Reviewed 2026-10-19Asterisk 22 VALID_EXTEN deprecation documentation, the current Asterisk 23 DIALPLAN_EXISTS reference and function index, upstream func_dialplan implementation, function-availability, CLI help, dialplan reload and pattern-matching documentation were reviewed October 19, 2026. The older page reports branch 22 and the current pages report branch 23; installed branch, module selection, generated and loaded dialplan, context includes, patterns, labels, caller identity and route outcomes remain deployment specific. No PBX, module, package, generated configuration, dialplan, channel, lookup or live call was inspected or testedAdvancedDocumentation based · not lab tested

Freeze the upgrade and first failing lookup

Record timestamp and timezone, node, old and new Asterisk versions, package source, module inventory, configuration generator, reload or restart event, exact expression, supplied context, extension and priority or label, channel context and caller identity, expected target, returned value, warning or error, and next observed priority.

Classify the symptom: unknown VALID_EXTEN, unknown DIALPLAN_EXISTS, invalid arguments, unexpected zero, unexpected one, correct existence result but wrong normal route, generated configuration overwrite, or a later application failure.

Prove what the running process registered

Run core show functions and request help for both names on the affected node. Asterisk 22 documentation marks VALID_EXTEN() deprecated, while the Asterisk 23 index and current upstream func_dialplan surface DIALPLAN_EXISTS() instead. Treat the running CLI as deployment evidence.

If DIALPLAN_EXISTS() is missing too, inspect the build and module state before rewriting more dialplan. A package label or online branch page is not a loaded-function inventory.

Map every old call site and its omitted defaults

Search the authoritative dialplan source, supported custom includes and generator inputs for VALID_EXTEN. Record whether each call omits context or priority. Do not rely on one rendered file or replace an unrelated string in generated output.

For each call site, state the intended question in full: context present, extension at priority 1, exact numeric priority or named label. Then write DIALPLAN_EXISTS() with explicit arguments matching that contract.

Validate numeric priority, label and argument parsing

The current implementation treats a positive numeric third argument as a priority check and a non-empty nonnumeric value as a label lookup. With no priority, an extension check uses priority 1; with context only, the function checks for that context.

Preserve commas, variable expansion and quoting at the call site. An empty field, zero, negative value, malformed expansion and missing label are different evidence and should not be collapsed into a generic missing extension.

Compare existence with actual pattern selection

Inspect the loaded context using dialplan show extension@context, including matched patterns, includes and switches. Asterisk documents that several patterns can match and are ordered by specificity; auto-fallthrough can also reach another matching pattern at a later priority.

A 1 from DIALPLAN_EXISTS() does not prove that the live call selected that exact entry. Preserve the executed context, extension and priority from the channel trace before changing routing.

Correct the earliest demonstrated boundary and retest

Correct only the first proven divergence: obsolete function name, missing running function, wrong context, omitted argument, numeric priority, label, stale loaded dialplan, generator overwrite or mistaken pattern expectation. Reload through the configuration owner and verify the loaded result.

Repeat exact, pattern, missing-context, missing-extension, missing-priority or label and known-good call controls. Confirm later routing and call outcome separately, then remove temporary logging. No PBX, module, package, generated configuration, dialplan, channel, lookup or live call was inspected or tested.

Sources & applicability

Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.

Examples require adaptation to your topology. No live PBX or hardware testing is claimed.