Freeze one value and its intended owner
Choose one authorized call and preserve timestamp and timezone, Asterisk version, Stasis application, WebSocket session, exact channel ID and call-leg role, variable or function text, intended channel or global scope, write request and response, expected value, explicit read, Channel snapshot, relevant events, child-channel creation and hangup. Do not retry on a fresh call leg before reconciling the original owner.
Classify the symptom: write rejected, explicit read rejected, variable not found, value absent only from Channel JSON, update event absent, inherited child missing it, old channel still shows an earlier value, global state conflicts with channel state, or the value is present but the consumer did not act.
Resolve HTTP and Stasis boundaries first
For the channel-variable endpoints, retain 400 for a missing variable parameter, 404 for a missing channel or variable and 409 for a channel outside the controlling Stasis application. Match the response to StasisStart, StasisEnd and channel destruction before treating an empty application field as a data bug.
Confirm the exact live channel rather than a display name, stale channel listing or related leg. If the application never owned the channel, use the Stasis diagnostic. Correct channel identity or ownership before changing inheritance, global scope or dialplan logic.
Compare an explicit read with snapshot and event policy
Run the explicit scoped GET while the intended channel remains in Stasis. Then inspect the loaded ari.conf channelvars list and whether the write requested report_events. A missing Channel JSON field can be expected when the variable was not selected, and a missing update event can be expected when reporting was not requested.
Do not fix visibility by exposing every variable. Add only the application-owned names needed for bounded observation, restart or reload only as the installed documentation requires, and verify the exact response and event stream after the supported change.
Trace creation order and inheritance depth
Identify where the value was set relative to creation of the callee, Local half or originated channel. A single underscore reaches the next child and is removed; a double underscore continues through descendants. Setting another prefixed or unprefixed form replaces the prior form, so later dialplan or application logic can silently change inheritance intent.
Read parent and child separately immediately after creation. If the value exists before answer but disappears with an optimized Local pair, diagnose channel ownership and optimization rather than assuming ARI caching. Inheritance and Local /n retention solve different problems.
Separate channel, global and application caches
Compare the channel-variable endpoint with the dedicated global-variable endpoint and the application's own stored state. A global value can be changed by another call, while a channel value ends with that channel. An application cache can also outlive both and present stale data after the underlying resource has changed.
Record the winning source and observation time. Do not copy a global value into every channel as a repair until the intended consistency and concurrency model is explicit, and do not convert a channel-lifetime value into durable business state.
Check point-release support before using bulk operations
If the application calls the plural /variables routes, confirm that the running version meets the documented floors: 20.20.0, 22.10.0 or 23.4.0. A client built against current documentation can otherwise fail against an older maintenance point even though the single-variable routes exist.
Use the supported single-value endpoint as the bounded fallback, not an unverified API shim. Validate every returned key and preserve a missing-variable result rather than silently substituting an empty string or an earlier cached value.
Correct one owner and prove consumption
Change only the evidenced owner: channel ID, Stasis lifecycle, variable spelling, channel-versus-global scope, point-release route, snapshot allowlist, report flag, set timing, inheritance prefix, overwrite or application cache. Repeat one authorized call and a missing-value control.
Confirm the explicit value on the intended channel, configured snapshot or event behavior, child inheritance where required, the actual dialplan or application transition, and clean hangup. Remove temporary reporting and redact sensitive data. No host, variable, event, channel, dialplan, endpoint or call was inspected or tested for this diagnostic.
Escalate a missing ARI value to dialplan scope evidence
Use the general variable diagnostic when the first mismatch is the write owner, child-creation timing, prefix depth, Gosub frame or master-channel lifetime rather than ARI caching or event order.
Sources & applicability
Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.
- Asterisk 22 ARI Channels REST API ↗
- Asterisk 22 ARI Asterisk REST API ↗
- Asterisk 22 res_ari configuration ↗
- Asterisk 22 ARI REST data models ↗
- Asterisk variable inheritance ↗
- Asterisk global variables basics ↗
- Asterisk configuration for ARI ↗
- Asterisk 22 Set application ↗
- Asterisk 22 CHANNEL function ↗
- Asterisk 22 MASTER_CHANNEL function ↗
- Asterisk 22 LOCAL function ↗
- Asterisk 22 LOCAL_PEEK function ↗
- Asterisk 22 VARIABLE_EXISTS function ↗
- Asterisk 22 IMPORT function ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.