[Serusers] NAT problems using netopia router but not cisco routers in REGISTER method
Manuel Marin Garcia
mmg at transtelco.com.mx
Fri Oct 15 07:02:42 CEST 2004
I am trying to register a Sipura ATA to ser. I am using nathelper to fix
contact in the register method. Probably Iam implementing nathelper in
the wrong way but it works with a cisco router but not with a netopia or
linksys router. I append SIP traces. Please help me!
if (method=="REGISTER") {
if (nat_uac_test("2")) {
log(1, "Se detecta cliente con NAT src address
different than via header\n");
fix_nated_contact();
append_hf("P-hint: fixed NAT contact for
request\r\n");
};
if (!www_authorize("65.77.23.7", "subscriber")) {
www_challenge("65.77.23.7", "0");
break;
};
save("location");
break;
};
The following trace is taken when the Sipura is using a netopia router.
Sipura has IP address 192.168.1.50 and the public Ip address is
200.52.114.200. These messages are repeated too many times, I have the
following question:
* In the VIA header I see that Sipura is sending private IP address not
public. Is that correct? Can I solve it using nathelper?
U 200.52.114.200:49174 -> 65.77.23.7:5060
REGISTER sip:ser.transtelco.com.mx SIP/2.0..Via: SIP/2.0/UDP
192.168.1.50:5060;branch=z9hG4bK-62ae5363..From: 915534820
0 <sip:9155348200 at ser.transtelco.com.mx>;tag=72c2198bafad6ea5..To:
9155348200 <sip:9155348200 at ser.transtelco.com.mx>..C
all-ID: e38c8da3-fe5bc96d at 192.168.1.50..CSeq: 19
REGISTER..Max-Forwards: 70..Contact: 9155348200 <sip:9155348200 at 192.16
8.1.50:5060>;expires=3600..User-Agent:
Sipura/SPA2000-2.0.7(f)..Content-Length: 0..Allow: ACK, BYE, CANCEL,
INFO, INVIT
E, NOTIFY, OPTIONS, REFER..Supported: x-sipura....
#
U 65.77.23.7:5060 -> 200.52.114.200:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP
192.168.1.50:5060;branch=z9hG4bK-62ae5363;received=200.52.114.200..From: 915
5348200
<sip:9155348200 at ser.transtelco.com.mx>;tag=72c2198bafad6ea5..To:
9155348200 <sip:9155348200 at ser.transtelco.com.
mx>;tag=b27e1a1d33761e85846fc98f5f3a7e58.44b5..Call-ID:
e38c8da3-fe5bc96d at 192.168.1.50..CSeq: 19 REGISTER..WWW-Authenti
cate: Digest realm="65.77.23.7",
nonce="416f3a1843fa3327f66e89ac738fff54f5842d41"..Server: Sip EXpress
router (0.8.99-d
ev10 (i386/linux))..Content-Length: 0..Warning: 392 65.77.23.7:5060
"Noisy feedback tells: pid=1864 req_src_ip=200.52.
114.200 req_src_port=49174 in_uri=sip:ser.transtelco.com.mx
out_uri=sip:ser.transtelco.com.mx via_cnt==1"....
This trace is taken from a Cisco router. When I use this router I do not
have any problems with regitration. VIA haeders are correct. I would
like to know if using nathelper can I solve the problem when there is a
UA behind netopia or similar router?
U 200.52.114.47:5060 -> 65.77.23.7:5060
REGISTER sip:ser.transtelco.com.mx SIP/2.0..Via: SIP/2.0/UDP
200.52.114.47:1199;branch=z9hG4bK-fc8090f5..From: 91553482
00 <sip:9155348200 at ser.transtelco.com.mx>;tag=dd7e91a3ab719570..To:
9155348200 <sip:9155348200 at ser.transtelco.com.mx>..
Call-ID: 9822f6af-701b93d4 at 192.168.1.50..CSeq: 1
REGISTER..Max-Forwards: 70..Contact: 9155348200 <sip:9155348200 at 200.52
.114.47:1199>;expires=3600..User-Agent:
Sipura/SPA2000-2.0.7(f)..Content-Length: 0..Allow: ACK, BYE, CANCEL,
INFO, INVI
TE, NOTIFY, OPTIONS, REFER..Supported: x-sipura....
#
U 65.77.23.7:5060 -> 200.52.114.47:1199
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP
200.52.114.47:1199;branch=z9hG4bK-fc8090f5..From: 9155348200 <sip:9155348200
@ser.transtelco.com.mx>;tag=dd7e91a3ab719570..To: 9155348200
<sip:9155348200 at ser.transtelco.com.mx>;tag=b27e1a1d33761e8
5846fc98f5f3a7e58.54fb..Call-ID: 9822f6af-701b93d4 at 192.168.1.50..CSeq:
1 REGISTER..WWW-Authenticate: Digest realm="65.7
7.23.7", nonce="416f3af0550c9a868bfcf2f00543c882422c96c3"..Server: Sip
EXpress router (0.8.99-dev10 (i386/linux))..Cont
ent-Length: 0..Warning: 392 65.77.23.7:5060 "Noisy feedback tells:
pid=1882 req_src_ip=200.52.114.47 req_src_port=5060
in_uri=sip:ser.transtelco.com.mx out_uri=sip:ser.transtelco.com.mx
via_cnt==1"....
#
U 200.52.114.47:1199 -> 65.77.23.7:5060
REGISTER sip:ser.transtelco.com.mx SIP/2.0..Via: SIP/2.0/UDP
200.52.114.47:5060;branch=z9hG4bK-c0d8c0ed..From: 91553482
00 <sip:9155348200 at ser.transtelco.com.mx>;tag=dd7e91a3ab719570..To:
9155348200 <sip:9155348200 at ser.transtelco.com.mx>..
Call-ID: 9822f6af-701b93d4 at 192.168.1.50..CSeq: 2
REGISTER..Max-Forwards: 70..Authorization: Digest username="9155348200
",realm="65.77.23.7",nonce="416f3af0550c9a868bfcf2f00543c882422c96c3",uri="sip:9155348200 at ser.transtelco.com.mx",algori
thm=MD5,response="1a1164b79300476badb8832b86a0ec27"..Contact:
9155348200 <sip:9155348200 at 200.52.114.47:5060>;expires=36
00..User-Agent: Sipura/SPA2000-2.0.7(f)..Content-Length: 0..Allow:
ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REF
ER..Supported: x-sipura....
#
U 65.77.23.7:5060 -> 200.52.114.47:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
200.52.114.47:5060;branch=z9hG4bK-c0d8c0ed..From: 9155348200
<sip:9155348200 at ser.trans
telco.com.mx>;tag=dd7e91a3ab719570..To: 9155348200
<sip:9155348200 at ser.transtelco.com.mx>;tag=b27e1a1d33761e85846fc98f5
f3a7e58.16ad..Call-ID: 9822f6af-701b93d4 at 192.168.1.50..CSeq: 2
REGISTER..Contact: <sip:9155348200 at 200.52.114.47:5060>;e
xpires=2245, <sip:9155348200 at 200.52.114.47:1199>;expires=3600..Server:
Sip EXpress router (0.8.99-dev10 (i386/linux))..
Content-Length: 0..Warning: 392 65.77.23.7:5060 "Noisy feedback
tells: pid=1873 req_src_ip=200.52.114.47 req_src_port=
1199 in_uri=sip:ser.transtelco.com.mx
out_uri=sip:ser.transtelco.com.mx via_cnt==1"....
More information about the sr-users
mailing list