Freeze one action and expected consumer
Record timestamp and timezone, Asterisk node and branch, manager user and connection, ActionID, action, exact Channel header or its deliberate omission, Variable, redacted Value, response, VarSet observation, a fresh Getvar result, channel Uniqueid and Linkedid, and the dialplan or application expected to consume the value.
Classify the first symptom: malformed or timed-out action, permission denial, missing channel, wrong scope, blank or unexpected read, blocked function, accepted write with no event, event with the wrong channel, child did not inherit, shared/global race, or correct variable with the wrong downstream outcome.
Prove framing, response correlation and authority
Confirm header: value framing and the terminating empty line, then match the response by ActionID. Verify the authenticated manager identity and the live action inventory before changing manager.conf. An AMI login does not prove authority to use every action.
Do not log secrets or broad variable dumps. Constrain the manager account, network reachability, action classes and application inputs to the smallest required scope.
Resolve the target at action time
If Channel is absent, test the expected global variable explicitly; do not interpret a global read as a failed channel read. If it is present, resolve the exact live channel and correlate Uniqueid and Linkedid. Check for hangup, rename, Local-channel optimization, transfer or replacement between channel discovery and the action.
Repeat a read on the exact channel and a deliberately different control channel. A familiar endpoint label or partial name is not sufficient channel identity.
Distinguish variables from functions and namespaces
Inspect the literal target: ordinary variable, _ or __ inheritance marker, GLOBAL(), SHARED(), LOCAL() or another dialplan function. For a function, confirm that its module is loaded, it supports the requested read or write, its arguments are correct and external execution is permitted without enabling unsafe compatibility behavior.
For inheritance, place the parent write before child creation and inspect both sides. For shared or global state, test concurrent writers and protect any read-modify-write sequence; a later correct value can hide an earlier race.
Explain a missing VarSet event independently
Keep the synchronous Setvar response separate from asynchronous events. Verify session event selection, read classes and configured filters, including exact case for the VarSet event name. The current filtering guide supports name and header matching; a filter that includes only other event types can suppress VarSet while the write succeeds.
Compare with a controlled write whose event is safe to observe, then issue a fresh Getvar. An event proves a reported change, not that every connected manager received it or that the business workflow succeeded.
Correct the earliest boundary and retest the consumer
Correct only the first demonstrated divergence: message framing, ActionID handling, manager authority, missing or stale channel, global-versus-channel scope, variable spelling, inheritance timing, function syntax or policy, event mask or filter, concurrency, or downstream dialplan logic. Avoid changing manager permissions, dialplan and event filters together.
Retest set, response, event where expected, fresh get, child inheritance if relevant and the intended dialplan branch. Confirm teardown so call-scoped data is not mistaken for durable state. No PBX, manager account, session, channel, variable, function, event, dialplan, 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.
- Asterisk 23 AMI Getvar action ↗
- Asterisk 23 AMI Setvar action ↗
- Asterisk 23 AMI VarSet event ↗
- Asterisk channel-variable setting and substitution ↗
- Asterisk channel-variable inheritance ↗
- Asterisk global-variable basics ↗
- Asterisk 23 SHARED dialplan function ↗
- Asterisk external-protocol dialplan-function safeguards ↗
- Asterisk AMI event filtering ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.