Hi Ahmed,
in stun module, you need to configure IPs that are local to your server
- some of these IP can be also configured as listeners for SIP traffic
in OpenSIPS.
the error you get points to the fact you are using an IP that is not
locally configured on the machine.
Regards,
Bogdan
Ahmed Munir wrote:
Hi,
I'm getting and error when I configure STUN in OpenSIPs. As following
documentation of OpenSIPs, I enabled stun as listed below;
listen=udp:198.65.166.165:5060 http://198.65.166.165:5060
listen=udp:75.101.138.128:5060 http://75.101.138.128:5060
loadmodule stun.so
# Stun
modparam(stun,primary_ip,198.65.166.165)
modparam(stun,primary_port,5060)
modparam(stun,alternate_ip,75.101.138.128)
modparam(stun,alternate_port,5060)
Where the IP of OpenSIPs which is hosted on public IP i.e.
11.22.33.44. And the error I'm getting after restarting the OpenSIPs
is listed below;
May 17 05:37:13 newtest /usr/local/sbin/opensips[31199]:
ERROR:core:udp_init: bind(5, 0x81b7374, 16) on 77.66.16.35
http://77.66.16.35: Cannot assign requested address
When I commented out the listen=udp:IP:5060 the error I'm getting is;
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
DBG:core:grep_sock_info: checking if host==us: 11==9 [77.66.16.35]
== [127.0.0.1]
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
DBG:core:grep_sock_info: checking if port 5060 matches port 5060
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
DBG:core:grep_sock_info: checking if host==us: 11==11
[77.66.16.35] == [77.66.2.137]
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
DBG:core:grep_sock_info: checking if port 5060 matches port 5060
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
DBG:stun:stun_mod_init: grep_sock_in()1 failed
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
ERROR:core:init_mod: failed to initialize module stun
May 17 05:59:48 newtest /usr/local/sbin/opensips[31303]:
ERROR:core:main: error while initializing modules
Kindly assist me how can I resolve this problem.
--
Regards,
Ahmed Munir
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
www.voice-system.ro
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users