Hi All.
Here's a bit more info on the usrloc "flags" bug.
This register message was flagged at NATed eventhough my "nat_flag" was not set.
U 2005/06/10 11:01:27.853890 71.9.17.51:5060 http://71.9.17.51:5060 -> 10.3.0.221:5060 http://10.3.0.221:5060 REGISTER sip:sipdev.mycompany.net http://sipdev.mycompany.net SIP/2.0. Via: SIP/2.0/UDP 71.9.17.51:5060 http://71.9.17.51:5060 ;branch=z9hG4bK1106535059. From: Paul sip:3215590000@sipdev.company.net;tag=3843647257. To: Paul sip:3215590000@sipdev.company.net. Call-ID: 1846387046@71.9.17.51. CSeq: 778 REGISTER. Contact: sip:3215590000@71.9.17.51:5060. Authorization: Digest username="3215590000", realm="sipdev.mycompany.nethttp://sipdev.mycompany.net", nonce="42a9ac7341e18f72830c3cd553fecfbd0c9fc6", uri="sip: sipdev.company.net:5060 http://sipdev.company.net:5060", response="5443dedef7bfa7fb4a033af66a2392c", algorithm=MD5, cnonce="3dc4445e42acd47873ca563a9942104a", qop=auth, nc=00000193. max-forwards: 70. expires: 900. Content-Length: 0.
Another thing I see is that all usrloc records end up having the flag column set to 1 wheather the client is NATed or not. I'm setting the registrar modules nat_flag using client_nat_test("7") when processing REGISTER messages, however usrloc is not correctly setting the NAT_FLAG.
Regards, Paul
On 10-06-2005 11:09, Java Rockx wrote:
Hi All.
Here's a bit more info on the usrloc "flags" bug.
This register message was flagged at NATed eventhough my "nat_flag" was not set.
U 2005/06/10 11:01:27.853890 71.9.17.51:5060 http://71.9.17.51:5060 -> 10.3.0.221:5060 http://10.3.0.221:5060 REGISTER sip:sipdev.mycompany.net http://sipdev.mycompany.net SIP/2.0. Via: SIP/2.0/UDP 71.9.17.51:5060 http://71.9.17.51:5060 ;branch=z9hG4bK1106535059. From: Paul sip:3215590000@sipdev.company.net;tag=3843647257. To: Paul sip:3215590000@sipdev.company.net. Call-ID: 1846387046@71.9.17.51. CSeq: 778 REGISTER. Contact: sip:3215590000@71.9.17.51:5060. Authorization: Digest username="3215590000", realm="sipdev.mycompany.nethttp://sipdev.mycompany.net", nonce="42a9ac7341e18f72830c3cd553fecfbd0c9fc6", uri="sip: sipdev.company.net:5060 http://sipdev.company.net:5060", response="5443dedef7bfa7fb4a033af66a2392c", algorithm=MD5, cnonce="3dc4445e42acd47873ca563a9942104a", qop=auth, nc=00000193. max-forwards: 70. expires: 900. Content-Length: 0.
Another thing I see is that all usrloc records end up having the flag column set to 1 wheather the client is NATed or not. I'm setting the registrar modules nat_flag using client_nat_test("7") when processing REGISTER messages, however usrloc is not correctly setting the NAT_FLAG.
The default value of nat_flag parameter in registrar module is 4. Make sure you set that flag if client_nat_test returns true and that you are not using that flag for anything else.
Jan.
Yep - this was already checked. I've not changed by ser.cfg file in weeks. I'm using nat_flag=6 in the registrar module.
I'm not using flag 6 for anything other than NAT, and if client_nat_test("7") is true then I call setflag(6).
Here is the exact section of my ser.cfg. I therefore feel that the last "cvs up" I did against rel_0_9_0 somehow caused the issue.
if (!search("^Contact:\ +*") && client_nat_test("7")) { setflag(6); # inform registrar module of NATed client fix_nated_register(); force_rport(); };
Here is what it seems like. It seems that when a truly NATed client registers, the flag column is set properly, but subsequent non-NATed clients get flagged as being NATed because some variable isn't being reset properly either in the registrar or usrloc modules.
The reason I say this is because when I restart ser, with zero records in the location table, the first registration works fine. The flag is 1 for NATed clients and 0 or non-NATed clients, but over time all the flags eventually get set to 1 for all records. So it's almost like some variable is not being properly initialized.
Regards, Paul On 6/10/05, Jan Janak jan@iptel.org wrote:
On 10-06-2005 11:09, Java Rockx wrote:
Hi All.
Here's a bit more info on the usrloc "flags" bug.
This register message was flagged at NATed eventhough my "nat_flag" was
not
set.
U 2005/06/10 11:01:27.853890 71.9.17.51:5060 http://71.9.17.51:5060 <
10.3.0.221:5060 http://10.3.0.221:5060 http://10.3.0.221:5060 REGISTER sip:sipdev.mycompany.net http://sipdev.mycompany.net <
http://sipdev.mycompany.net%3E SIP/2.0.
Via: SIP/2.0/UDP 71.9.17.51:5060 http://71.9.17.51:5060 <
;branch=z9hG4bK1106535059. From: Paul sip:3215590000@sipdev.company.net;tag=3843647257. To: Paul sip:3215590000@sipdev.company.net. Call-ID: 1846387046@71.9.17.51. CSeq: 778 REGISTER. Contact: sip:3215590000@71.9.17.51:5060. Authorization: Digest username="3215590000", realm="sipdev.mycompany.net http://sipdev.mycompany.net<
http://sipdev.mycompany.net%3E",
nonce="42a9ac7341e18f72830c3cd553fecfbd0c9fc6", uri="sip: sipdev.company.net:5060 http://sipdev.company.net:5060 <
http://sipdev.company.net:5060%3E",
response="5443dedef7bfa7fb4a033af66a2392c", algorithm=MD5, cnonce="3dc4445e42acd47873ca563a9942104a", qop=auth, nc=00000193. max-forwards: 70. expires: 900. Content-Length: 0.
Another thing I see is that all usrloc records end up having the flag
column
set to 1 wheather the client is NATed or not. I'm setting the registrar modules nat_flag using client_nat_test("7") when processing REGISTER messages, however usrloc is not correctly setting the NAT_FLAG.
The default value of nat_flag parameter in registrar module is 4. Make sure you set that flag if client_nat_test returns true and that you are not using that flag for anything else.
Jan.