Freeze one device, node and observation
Record the installed Asterisk branch and maintenance release, loaded res_manager_devicestate module, local entity ID, manager identity, session mask and filters, exact device string and case, provider owner, remote writer entity, requested state, Cachable value, action ActionID, response, raw events, completion boundary, hint mapping and separately observed endpoint or application behavior.
Classify the fault first: action unavailable, write rejected, list incomplete, device absent, state stale, unexpected provider value, snapshot contaminated by live events, correct device state but wrong hint, or correct hint but wrong subscriber display.
Gate the write by version and ownership
If DeviceStateChange is unknown or unsupported, compare the installed maintenance release with the documented minimum for its branch and confirm res_manager_devicestate is loaded. Do not substitute a CLI command or DEVICE_STATE() write to a non-Custom local provider.
Confirm that the device represents a remote resource and that EntityID identifies the originating remote Asterisk node. A local EntityID is documented to be rejected. For a non-Custom name, stop and prove provider ownership before retrying.
Compare cache intent with the later read
Preserve whether Cachable was omitted, true or false. The action documentation says true is the default and is needed to persist an update. Compare the accepted action, immediately observed event, bounded list and later reconciliation separately; do not call the state persistent merely because one listener saw a transition.
If remote data can age, define an application expiry and resynchronization rule. Repeatedly writing the last value without source time or ownership evidence can make a disconnected node look healthy.
Rebuild the list at its completion boundary
Issue one DeviceStateList request with a unique ActionID, retain every raw frame and wait for the corresponding DeviceStateListComplete. Check EventList and ListItems before publishing the snapshot. An absent completion is an incomplete transaction, not an empty authoritative list.
Separate list rows from unsolicited CALL-class DeviceStateChange events arriving on the same session. Check manager read permissions, session masks and event filters before blaming the state provider; filtering a row or completion can produce an internally inconsistent client snapshot.
Follow the provider into the hint and subscriber
Read the exact provider state with DEVICE_STATE() or the appropriate installed diagnostic surface, then inspect the loaded hint mapping separately. A DeviceStateChange event covers a device provider; ExtensionStatus represents the hint result and can combine multiple devices.
If the provider is correct but the hint is wrong, investigate its mapping and aggregation. If the hint is correct but a phone lamp is stale, move to subscription, NOTIFY and endpoint rendering evidence. Do not rewrite the source state to compensate for a downstream consumer fault.
Verify the operational claim at its owner
Correlate registration and contact evidence, qualification, INVITE response, queue policy, subscription delivery, lamp rendering and media with their own records. UNAVAILABLE is not a universal packet-loss result, NOT_INUSE is not guaranteed reachability, and BUSY is not proof of a remote SIP 486.
Correct the first failing boundary, repeat one bounded transition and preserve rollback. No PBX, node, module, manager session, state provider, hint, subscription, endpoint, packet, media stream or live call was inspected or tested for this diagnostic.
Check whether the symptom belongs to user presence
The AMI presence-state diagnostic distinguishes application-owned user presence from a device provider and its hint aggregate.
Follow corrected provider state into its loaded hint
The AMI extension-state diagnostic checks whether the intended context-bound aggregate changed after its device providers did.
Do not repair a state-source defect with queue policy
The ring-in-use diagnostic first matches the exact StateInterface and completed device-state sequence.
Sources & applicability
Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.
- Asterisk 23 AMI DeviceStateChange action ↗
- Asterisk 22 AMI DeviceStateChange action ↗
- Asterisk 23 AMI DeviceStateList action ↗
- Asterisk 22 AMI DeviceStateList action ↗
- Asterisk 23 AMI DeviceStateChange event ↗
- Asterisk 22 AMI DeviceStateChange event ↗
- Asterisk 23 AMI DeviceStateListComplete event ↗
- Asterisk 22 AMI DeviceStateListComplete event ↗
- Asterisk 23 DEVICE_STATE function ↗
- Asterisk 22 DEVICE_STATE function ↗
- Asterisk device state fundamentals ↗
- Asterisk extension state and hints ↗
- Asterisk AMI event filtering ↗
- Asterisk 23 AMI PresenceState action ↗
- Asterisk 22 AMI PresenceState action ↗
- Asterisk 23 AMI PresenceStateList action ↗
- Asterisk 22 AMI PresenceStateList action ↗
- Asterisk 23 AMI PresenceStateChange event ↗
- Asterisk 22 AMI PresenceStateChange event ↗
- Asterisk 23 AMI PresenceStatus event ↗
- Asterisk 22 AMI PresenceStatus event ↗
- Asterisk 23 AMI PresenceStateListComplete event ↗
- Asterisk 22 AMI PresenceStateListComplete event ↗
- Asterisk 23 PRESENCE_STATE function ↗
- Asterisk 22 PRESENCE_STATE function ↗
- Asterisk presence-state fundamentals ↗
- Asterisk state query and manipulation ↗
- Asterisk 23 AMI ExtensionState action ↗
- Asterisk 22 AMI ExtensionState action ↗
- Asterisk 23 AMI ExtensionStateList action ↗
- Asterisk 22 AMI ExtensionStateList action ↗
- Asterisk 23 AMI ExtensionStatus event ↗
- Asterisk 22 AMI ExtensionStatus event ↗
- Asterisk 23 AMI ExtensionStateListComplete event ↗
- Asterisk 22 AMI ExtensionStateListComplete event ↗
- Asterisk 23 EXTENSION_STATE function ↗
- Asterisk 22 EXTENSION_STATE function ↗
- Asterisk 23 HINT function ↗
- Asterisk 22 HINT function ↗
- ↗
- ↗
- ↗
- ↗
- ↗
- ↗
- ↗
- ↗
- ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.