I tryed it, but I have that error:
ERROR:nathelper:mod_init: bad config - ping_nated_only enabled, but no nat bflag set in
usrloc module
ERROR:core:init_mod: failed to initialize module nathelper
ERROR:core:main: error while initializing modules
I have:
loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "natping_processes", 3)
modparam("nathelper", "sipping_bflag", 3)
modparam("nathelper", "sipping_from",
"sip:555@217.x.x.x")
modparam("nathelper", "sipping_method",
"OPTIONS")
Cordialement,
BERGANZ François
http://www.acropolistelecom.net
Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
-----Message d'origine-----
De : Alex Balashov [mailto:abalashov@evaristesys.com]
Envoyé : vendredi 20 février 2009 11:47
À : BERGANZ François
Cc : 'Asim Riaz'; users(a)lists.kamailio.org
Objet : Re: [Kamailio-Users] NAT traversal
# nathelper
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "natping_processes", 3)
modparam("nathelper", "sipping_bflag", 3)
modparam("nathelper", "sipping_from", "sip:pinger@place")
modparam("nathelper", "sipping_method", "OPTIONS")
On initial INVITE received from user:
route[2} {
if(nat_uac_test("1")) {
fix_nated_contact();
force_rport();
}
if(search("Content-Type: application/sdp") &&
nat_uac_test("8")) {
fix_nated_sdp("10");
}
t_on_reply("1");
if(!t_relay()) {
sl_reply_error();
exit;
}
}
##
# Reply route for INVITE-related feedback and NAT fixups.
onreply_route[1] {
# Technically, an SDP payload may be returned in
# any non-100 1xx provisional message per RFC 3261,
# not necessarily 180|183. So, decide how standards-
# compliant you want to be.
if(t_check_status("200|180|183")) {
if(nat_uac_test("1"))
fix_nated_contact();
if(search("Content-Type: application/sdp")
&& nat_uac_test("8")) {
fix_nated_sdp("10");
}
}
}
On registration from user:
route[1} {
if(nat_uac_test("1")) {
fix_nated_contact();
force_rport();
setbflag(3);
}
save("location");
}
BERGANZ François wrote:
Have you an example?
Cordialement,
BERGANZ François
Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
-----Message d'origine-----
De : Alex Balashov [mailto:abalashov@evaristesys.com]
Envoyé : vendredi 20 février 2009 11:24
À : Asim Riaz
Cc : BERGANZ François; users(a)lists.kamailio.org
Objet : Re: [Kamailio-Users] NAT traversal
I wouldn't use STUN. It's an unnecessary complicated science project.
Unless the two media endpoints can't reach other, or the signaling
agents can't reach other due to asymmetric signaling or bad NAT devices
or stupidly implemented SIP ALGs or whatever, "nathelper" alone will do
just fine. Just apply its fixups to your Contact URIs and SDP endpoints
and get perfectly good far-end NAT traversal.
I have deployed this many times for service providers and it works
great. There will always be problems with some flaky end-user
equipment, but in general the benefits far outweigh the costs of
screwing around with STUN or anything of the sort.
--
Alex Balashov
Evariste Systems
Web :
http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775