Freeze one incident and expected state
Record timestamp and timezone, Asterisk node and branch, manager identity and connection, ActionID, action, exact Family, exact Key, redacted expected and observed value, response, readback, nearby control key, writer, consumer, last known good time, restart or restore history and backup reference.
Classify the first symptom: malformed or timed-out action, missing action, permission denial, wrong node or namespace, absent versus blank value, stale or overwritten value, exact delete did not occur, tree delete removed too much, state returned after restart, or correct readback with wrong downstream behavior.
Prove framing, session, action inventory and authority
Confirm AMI field framing and the terminating empty line, then match each response by ActionID. Verify the authenticated manager user, connection transport and live action inventory. In particular, do not diagnose a missing DBGetTree as corrupt data before checking the installed branch and exposed actions.
Keep session authentication, network ACL, TLS and AMI read or write classes as separate boundaries. Avoid broadening the manager account merely to test one missing action; reproduce with the smallest authorized account and a harmless bounded key when possible.
Resolve the exact namespace and read method
Compare Family and Key byte for byte with the owning application or dialplan convention, including case, separators and prefixes. Use DBGet for the exact target. Use DBGetTree only when it exists on the deployed branch and a bounded family or key inventory is needed.
A blank value, absent key, wrong family and wrong node can look similar in a client summary. Preserve the raw response and compare an adjacent known control key without dumping unrelated families or secrets.
Isolate writers, races and the downstream consumer
List every AMI client, dialplan path and module that can change the key. Correlate DBPut response and immediate readback with logs from each writer, then repeat under the concurrency that triggers the symptom. A successful read-modify-write sequence needs explicit coordination; AstDB persistence alone does not make a multi-step update atomic.
If the stored value is correct, trace the consumer independently. It may cache state, read another node, use a different family or key, parse the value differently, or have already passed the branch where the value is consumed.
Contain an exact or broad deletion before recovery
For DBDel, verify the exact missing key and adjacent controls. For DBDelTree, stop further writers, capture the affected bounded subtree and determine the deletion boundary before putting values back. Do not refill the family from memory or reuse a production backup without checking its timestamp, consistency and scope.
Recover on an isolated copy or through the application's supported write path, then restore the smallest verified set. Validate values that must remain absent as well as values that must return. Direct editing of the SQLite back end is not a safe substitute for a controlled restore.
Correct the earliest boundary and retest persistence
Correct only the first demonstrated divergence: framing, ActionID correlation, session or authority, unsupported action, wrong node, family or key, writer race, deletion scope, backup capture, restore procedure, cache or consumer logic. Avoid changing manager permissions, dialplan and stored values together.
Retest the action response, exact readback, adjacent controls, intended consumer, restart behavior where safe and documented recovery evidence. No PBX, manager account, session, AstDB family, key, value, backend file, backup, restore, 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 DBGet action ↗
- Asterisk 23 AMI DBGetTree action ↗
- Asterisk 23 AMI DBPut action ↗
- Asterisk 23 AMI DBDel action ↗
- Asterisk 23 AMI DBDelTree action ↗
- Asterisk internal database overview ↗
- Asterisk SQLite3 AstDB back end ↗
- Asterisk AMI v2 specification ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.