Skip to content
Phone Guides

Diagnose Asterisk caller ID and routing failures

Keep three questions separate: which peer sent the request, which number was called, and which caller identity should be presented. Changing caller ID cannot repair a call that entered the wrong context or used an unmatched destination format.

Source-reviewed, 19 October 2026. Prepared from the cited documentation. No carrier identity or routing path has been independently tested by Phone Guides. Scope: Asterisk 22/PJSIP; accepted identities and number formats require exact provider evidence.

Write the expected values

Value Record
Sending peer Endpoint/trunk identity and matching method
Called destination Received value and expected route
Calling identity Presented number/name and permitted source
Normalisation Every prefix addition, removal or replacement
Outgoing destination Value actually sent to the chosen provider
Final display What the receiving device/service shows

Use non-sensitive test values where possible. Preserve real-number evidence privately when needed for a carrier investigation.

Confirm endpoint and context selection

Inspect the identified PJSIP endpoint and its loaded context. Source matching and call-level caller identity are different mechanisms. Consult the PJSIP object relationships before altering an authentication or identification object.

Then inspect the received extension and selected dialplan pattern. A leading plus, a country code or a carrier-specific destination format may select a different path from the number a user typed. Follow contexts and patterns and inbound/outbound routing.

Follow transformations in order

Record the original value, the rule that changes it and the value after each change. If the phone, PBX and carrier all manipulate numbers, describe all three boundaries. Avoid adding a broad catch-all route just to make one unexpected format match.

For caller data, the branch-22 CALLERID function reference describes the Asterisk-side fields. A local field value does not establish the header sent on a particular trunk or the number the carrier will permit.

Check the provider contract

Use the provider's exact trunk/service documentation for permitted identities, number format, privacy and identity-header requirements. Distinguish the outgoing request from what the terminating network displays. Do not invent a compatibility conclusion when that service evidence is absent.

The PJSIP reference defines endpoint identity options. A setting that transmits an identity header is not authorisation to present another party's number.

For an endpoint that uses asserted identity headers, distinguish the inbound and outbound controls. In the branch-22 PJSIP reference, trust_id_inbound controls whether Asterisk accepts identification from headers such as P-Asserted-Identity or Remote-Party-ID; its default is no. send_pai and send_rpid control sending those respective headers. trust_id_outbound concerns forwarding private identification details to the endpoint. These settings do not authenticate the original identity or establish that a carrier will accept it. Review the exact trusted peer, privacy behaviour and provider contract before changing them.

When diagnosing a mismatch, compare the inbound headers, Asterisk's resulting caller fields, the selected outbound endpoint's header policy, and the provider's response on that leg. Keep a withheld-identity case distinct from an ordinary caller ID. Redact full numbers and identity headers from shared traces.

Confirm a correction narrowly

Repeat the same route after one justified change. Check the receiving destination, intended caller presentation, a withheld-identity case where supported, and a deliberately denied destination. Verify that number normalisation has not expanded outbound permissions.

Keep emergency/service routing within its established carrier and location arrangements; do not infer it from an ordinary successful call. See Australian numbering and site settings for that separation.

Return to Asterisk documentation.