nexgen http redirect https

LIEW CHEE

New Member
Hi
I followed the instructions of https://flashphoner.com/click-to-call-from-demo-to-production/ to complete the test. However, under normal conditions, the URL announcement is www.abc.com and the nextgen profile will be set to http redirect https.
I tested many settings in nextgen.conf
return 301 $scheme://10.icbccn.xyz$request_uri;
or
return 301 https://$host$request_uri;
or
return 308 https://$host$request_uri;
or
return 307 https://$server_name$request_uri;
All to the same result not register to sip server
Code:
Create new session with url wss://10.icbccn.xyz:8443
DevTools failed to load SourceMap: Could not parse content for https://10.icbccn.xyz/bootstrap.css.map: Unexpected token < in JSON at position 0
click-to-call-min.js:67 Uncaught TypeError: Cannot read property 'createCall' of undefined
    at HTMLButtonElement.call (click-to-call-min.js:67)
If http redirect https is not set, you can register to the sip server . Is there any good way to be able to http redirect https to allow sip to register?
 

Max

Administrator
Staff member
Good day.
Seems like your custom backend returns 403 Forbidden to /connect REST hook if connecting from the other domain than 10.icbccn.xyz
1613528115153.png

Please check your backend script: is the origin domain filtered? What origin domain is exposed to the backend when you're trying to connect via reverse proxy server?
Please also read here about nginx server setup as reverse proxy.
 

LIEW CHEE

New Member
Hi
Follow the instructions to set nextgen.conf and the experiment results were not successful .I don't understand which side is wrong. I am a nextgen beginner. Attach the current configuration file for your reference. Please guide me to solve the problem that redirect https cannot register with sip.
 

Attachments

Max

Administrator
Staff member
The problem is on your backend side. Please check how /connect REST hook is handled, why backend script return 403 Forbidden.
Or you can provide us SSH access both to WCS server and to backend server using this private form, we will check.
 

Max

Administrator
Staff member
We checked your server. It seems to be working as confugured: when click-to-call page is opened from the same domain which is filtered by backend script, the connection is established successfully
1613622539333.png

If the page is opened from any other domain, websocket session cannot be established because backend script returns 403 Forbidden.
Please clarify what exactly works wrong?
 
Top