Skip to content

fix(mod_sofia): use profile sipip (not session host) for PAI callee_number on Polycom endpoints - #3097

Open
gaurang1102 wants to merge 3 commits into
signalwire:masterfrom
gaurang1102:fix/Polycom-endpoints-P-Asserted-Identity
Open

fix(mod_sofia): use profile sipip (not session host) for PAI callee_number on Polycom endpoints#3097
gaurang1102 wants to merge 3 commits into
signalwire:masterfrom
gaurang1102:fix/Polycom-endpoints-P-Asserted-Identity

Conversation

@gaurang1102

@gaurang1102 gaurang1102 commented Aug 4, 2026

Copy link
Copy Markdown

Description

In sofia_glue_do_invite(), FreeSWITCH builds the P-Asserted-Identity (PAI) header's callee_number URI by formatting it as sip:NUMBER@HOST. The variable host is derived from the SIP session's remote address — which for on-net Polycom calls is the Polycom device's IP, not the SIP server's IP.

Polycom endpoints resolve P-Asserted-Identity URIs against the registrar/proxy address, not the originating device address. When callee_number in the PAI header uses the session host (device IP), Polycom phones cannot resolve the identity, causing the display name on the called Polycom to be blank or incorrect for on-net transfers and attended transfers.

The existing condition !switch_stristr("polycom", ua) (present since at least 1.10.x) was added to skip the sip:number@host formatting for Polycom UAs entirely — but this leaves callee_number unformatted, which causes a different set of issues with the PAI header URI being invalid.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Code cleanup / refactor

Related Issues

#3096 (comment)

Testing

(1) Register two Polycom VVX phones (UA string contains "Polycom") against FreeSWITCH via mod_sofia.
(2) Place a call from Phone A to Phone B (on-net, both registered to same FS profile).
(3) Capture the SIP INVITE sent from FreeSWITCH to Phone B with a packet capture or sofia global siptrace on
(4) Inspect the
P-Asserted-Identity
header in the INVITE to Phone B.
(5) Observe that
callee_number
URI in the PAI header either uses Phone A's IP address as the host (incorrect) or is left unformatted.
(6) Phone B displays an incorrect or unresolvable caller identity.

  • Added/updated unit tests
  • Tested manually
  • Tested with live SignalWire credentials (if applicable)

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the project's style guidelines
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)
  • All existing tests pass

Additional Notes

… multi-node use, but the implementation was never completed. All SQL writers hardcode the literal string 'single_box' instead of reading a configurable value from the module's global configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant