Freeze the disputed lookup and owner
Record timestamp and timezone, installed Asterisk release, function and module availability, exact endpoint name, requested field, returned value, expected value, channel name and unique ID, direction, SIP Call-ID and the dialplan decision that consumed the result. Preserve a sanitized working comparison when one exists.
Classify the first mismatch: function unavailable, endpoint not loaded, wrong name, wrong field, empty configured value, documented default misunderstood, wrong channel owner, inbound identification mismatch, configuration stale after reload, or live session behavior differs from policy.
Prove the endpoint object loaded
Confirm the installed branch supports PJSIP_ENDPOINT() and the function is registered. Inspect the endpoint through the Asterisk CLI and compare its active fields with the intended configuration backend. If the endpoint cannot be shown, check spelling, type=endpoint, unsupported options, generated configuration and reload results before examining packets.
A failed outbound channel creation that names a missing endpoint is different from a loaded endpoint with no AoR or contact. Keep object loading, association and routing as separate gates.
Derive the live endpoint from the exact channel
When a live PJSIP leg exists, read CHANNEL(endpoint) on that leg and use the returned name for the configuration query. Do not derive the endpoint from caller ID, From display text, request URI, dialed extension or a different channel. Caller, Local and callee channels can have different owners and timing.
If CHANNEL(endpoint) is unavailable, first prove that the current channel is PJSIP and that the lookup runs before the channel is destroyed. Preserve an empty value as evidence rather than substituting a guessed section name.
Resolve inbound identification before changing policy
For inbound failures, prove which identifier module and order processed the request, then compare the observed SIP evidence with the matching user or identify object. An unrecognized request is rejected because no endpoint was selected; changing codec, media or AoR fields cannot repair that first boundary.
A 401 response alone does not prove a real endpoint authentication challenge. Asterisk documents dummy challenge behavior when no endpoint was matched, so retain the identification log and selected endpoint evidence.
Distinguish field output from resolved behavior
Query the exact supported field and compare it with the loaded CLI object. For aors, follow the named AoR to its contacts. For transport, distinguish an explicit assignment from the documented compatible-transport default. For codec, DTMF, identity, encryption and direct-media policy, inspect the applicable SIP or SDP exchange and exact channel rather than treating configuration as negotiation proof.
A correct endpoint field can coexist with failed routing, authentication, channel creation, answer or media. Stop at the first divergent boundary.
Correct one owner and repeat the same scenario
Correct only the demonstrated owner: function support, endpoint object, name, field, channel context, identifier configuration, endpoint association, default interpretation, reload state or later protocol behavior. Repeat the same direction and leg, then retain the endpoint lookup, channel evidence and SIP outcome separately.
Verify an unrelated working endpoint and an intentionally absent name so empty remains distinguishable from valid default behavior. Remove temporary verbose logging and protect account, network and authentication data. No PBX, configuration, endpoint, identify object, channel, SIP exchange, packet or call was inspected or tested for this diagnostic.
Branch to Realtime when the missing endpoint is database-backed
Use the PJSIP Realtime diagnostic to inspect Sorcery source order, family, connector, schema row and cache before changing endpoint options.
Sources & applicability
Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.
- Asterisk PJSIP_ENDPOINT dialplan function ↗
- Asterisk CHANNEL dialplan function ↗
- Asterisk res_pjsip endpoint configuration reference ↗
- Asterisk PJSIP configuration sections and relationships ↗
- Asterisk PJSIP troubleshooting guide ↗
- Asterisk Realtime database configuration ↗
- Asterisk setting up PJSIP Realtime ↗
- Asterisk Sorcery overview and mapping ↗
- Asterisk Sorcery caching ↗
- Asterisk Realtime schema management with Alembic ↗
- Asterisk extconfig.conf sample ↗
- Asterisk sorcery.conf sample ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.