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; };
.....
Hello Vitali,
ok.. nobody answering. or i asked something really stuped or nobody knows :)
i traced get_all_ucontacts from dlist.c from usrloc. this function supposed to give all contact that has specified flag set. and it trying to compare flag in the database with: 1074111736 in :
for (r = p->d->d_ll.first; r != NULL; r = r->d_ll.next) { for (c = r->contacts; c != NULL; c = c->next) { if (c->c.len <= 0) continue; /* * List only contacts that have all requested * flags set */ if ((c->flags & flags) != flags) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LOG(L_ERR, "Usrloc, get_all_ucontacts: flags != flags %d != %d\n", c->flags, flags); // continue; }
I am still trying to find out how it happend.. please stop me from reading sources if I forget something really important. just commenting "continue" is really bad in my opinion
Thursday, January 29, 2004, 12:07:27 PM, you wrote:
VN> Hello,
VN> I have problem with natping_interval.. it is not pinging at all and VN> look like it just doesnot aware that I have something registered
VN> I use lates table release: 0.8.12
VN> I added some more debugging in nathelper.c to timer function:
VN> DBG("DEBUG: nathelper buff != NULL\n"); VN> cp = buf; VN> while (1) { VN> memcpy(&(c.len), cp, sizeof(c.len)); VN> if (c.len == 0) { VN> LOG(L_ERR, "ERROR: nathelper::c.len == 0\n"); VN> break; VN> }
VN> and can see that it break from the loop with c.len = 0. but when i VN> look at location table in mysql there is few devices registered. VN> probably something with ul_get_all_ucontact from usrloc..
VN> please advise
VN> here is config:
VN> loadmodule "/usr/local/lib/ser/modules/sl.so" VN> loadmodule "/usr/local/lib/ser/modules/tm.so" VN> loadmodule "/usr/local/lib/ser/modules/rr.so" VN> loadmodule "/usr/local/lib/ser/modules/auth.so" VN> loadmodule "/usr/local/lib/ser/modules/auth_db.so" VN> loadmodule "/usr/local/lib/ser/modules/mysql.so" VN> loadmodule "/usr/local/lib/ser/modules/auth_mssql.so" VN> loadmodule "/usr/local/lib/ser/modules/usrloc.so" VN> loadmodule "/usr/local/lib/ser/modules/textops.so" VN> loadmodule "/usr/local/lib/ser/modules/maxfwd.so" VN> loadmodule "/usr/local/lib/ser/modules/registrar.so" VN> loadmodule "/usr/local/lib/ser/modules/nathelper.so" VN> loadmodule "/usr/local/lib/ser/modules/exec.so"
VN> modparam("nathelper", "natping_interval", 10) VN> modparam("registrar", "nat_flag", 6) VN> # modparam("nathelper", "ping_nated_only", 1) # Ping only clients behind NAT
VN> modparam("auth_db", "db_url","sql://ser:XXX@localhost/ser") VN> modparam ("usrloc", "db_mode", 1) VN> modparam("usrloc", "use_domain", 0) VN> modparam("usrloc", "db_url", "sql://ser:XXX@localhost/ser") VN> modparam("rr", "enable_full_lr", 1)
VN> force_rport(); VN> fix_nated_contact(); VN> setflag(6); # Mark as natted all clients
VN> if (!(method=="REGISTER")) record_route(); # 1=loose routing VN> # loose-route processing VN> if (loose_route()) { VN> log(1, "LOOSE ROUTE\n"); VN> t_relay(); VN> break; VN> }; VN> if(!uri==myself) { VN> log(1, "URI!=myself"); VN> t_relay(); VN> break; VN> };
VN> if (method=="REGISTER") { VN> log(1, "REGISTER REQUEST RECEIVED\n"); VN> if (!mssql_authorize("209.227.183.21", "subscriber")) { VN> log(1, "AUTH FAILED, REQUESTED\n"); VN> www_challenge("", "1"); VN> break; VN> }; VN> log(1, "AUTH OK, REGISTER\n"); VN> save("location"); VN> break; VN> };
VN> .....
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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi!
I'm using the 0.8.12_stable from cvs from 10. december 2003 and pinging works fine.
regards, klaus
... # special NAT flag indicates that a registered client is behind NAT modparam("registrar", "nat_flag", 6) ... # -- nathelper params -- modparam("nathelper", "natping_interval", 60) modparam("nathelper", "ping_nated_only", 1)
....
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; }; .....
That is very strange but in my 0.8.12 thet i get from ftp no ping_nated_only at all in nathelper.c plus it not sending flag parameter to usrloc/dlist.c gett_all_ucontacts nd it use something weird fo compare and thus ha sno result
On Sun, 1 Feb 2004, Klaus Darilion wrote:
Hi!
I'm using the 0.8.12_stable from cvs from 10. december 2003 and pinging works fine.
regards, klaus
... # special NAT flag indicates that a registered client is behind NAT modparam("registrar", "nat_flag", 6) ... # -- nathelper params -- modparam("nathelper", "natping_interval", 60) modparam("nathelper", "ping_nated_only", 1)
....
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; }; .....
I always use the web-cvs ('download tarball' at the bottom of the page) to download ser. Maybe there was a bug which was fixed in the cvs, but not in the ftp package.
klaus
Vitaly Nikolaev wrote:
That is very strange but in my 0.8.12 thet i get from ftp no ping_nated_only at all in nathelper.c plus it not sending flag parameter to usrloc/dlist.c gett_all_ucontacts nd it use something weird fo compare and thus ha sno result
On Sun, 1 Feb 2004, Klaus Darilion wrote:
Hi!
I'm using the 0.8.12_stable from cvs from 10. december 2003 and pinging works fine.
regards, klaus
... # special NAT flag indicates that a registered client is behind NAT modparam("registrar", "nat_flag", 6) ... # -- nathelper params -- modparam("nathelper", "natping_interval", 60) modparam("nathelper", "ping_nated_only", 1)
....
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; }; .....