What this PR does / why we need it:
When Restcomm Connect (RC) receives a REFER request and RC is configured with a domain name as hostname, the Sip-URI in Request-URI header is always coming with the RC IP address. So, we have to use the Refer-To header to get Sip-URI that contains the domain name, then it can get the destination Organization SID properly.
Which issue(s) this PR fixes Fixes #2902
Special notes for your reviewer:
The SipURI is taken from Refer-To header. The searchOrganizationBySIPRequest method is used by SIP methods: INVITE and REFER in CallManager class, so I validate into the method if the request is REFER.
What this PR does / why we need it: When Restcomm Connect (RC) receives a REFER request and RC is configured with a domain name as hostname, the Sip-URI in Request-URI header is always coming with the RC IP address. So, we have to use the Refer-To header to get Sip-URI that contains the domain name, then it can get the destination Organization SID properly.
Which issue(s) this PR fixes Fixes #2902
Special notes for your reviewer: The SipURI is taken from Refer-To header. The searchOrganizationBySIPRequest method is used by SIP methods: INVITE and REFER in CallManager class, so I validate into the method if the request is REFER.