Hi everyone,
We’re facing an issue where Janus SIP plugin keeps registering using the private IP (172.31.0.38) in the Contact: header, even though we’ve set up the correct public IP configuration.
Environment
- Janus Version : 1.3.2
- SIP Plugin Version : 0.0.9
- Platform: Ubuntu 24.04 LTS on AWS EC2
- Public IP: 18.xxx.xxx.xxx (Elastic IP, fixed)
Problem (from sngrep)
Contact: ca <sip:5681319XX521@172.31.0.38:37543;transport=tcp>
The Contact header is exposing the internal IP instead of the public one.
Configurations
/opt/janus/etc/janus/janus.jcfg
nat: {
ice_lite: false
nat_1_1_mapping: 18.xxx.xxx.xxx
keep_private_host: false
ice_enforce_list: 18.xxx.xxx.xxx
ice_ignore_list: vmnet
/opt/janus/etc/janus/janus.plugin.sip.jcfg
general: {
contact_ip: 18.xxx.xxx.xxx
contact_rewrite: true
behind_nat: true
register_ttl: 3600
keepalive_interval: 120
sip_timer_t1x64: 32000
rtp_port_range: 20000-40000
user_agent: Janus WebRTC
sdp_ip: 18.xxx.xxx.xxx
}
SDP is showing the correct public IP:
IP to advertise in SDP: 18.xxx.xxx.xxx
But the Contact header still reflects 172.31.0.38 .
Observations
- We confirmed that behind_nat = true and contact_ip are explicitly defined.
- Janus reports in logs:Using nat_1_1_mapping for public IP: 18.xxx.xxx.xxx
- Despite this, sngrep shows that Janus is still sending the local IP in the REGISTER Contact header.
Question
What are we missing?
Is there any additional setting or known issue that prevents contact_ip or nat_1_1_mapping from being applied to the SIP Contact header in Janus v1.3.2?
Any help or guidance is appreciated!
Thanks in advance,
Ricardo