Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restcomm REFER is using IP instead of Organization in URI #2902

Open
croufay opened this issue Apr 6, 2018 · 0 comments
Open

Restcomm REFER is using IP instead of Organization in URI #2902

croufay opened this issue Apr 6, 2018 · 0 comments

Comments

@croufay
Copy link
Contributor

croufay commented Apr 6, 2018

we have replicated the scenario in our laboratory with the same version as yours (8.3.0-20). I am attaching some information to our R&D team to give us a recommendation with the REFER method.

The modification in RestcommOne Connect 8.3.0-20 is:

Before:

        destinationOrganizationSid = getOrganizationSidBySipURIHost(storage, (SipURI)request.getRequestURI());
        // try to get destinationOrganizationSid from toUril
        destinationOrganizationSid = destinationOrganizationSid != null ? destinationOrganizationSid : getOrganizationSidBySipURIHost(storage, (SipURI)request.getTo().getURI());

After:

        if (request.getMethod().equals("REFER")) {
            destinationOrganizationSid = getOrganizationSidBySipURIHost(storage, (SipURI)request.getAddressHeader("Refer-To").getURI());
            if(destinationOrganizationSid == null){
                logger.error("destinationOrganizationSid is NULL: Refer-To Uri is: "+(SipURI)request.getAddressHeader("Refer-To").getURI());
            }else{
                logger.debug("getMostOptimalIncomingPhoneNumber: sourceOrganizationSid: "+sourceOrganizationSid+" : destinationOrganizationSid: "+destinationOrganizationSid +" Refer-To Uri is: "+(SipURI)request.getAddressHeader("Refer-To").getURI());
            }
        } else {
            destinationOrganizationSid = getOrganizationSidBySipURIHost(storage, (SipURI)request.getRequestURI());
            // try to get destinationOrganizationSid from toUril
            destinationOrganizationSid = destinationOrganizationSid != null ? destinationOrganizationSid : getOrganizationSidBySipURIHost(storage, (SipURI)request.getTo().getURI());
        }

I have tried from RVD applications and customer RCML application and the patch is working.

The first patch was not working because the getMostOptimalIncomingPhoneNumber method is used by others SIP methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment