RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
240 stars 214 forks source link

SIP REFER method is now working with organizations and special cases #2949

Closed JuankGarcia closed 6 years ago

JuankGarcia commented 6 years ago

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: I change the way to get the destination Organization SID when RC is receiving a REFER request, this was moved to the transfer method in CallManager class to cover other special cases