<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Dear all,<br>
<div class="moz-forward-container"> <br>
I have a FreeSWITCH server that lies behind a NAT on the server
side. While usual SIP-Calls (using UDP) are working, I'm facing
issues when it comes to the WebSocket Server. While specifying the
external IP in the profile definition (<param name="ext-sip-ip"
value="$${external_rtp_ip}"/>), on WebSocket the server sends
the private instead of the public ip. The reverse proxying is done
using nginx.<br>
As I didn't found an answer on the web, I hope you can help me!<br>
<br>
Here is a snippet of the ws communication (FreeSWITCH is answering
the INVITE; 172.XX.42.1 is the private gateway and public nginx
server; 172.XX.0.3 is the private IP the FreeSWITCH server uses):<br>
<br>
SIP/2.0 200 OK<br>
Via: SIP/2.0/WS
ii6c2sdshbua.invalid;branch=z9hG4bK7579777;received=172.XX.42.1;rport=43567<br>
From:
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:13c0f2b0-b5b8-4822-afe6-38930cddc646@domain.tld"><sip:13c0f2b0-b5b8-4822-afe6-38930cddc646@domain.tld></a>;tag=8a01krubf0<br>
To:
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:a3352c35-7a6d-4c9e-aeea-1a5f74e90b6f@domain.tld"><sip:a3352c35-7a6d-4c9e-aeea-1a5f74e90b6f@domain.tld></a>;tag=p2K9pvtH70Nmm<br>
Call-ID: l6ijpvvic6l1ung778sr<br>
CSeq: 6213 INVITE<br>
Contact:
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sip:a3352c35-7a6d-4c9e-aeea-1a5f74e90b6f@PUBLIC.IP:5060;transport=udp"><sip:a3352c35-7a6d-4c9e-aeea-1a5f74e90b6f@PUBLIC.IP:5060;transport=udp></a><br>
User-Agent:
FreeSWITCH-mod_sofia/1.3.4-n20140511T185316Z-1~trusty+1+git~20140509T214701Z~7e0995d069~64bit<br>
[...]<br>
o=FreeSWITCH 1403358295 1403358296 IN IP4 <b>172.XX.0.3</b><br>
s=FreeSWITCH<br>
c=IN IP4 <b>172.XX.0.3</b><br>
[...]<br>
a=ice-pwd:6MXY3JdpOCdmDT9W<br>
a=candidate:0823320109 1 udp 659136 <b>172.XX.0.3</b> 25176
typ host generation 0<br>
<br>
The nginx proxy configuration looks like the following:<br>
location /sip {<br>
access_log off;<br>
proxy_pass <a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://172.XX.0.3:5066">http://172.XX.0.3:5066</a>;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
<br>
# WebSocket support (nginx 1.4)<br>
proxy_http_version 1.1;<br>
proxy_set_header Upgrade $http_upgrade;<br>
proxy_set_header Connection "upgrade";<br>
proxy_redirect off;<br>
}<br>
<br>
<br>
What configuration options do I have to set, so that FreeSWITCH
uses the public IP for candiate creation and all other occurences
instead of the private one?<br>
Or is it easier to adjust nginx configuration to replace the IP?<br>
<br>
Kind regards<br>
Bernhard<br>
<br>
</div>
<br>
</body>
</html>