Summary
When building dialplan targets for a same-realm callee, default_resolve seeds locs with Location { aor: callee_uri } even when locator lookup is empty. Sequential dial then INVITEs sip:user@pbx-bind-ip with no registered destination → request is effectively hairpinned to the PBX and fails immediately (No response from callee / 500), before any real fallback target runs.
Impact
- Offline extension + sequential fallback (e.g. mobile via sip.linphone.org): first target is a useless hairpin; adds delay/noise and confuses logging.
- Any “try local then external” plan that relies on empty locator meaning “skip local” does not work without custom inspectors.
Expected
If same-realm locator lookup is empty, do not enqueue a bare local AoR without destination. Either:
- Leave targets empty (480 / offline marker), or
- Only enqueue destinations that have a resolved contact / explicit external URI.
Suggested fix
When internal_lookup_empty, locs.clear() before appending fallback/forward targets (or never push the unresolved seed AoR when lookup returns empty).
Summary
When building dialplan targets for a same-realm callee,
default_resolveseedslocswithLocation { aor: callee_uri }even when locator lookup is empty. Sequential dial then INVITEssip:user@pbx-bind-ipwith no registered destination → request is effectively hairpinned to the PBX and fails immediately (No response from callee/ 500), before any real fallback target runs.Impact
Expected
If same-realm locator lookup is empty, do not enqueue a bare local AoR without destination. Either:
Suggested fix
When
internal_lookup_empty,locs.clear()before appending fallback/forward targets (or never push the unresolved seed AoR when lookup returns empty).