VoIP.info Operations guide

Asterisk PJSIP connected-line and redirecting identity: trust, send and update boundaries

Keep caller, connected-line and redirecting identities separate across initial setup, answer, forwarding and transfer updates.

Reviewed 2026-10-11Asterisk 22 party-ID, CONNECTEDLINE, REDIRECTING, res_pjsip endpoint, Dial, Queue, interception-routine and AMI NewConnectedLine documentation reviewed October 11, 2026; no PBX, endpoint, provider, identity, privacy value, dialplan, SIP message, forward, transfer, display, AMI event or call was inspected or testedAdvancedDocumentation based · not lab tested

Keep the three party identities separate

Caller ID describes the party that originated a call. Connected-line identity describes the party at the far end of an established call and can change after a transfer. Redirecting identity describes the parties involved when a call is forwarded, including where it came from and where it is going. A familiar number can appear in more than one structure without those structures becoming interchangeable.

For one approved call, name the inbound and outbound channels, original caller, dialled target, connected party, redirecting-from and redirecting-to identities, presentation values and the time each value changed. A phone display, CDR field or SIP header is one observation, not the complete party model.

Map identity to the channel and call phase

Asterisk documents CALLERID on the channel from the originator and CONNECTEDLINE as the identity across the bridge. On the opposite channel their roles reverse. Local channels add another paired boundary, so a value read on Local/...;1 cannot be assumed to be the same field on Local/...;2 or either PJSIP leg.

Preserve the values before Dial or Queue, at provisional response, at answer, after bridge creation and after each blind or attended transfer. Connected-line updates can travel while a call is established; redirecting information normally belongs to routing before answer. The last display seen by an endpoint does not identify which phase or leg produced it.

Read the loaded PJSIP send and trust controls

PJSIP endpoints expose separate controls including trust_connected_line, send_connected_line, connected_line_method, rpid_immediate, send_diversion and send_history_info. They govern different directions and message behavior. Inspect the loaded endpoint on both call legs and retain the actual SIP messages before changing a template.

trust_connected_line decides whether Asterisk accepts connected-line updates from an endpoint; send_connected_line decides whether it sends updates toward that endpoint. Diversion and History-Info controls concern redirecting history. These options do not authenticate an asserted public identity, authorize a carrier number or prove that a handset supports or displays the resulting update.

Update complete values through supported functions

The CONNECTEDLINE() and REDIRECTING() functions expose name, number, presentation, source, tag, reason and count data. Their i form inhibits an immediate channel-driver update while related subfields are assembled. Set the complete intended state, then allow one update; otherwise a peer can observe a partial name, number or presentation combination.

For reusable policy, Asterisk documents interception routines based on Gosub, with explicit Return. The older interception macros are deprecated. Preserve the tag and original values, avoid destructive normalization before evidence is captured and keep privacy presentation with the identity it qualifies.

Understand the Dial and Queue suppression boundary

Dial and Queue provide an uppercase I option that blocks connected-line and redirecting updates during the dial attempt. Asterisk describes it as a broad control: it blocks redirecting updates and the initial answer connected-line update, while a later transfer update can occur after the application has completed.

Use that option only when the intended policy is explicit. It can preserve a pre-set identity, but it can also hide a legitimate answered or forwarded party. Prove whether the incorrect display came from received identity, dialplan mutation, application suppression, PJSIP send policy, SIP signaling or endpoint presentation before adding I.

Accept identity, privacy and display independently

Retest direct answer, busy or no-answer forwarding, blind transfer, attended transfer, queue delivery and any Local-channel or trunk path in scope. Preserve the Asterisk values, NewConnectedLine event where used, outbound SIP update, remote response and endpoint display as separate outcomes.

A correct internal value does not prove a header left Asterisk; a correct header does not prove the peer trusted or displayed it. An accepted carrier message does not authorize arbitrary caller or connected identity. Keep privacy, numbering format, provider policy and jurisdictional requirements in the acceptance record. This workflow is documentation-derived and was not reproduced on a customer or laboratory PBX.

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.