[Serusers] nathelper and natping interval
Jan Janak
jan at iptel.org
Sat Jan 31 02:06:48 CET 2004
Maybe your phones are not behind NAT ? If you have ping_nated_only
parameter of the nathelper module set to 1 then only users which are
known to be behind NAT will be pinged.
Take a look at the flags parameter in the location table. Only client
that have this flag set to 1 will be pinged.
Jan.
On 29-01 12:07, Vitali Nikolaev wrote:
> Hello,
>
> I have problem with natping_interval.. it is not pinging at all and
> look like it just doesnot aware that I have something registered
>
>
> I use lates table release: 0.8.12
>
> I added some more debugging in nathelper.c to timer function:
>
> DBG("DEBUG: nathelper buff != NULL\n");
> cp = buf;
> while (1) {
> memcpy(&(c.len), cp, sizeof(c.len));
> if (c.len == 0) {
> LOG(L_ERR, "ERROR: nathelper::c.len == 0\n");
> break;
> }
>
> and can see that it break from the loop with c.len = 0. but when i
> look at location table in mysql there is few devices registered.
> probably something with ul_get_all_ucontact from usrloc..
>
> please advise
>
>
>
>
> here is config:
>
>
>
> loadmodule "/usr/local/lib/ser/modules/sl.so"
> loadmodule "/usr/local/lib/ser/modules/tm.so"
> loadmodule "/usr/local/lib/ser/modules/rr.so"
> loadmodule "/usr/local/lib/ser/modules/auth.so"
> loadmodule "/usr/local/lib/ser/modules/auth_db.so"
> loadmodule "/usr/local/lib/ser/modules/mysql.so"
> loadmodule "/usr/local/lib/ser/modules/auth_mssql.so"
> loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> loadmodule "/usr/local/lib/ser/modules/textops.so"
> loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/local/lib/ser/modules/registrar.so"
> loadmodule "/usr/local/lib/ser/modules/nathelper.so"
> loadmodule "/usr/local/lib/ser/modules/exec.so"
>
> modparam("nathelper", "natping_interval", 10)
> modparam("registrar", "nat_flag", 6)
> # modparam("nathelper", "ping_nated_only", 1) # Ping only clients behind NAT
>
>
> modparam("auth_db", "db_url","sql://ser:XXX@localhost/ser")
> modparam ("usrloc", "db_mode", 1)
> modparam("usrloc", "use_domain", 0)
> modparam("usrloc", "db_url", "sql://ser:XXX@localhost/ser")
> modparam("rr", "enable_full_lr", 1)
>
> force_rport();
> fix_nated_contact();
> setflag(6); # Mark as natted all clients
>
> if (!(method=="REGISTER")) record_route(); # 1=loose routing
> # loose-route processing
> if (loose_route()) {
> log(1, "LOOSE ROUTE\n");
> t_relay();
> break;
> };
> if(!uri==myself) {
> log(1, "URI!=myself");
> t_relay();
> break;
> };
>
>
> if (method=="REGISTER") {
> log(1, "REGISTER REQUEST RECEIVED\n");
> if (!mssql_authorize("209.227.183.21", "subscriber")) {
> log(1, "AUTH FAILED, REQUESTED\n");
> www_challenge("", "1");
> break;
> };
> log(1, "AUTH OK, REGISTER\n");
> save("location");
> break;
> };
>
> .....
>
>
>
> --
> Best regards,
> Vitali
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
More information about the sr-users
mailing list