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
Open
Conversation
… 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.
…inate leg via ovars
…umber on Polycom endpoints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.
Checklist
Additional Notes