VoIP.info Troubleshooting

Asterisk PJSIP AoR or contact lookup is empty, stale or wrong

Trace the exact endpoint, AoR name, returned contact identifier, lifecycle and queried field before changing registration, qualification or dial logic.

Reviewed 2026-10-19Current Asterisk PJSIP_AOR, PJSIP_CONTACT and PJSIP_DIAL_CONTACTS function documentation plus PJSIP object-relationship and troubleshooting guidance reviewed October 13, 2026; both inspection functions are documented since Asterisk 13.2.0, while installed branch, maintenance release, loaded modules, configuration source, object names, registrations, contacts, qualification state, timing and routing remain deployment specific; no PBX, module, configuration, endpoint, AoR, contact, registration, OPTIONS exchange, packet, channel or call was inspected or testedAdvancedDocumentation based · not lab tested

Freeze the disputed object and collection time

Record timestamp and timezone, installed Asterisk release, function name, endpoint, endpoint aors value, queried AoR name and field, returned contact list, selected contact identifier and field, expected value and the dialplan consumer. Preserve a sanitized working example when one exists.

Classify the first mismatch: function unavailable, AoR missing, contact list empty, wrong identifier selected, field empty, value stale, status or RTT misunderstood, multi-contact list truncated, or routing fails despite correct inspection.

Prove release, module and loaded object state

Both inspection functions are documented since Asterisk 13.2.0, but current online documentation does not prove the running release or loaded function modules. Confirm the installed branch and that the functions are registered, then compare the active endpoint and AoR objects with the intended configuration source.

If the AoR cannot be shown, inspect spelling, type=aor, unsupported options and whether configuration was generated and loaded. Do not diagnose registration packets for an object that never loaded.

Follow endpoint to AoR before following AoR to contact

Confirm the endpoint uses the plural aors option and that it points to the intended object. Then query that exact AoR. Similar section names do not create an association automatically, and the username presented by a device does not prove the endpoint references an identically named AoR.

A missing association produces a different failure from an associated AoR with no contacts. Keep the endpoint, association and contact inventory as three observations.

Explain an empty or changing contact list

For a static destination, verify the AoR contains a complete sip: URI. For a dynamic destination, prove the REGISTER was accepted for this AoR, the registrar module is running, max_contacts permits the binding and expiry or replacement policy did not remove it. Re-run the query after one controlled registration change.

A contact can disappear or be replaced legitimately after expiry, network change, reboot or a new registration. Compare identifiers and collection times rather than treating a remembered URI as permanent.

Resolve the exact identifier and field

Preserve every comma-separated identifier from PJSIP_AOR(...,contact) and pass one complete identifier at a time to PJSIP_CONTACT(). Do not pass the AoR name where a contact ID is required, split an identifier at its internal delimiter, or assume the first contact belongs to the device under investigation.

Compare URI, expiry, User-Agent, endpoint, Path, Via, status and RTT only when each field answers the stated question. An old User-Agent string or reachable status does not prove identity, current registration ownership or usable calling.

Correct one boundary and repeat the same route

Correct only the demonstrated owner: installed function support, loaded object, endpoint aors association, static URI, registrar state, contact capacity, expiry or replacement policy, list parsing, identifier selection or field interpretation. Repeat the same lookup and preserve the later dial-string, channel and SIP outcomes separately.

Check an unrelated AoR and an intentionally absent contact so empty remains distinguishable from wrong. Remove temporary verbose logging and protect network and device identifiers. No PBX, configuration, endpoint, AoR, contact, REGISTER, OPTIONS exchange, packet, channel or call was inspected or tested for this diagnostic.

Prove the endpoint profile before following its AoR

Use the PJSIP endpoint diagnostic when the failure begins with a missing endpoint, wrong channel owner or incorrect aors association.

Check whether the wrong AMI inventory hid the contact

The inbound-registration diagnostic distinguishes static, dynamic and all-contact list contracts.

Compare AoR lookup with endpoint object detail

The AMI endpoint-state diagnostic preserves repeated associated objects and the exact completion boundary.

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.