VoIP.info Troubleshooting

Asterisk dialplan input is empty, truncated or misparsed

Trace one value through assignment, length, filtering, regex syntax, delimiter count, CUT variable ownership and the first downstream branch.

Reviewed 2026-10-19Current Asterisk Latest API FILTER, REGEX, ISNULL, LEN, FIELDQTY and CUT references, the dialplan-functions overview and the upstream func_strings implementation were reviewed October 19, 2026. The generated API pages reported branch 23; the installed branch, compiled and loaded modules, parser escaping, channel-variable content, delimiter, pattern, downstream application and call outcome remain deployment specific. No PBX, module, dialplan, channel, variable, external input, parsed field, route, packet, media stream or live call was inspected or testedAdvancedDocumentation based · not lab tested

Freeze one value and classify the first divergence

Record timestamp and timezone, installed Asterisk branch, loaded function help, dialplan revision, context, extension and priority, channel identifiers, input owner, source, raw length, redacted input class, allowed-character expression, filtered length and equality, regex and result, delimiter, FIELDQTY result, CUT range and downstream branch.

Classify the first divergence: never assigned, empty, unexpectedly long, characters removed, regex mismatch, parser escaping changed, wrong variable name, wrong delimiter, wrong field count, wrong range or correct parsed value used by the wrong downstream owner.

Prove the loaded functions and active dialplan

Use the running CLI help and loaded dialplan to confirm the exact function syntax and active priority instead of relying on a copied example. The Asterisk overview notes that not every function is compiled by default and directs operators to core show functions for the installation.

Do not alter input validation globally before proving which dialplan revision and channel executed. A generated configuration file on disk is not proof that the running instance loaded it.

Locate disappearance before interpreting content

Capture the source result and LEN immediately after the authorized assignment, then again before validation and before the downstream application. Use ISNULL only for its documented null result; separately preserve whether the upstream function or application reported success and whether an empty string is a permitted value.

If content crosses a Gosub, Local channel or child-channel boundary, prove variable ownership and inheritance independently. Do not reconstruct sensitive raw input in broad production logs.

Detect FILTER transformation instead of accepting it

Store the FILTER result in a separate variable and compare it with the original. Review every allowed range and escape, especially hyphen, whitespace and encoded control characters. A shorter result identifies removed characters but does not by itself identify their source.

Reject an unexpected difference at the validation boundary. Silently continuing can transform one identifier into another valid-looking value and conceal whether the defect originated in signaling, caller input, a lookup or dialplan construction.

Split regex parsing, field count and field selection

Preserve the exact quoted REGEX expression and the data-separator spacing, then test one known match and one known non-match through the same active priority. Next freeze the source variable and delimiter, inspect FIELDQTY, and call CUT with the variable name rather than an expanded expression.

Compare missing field, empty field, extra delimiter and delimiter-in-data cases separately. A regex match does not prove the intended field was selected, and a plausible CUT value does not prove the complete record had the required shape.

Correct the earliest owner and repeat boundary controls

Correct only the earliest demonstrated boundary: assignment, scope, maximum length, allowed-character expression, FILTER mismatch handling, regex anchors or escaping, delimiter, field-count requirement, CUT variable name or downstream branch. Keep rollback and avoid widening an allowlist just to pass one incident value.

Repeat the original case plus empty, disallowed-character, extra-delimiter and missing-field controls. Verify the downstream application separately and remove temporary logging. No PBX, module, dialplan, channel, variable, external input, parsed field, route, packet, media stream 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.