VoIP.info Guide

Asterisk AMI PJSIP subscription inventory and dialog evidence

Read inbound and outbound subscription lists as completed AMI snapshots while keeping notifier roles, subscriber roles, SIP dialogs and endpoint display separate.

Reviewed 2026-10-26Current branch-23 inbound and outbound subscription-list actions and detail events, res_pjsip and res_pjsip_pubsub configuration references, presence and resource-list guidance, PJSIP troubleshooting guidance and the AMI v2 specification were reviewed October 21, 2026. The actions are documented since Asterisk 12.0.0, while installed branch, loaded modules, manager permissions and filters, endpoint identity, subscription dialogs, persistence records, event packages, body generators, device interpretation and state sources remain deployment specific. No PBX, module, manager account, endpoint, subscription, persistence record, SUBSCRIBE, NOTIFY, packet, phone display, mailbox lamp, BLF key or live call was inspected or testedAdvancedDocumentation based · not lab tested

Choose the inventory direction before reading a row

PJSIPShowSubscriptionsInbound lists subscriptions for which Asterisk received SUBSCRIBE and acts as notifier, periodically sending NOTIFY. PJSIPShowSubscriptionsOutbound lists subscriptions for which Asterisk acts as subscriber, sends SUBSCRIBE and receives NOTIFY. Both actions are documented since Asterisk 12.0.0.

Direction is an ownership boundary, not a network-interface label. An inbound subscription is not an inbound call, and an outbound subscription is not an outbound registration. Record the responding node, action name, manager identity and timestamp before comparing rows.

Require the terminal event before calling the list complete

Each action emits one detail event per subscription and then its matching InboundSubscriptionDetailComplete or OutboundSubscriptionDetailComplete event. Correlate the initial response, every detail event and the terminal event under one unique ActionID.

AMI is asynchronous, and the specification makes clients responsible for associating events with actions. A socket timeout, filtered event stream or partial parser result is not an empty inventory. Compare only completed snapshots taken from the same node and direction.

Treat each detail row as dialog metadata

The detail events expose Asterisk role, endpoint, dialog Call-ID, current state, caller identity, subscription type and type-specific extension state or mailbox list. The documented built-in types are mwi and extension_state, but third-party modules can extend the set.

A row shows Asterisk has a subscription object in that completed snapshot. It does not prove the latest SUBSCRIBE was accepted by the intended peer, that a particular NOTIFY crossed the network, that the body matched the device contract or that the phone rendered the expected lamp.

Map inventory rows back to the state owner

For extension-state subscriptions, map the reported extension to the endpoint subscription context, loaded hint, device-state provider and required presence or dialog body generator. For MWI, map the reported mailbox list to the intended mailbox-state owner and chosen solicited or unsolicited delivery model.

allow_subscribe, context selection, event-package support and body-generation modules sit upstream of a useful inbound row. A correct row cannot repair a missing hint, wrong mailbox, stale state publisher or incompatible endpoint body format.

Keep persistence and resource lists from inflating conclusions

res_pjsip_pubsub documents persisted subscription data including endpoint, expiry, Contact URI, dialog sequence, transport and the original SUBSCRIBE packet. It also documents pruning a reliable-transport subscription after restart. Treat these records as sensitive recovery inputs, not proof that the peer remains connected or that a restored dialog delivered a new notification.

A resource-list subscription can represent many back-end resources, may send partial or full state, and can batch notifications. One top-level row, a delayed update or an omitted transient state therefore needs the loaded list and actual NOTIFY body before it is interpreted as one-to-one endpoint behavior.

Verify the SIP exchange and visible outcome independently

For one authorized state change, preserve the relevant completed AMI snapshot, matching dialog Call-ID, SUBSCRIBE or renewal, response, NOTIFY sequence, Event and Subscription-State headers, body type, body content, peer response and endpoint display. Redact identities, mailbox metadata and full persisted packets before sharing.

A 200 response to NOTIFY proves receipt of that SIP request, not a changed lamp or key. A correct display does not prove every subscription is healthy. No PBX, subscription, packet, phone display, mailbox lamp, BLF key or live call was inspected or tested.

Precede dialog evidence with a completed list-object inventory

The AMI resource-list guide records list membership and settings before a fresh subscription is evaluated.

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.