VoIP.info Troubleshooting

Asterisk PJSIP From parameter is empty, misplaced or absent

Trace release support, parameter type, channel ownership, pre-dial timing, emitted From syntax and intermediary rewriting before replacing a complete SIP header.

Reviewed 2026-10-13Current Asterisk PJSIP_HEADER_PARAM, PJSIP_HEADER, PJSIP_PARSE_URI_FROM, CHANNEL, Dial and pre-dial-handler documentation plus RFC 3261 reviewed October 13, 2026; PJSIP_HEADER_PARAM is documented since Asterisk 18.16.0 and 20.1.0 and currently supports only the From header, while installed release, loaded module, dialplan owner, channel leg, parameter contract, endpoint policy, upstream rewriting and emitted SIP remain deployment specific; no PBX, module, endpoint, trunk, dialplan, channel, request, response, packet or call was inspected or testedAdvancedDocumentation based · not lab tested

Freeze one affected request and expected field

Record timestamp and timezone, installed Asterisk release, endpoint, caller and callee channel names and unique IDs, dial destination, parameter name and value, required uri or header placement, write location, request method, sanitized emitted From field, next hop and peer response.

Classify the first mismatch: unavailable function, unsupported header, wrong parameter type, wrong channel, pre-dial handler not executed, later overwrite, malformed syntax, intermediary rewrite, peer rejection or a separate identity-policy failure.

Prove function and module availability

Confirm the installed branch includes PJSIP_HEADER_PARAM() at a documented level: 18.16.0, 20.1.0 or later, and that the providing PJSIP header-function module is loaded. Confirm the channel uses PJSIP.

A function listed in current online documentation does not establish its presence in an older maintenance release or a selected package. An empty result can also mean the parameter is absent on the current channel, not that the module is missing.

Inspect placement instead of matching text

Read the complete sanitized From value and determine whether the parameter occurs inside the URI or after the angle bracket. Call the function with the explicit uri or header type. Do not rely on the default while investigating a placement symptom.

Use PJSIP_PARSE_URI_FROM() when the task is to parse a URI stored in a variable. It does not prove that PJSIP_HEADER_PARAM() read or changed the active channel header.

Prove the write ran on each intended callee

Trace the lowercase b() pre-dial handler on the outbound PJSIP channel before the INVITE is created. Record one execution for each forked destination. Compare caller and callee channel identifiers rather than assuming a shared linked ID means shared headers.

A write on the inbound caller, uppercase B() handler, Local-channel sibling or a callee that never placed the request cannot establish the field on the affected outbound leg.

Compare Asterisk output, next hop and response

If Asterisk emits the intended field, compare it with the SBC, proxy or carrier-facing copy. Preserve any normalization, privacy or asserted-identity policy separately. Then record the peer response and any provider evidence naming the required parameter and placement.

A missing parameter at the far side can be intermediary behavior. A present parameter with a rejected call can be unsupported value, identity policy or another SIP failure; it is not automatically a dialplan failure.

Correct one boundary and repeat the control

Correct only the demonstrated boundary: maintenance release, loaded module, explicit parameter type, handler option, channel selection, timing, later overwrite or intermediary policy. Repeat the same request and a control without the parameter.

Do not replace the complete From header or add unrelated identity fields to hide an unresolved contract. No PBX, module, endpoint, trunk, dialplan, channel, request, response, packet or call was inspected or tested for this diagnostic.

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.