Skip to content

Sequential dial of unresolved same-realm AoR hairpins INVITE to the PBX (instant failure) #250

Description

@autopeasant

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:

  1. Leave targets empty (480 / offline marker), or
  2. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions