VoIP.info Troubleshooting

Asterisk AMI AOCMessage uses the wrong channel or charge, or no AOC event appears

Find the first divergence across manager framing, live channel identity, message phase, units or currency encoding, AOC event delivery, signaling support and remote presentation.

Reviewed 2026-10-26Current branch-23-generated, Asterisk 22 and Certified Asterisk 22.8 AOCMessage references, current and Asterisk 22 AOC-S, AOC-D and AOC-E event references, and the AMI v2 specification were reviewed October 26, 2026; installed release, channel technology, channel identity, driver support, Advice of Charge signaling, rating authority, currency and unit policy, manager permissions, event delivery and remote presentation remain deployment-specific; no PBX, manager session, action, channel, charge, tariff, bill, carrier, endpoint, packet, signaling exchange, display or live call was inspected or testedAdvancedDocumentation based · not lab tested

Freeze one action and one symptom

Record node, release, manager identity and authority, ActionID, exact Channel or ChannelPrefix, live channel inventory, Uniqueid, MsgType, charge fields, raw response, AOC event stream, call phase and authorized downstream observation. Redact subscriber, association and monetary data in routine logs.

Classify the first symptom as rejected action, missing channel, wrong first prefix match, invalid phase fields, wrong units, wrong currency scale, no AOC event, event on a different channel, protocol not sent, remote rejection or display mismatch.

Resolve the target before changing charge fields

Re-enumerate the live channel and verify its complete name and Uniqueid immediately before sending. If ChannelPrefix was used, list every current prefix match and confirm which first match Asterisk selected. Never repair ambiguity by lengthening a guessed prefix while calls are changing.

A channel may rename, optimize away, transfer or end between discovery and control. Rebuild the current identity map; do not use Linkedid or caller ID as proof of the exact leg.

Validate the message-type contract

Check MsgType first. AOC-S rate fields belong to one or more ChargedItem groups. AOC-D and AOC-E use ChargeType, with currency and unit requirements. A field that is meaningful for one phase must not be interpreted as evidence for another.

For AOC-D, confirm Total versus SubTotal and the limited billing-ID set. For AOC-E, preserve the optional charging-association ID or number and plan as distinct fields instead of merging them into a subscriber label.

Recalculate units, currency and scales exactly

For unit charging, confirm contiguous intended indices, the required index-zero amount and each optional unit type. For currency charging, record the positive integer amount, multiplier and the post-truncation currency name separately. Do not compare a rendered decimal until the raw amount and multiplier agree.

For AOC-S duration, verify Time, TimeScale, ChargingType and any valid step-function Granularity pair. For volume or special-code rates, verify the required unit or code rather than substituting a duration field.

Separate AOC event delivery from remote presentation

Match the expected AOC-S, AOC-D or AOC-E event to the exact channel identity and time. If the action succeeds but the event is absent, inspect manager read class, event selection, filters, parser framing and reconnect gaps before altering call logic.

An event is Asterisk-side evidence that the AOC message was sent; it is not carrier acknowledgement, endpoint display proof or invoice validation. Continue through channel-driver and protocol evidence only where policy permits, then inspect the intended device or charging consumer separately.

Repair the first proved boundary and retest once

Correct only the first demonstrated fault: manager authority, framing, current channel identity, prefix ambiguity, MsgType, field group, unit index, amount, multiplier, total type, association data, event subscription, driver support or downstream presentation. Preserve the authorized charging source; do not improvise tariffs.

Retest with one disposable call plus a wrong-channel and invalid-field negative control. Remove temporary captures and retain sanitized evidence. No PBX, channel, charge, tariff, event, packet, endpoint, display, invoice 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.