Hi,
I get the message “Registration failed: Wrong password” everytime I try to register my sip phone with asterisk when my Sip phone is on a public IP adress Y.Y.Y.Y.
The registration is successful when my sip phone is within the same network as asterisk.
(Asterisk is behind a pix with a local IP 192.168.0.114 and traffic to public IP X.X.X.X has all SIP and RTP ports forwarded to Asterisk’s local IP through the pix)
In both cases I use the exact same Sip.conf:
[general]
; All inbound SIP calls end up in context [from-sip] in extensions.conf
disallow=all
allow=ulaw
port = 5060 ; Port to bind to
bindaddr = 0.0.0.0 ; Address to bind to
localnet=192.168.0.0/255.255.255.0
context = Unknown-Peer ; Default for incoming calls
externip = X.X.X.X
useragent=
rtpholdtimeout=300
rtptimeout=60
language=en
musicclass=default
canreinvite=no
tos=0x08 ; lowdelay,throughput,reliability,mincost,none
maxexpirey=180 ; Max length of incoming registration we allow
defaultexpirey=160
srvlookup=yes
realm=<sip.realm.com> ; Realm for digest authentication
[SipPhone]
type=peer
regexten=
insecure=yes
username=
secret=
host=dynamic
nat=yes
context=default
canreinvite=no
disallow=all
echocancel=yes
allow=ulaw
callgroup=1
pickupgroup=1
Sip registration when sip phone is at a public IP:
<-- SIP read from Y.Y.Y.Y:5060:
REGISTER sip:192.168.0.114 SIP/2.0
Via: SIP/2.0/UDP Y.Y.Y.Y:5060;branch=z9hG4bK-d99aa1c3
From: “” sip:SipPhone@192.168.0.114;tag=e082b3e215a641e9o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 8ca76cf6-208bbe5@Y.Y.Y.Y
CSeq: 1 REGISTER
Max-Forwards: 70
Contact: “” sip:SipPhone@Y.Y.Y.Y:5060;expires=20
User-Agent: Sipura
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
— (11 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to Y.Y.Y.Y : 5060 (non-NAT)
Transmitting (NAT) to Y.Y.Y.Y:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP Y.Y.Y.Y:5060;branch=z9hG4bK-d99aa1c3;received=Y.Y.Y.Y
From: “” sip:SipPhone@192.168.0.114;tag=e082b3e215a641e9o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 8ca76cf6-208bbe5@Y.Y.Y.Y
CSeq: 1 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:SipPhone@X.X.X.X
Content-Length: 0
Transmitting (NAT) to Y.Y.Y.Y:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP Y.Y.Y.Y:5060;branch=z9hG4bK-d99aa1c3;received=Y.Y.Y.Y
From: “” sip:SipPhone@192.168.0.114;tag=e082b3e215a641e9o0
To: “” sip:SipPhone@192.168.0.114;tag=as44beba3f
Call-ID: 8ca76cf6-208bbe5@Y.Y.Y.Y
CSeq: 1 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:SipPhone@X.X.X.X
WWW-Authenticate: Digest algorithm=MD5, realm="<sip.realm.com>", nonce="20a46c45"
Content-Length: 0
Scheduling destruction of call '8ca76cf6-208bbe5@Y.Y.Y.Y’ in 15000 ms
<-- SIP read from Y.Y.Y.Y:5060:
REGISTER sip:192.168.0.114 SIP/2.0
Via: SIP/2.0/UDP Y.Y.Y.Y:5060;branch=z9hG4bK-585fc4db
From: “” sip:SipPhone@192.168.0.114;tag=e082b3e215a641e9o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 8ca76cf6-208bbe5@Y.Y.Y.Y
CSeq: 2 REGISTER
Max-Forwards: 70
Authorization: Digest username="",realm="<sip.realm.com>",nonce=“20a46c45”,uri=“sip:192.168.0.114”,algorithm=MD5,response="1b71ff9741e2f7d5f825e5ccfa0e1c08"
Contact: “” sip:SipPhone@Y.Y.Y.Y:5060;expires=20
User-Agent: Sipura
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
— (12 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to Y.Y.Y.Y : 5060 (NAT)
Transmitting (NAT) to Y.Y.Y.Y:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP Y.Y.Y.Y:5060;branch=z9hG4bK-585fc4db;received=Y.Y.Y.Y
From: “” sip:SipPhone@192.168.0.114;tag=e082b3e215a641e9o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 8ca76cf6-208bbe5@Y.Y.Y.Y
CSeq: 2 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:SipPhone@X.X.X.X
Content-Length: 0
Transmitting (NAT) to Y.Y.Y.Y:5060:
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP Y.Y.Y.Y:5060;branch=z9hG4bK-585fc4db;received=Y.Y.Y.Y
From: “username” sip:SipPhone@192.168.0.114;tag=e082b3e215a641e9o0
To: “” sip:SipPhone@192.168.0.114;tag=as44beba3f
Call-ID: 8ca76cf6-208bbe5@X.X.X.X
CSeq: 2 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:@X.X.X.X>
Content-Length: 0
Oct 26 17:19:41 NOTICE[23480]: chan_sip.c:11045 handle_request_register: Registration from ‘"" sip:SipPhone@192.168.0.114’ failed for ‘Y.Y.Y.Y’ - Wrong password
Scheduling destruction of call ‘8ca76cf6-208bbe5@216.191.12.219’ in 15000 ms
When Sip Phone is on a local IP:
<-- SIP read from 192.168.0.146:5060:
REGISTER sip:192.168.0.114 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.146:5060;branch=z9hG4bK-c453e5a9
From: “” sip:SipPhone@192.168.0.114;tag=ebb677a85784e098o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 624b0ee8-53873258@192.168.0.146
CSeq: 1 REGISTER
Max-Forwards: 70
Contact: “” sip:SipPhone@192.168.0.146:5060;expires=360
User-Agent: Sipura
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
— (11 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to 192.168.0.146 : 5060 (non-NAT)
Transmitting (NAT) to 192.168.0.146:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.146:5060;branch=z9hG4bK-c453e5a9;received=192.168.0.146
From: “” sip:SipPhone@192.168.0.114;tag=ebb677a85784e098o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 624b0ee8-53873258@192.168.0.146
CSeq: 1 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:SipPhone@192.168.0.114
Content-Length: 0
Transmitting (NAT) to 192.168.0.146:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.146:5060;branch=z9hG4bK-c453e5a9;received=192.168.0.146
From: “” sip:SipPhone@192.168.0.114;tag=ebb677a85784e098o0
To: “” sip:SipPhone@192.168.0.114;tag=as182d71ec
Call-ID: 624b0ee8-53873258@192.168.0.146
CSeq: 1 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:SipPhone@192.168.0.114
WWW-Authenticate: Digest algorithm=MD5, realm="<sip.realm.com>", nonce="59b3f164"
Content-Length: 0
Scheduling destruction of call ‘624b0ee8-53873258@192.168.0.146’ in 15000 ms
<-- SIP read from 192.168.0.146:5060:
REGISTER sip:192.168.0.114 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.146:5060;branch=z9hG4bK-37f69ae1
From: “” sip:SipPhone@192.168.0.114;tag=ebb677a85784e098o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 624b0ee8-53873258@192.168.0.146
CSeq: 2 REGISTER
Max-Forwards: 70
Authorization: Digest username="",realm="<sip.realm.com>",nonce=“59b3f164”,uri=“sip:192.168.0.114”,algorithm=MD5,response="c00217f43961daf923f88aa07cecd8d5"
Contact: “” sip:SipPhone@192.168.0.146:5060;expires=360
User-Agent: Sipura
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
— (12 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to 192.168.0.146 : 5060 (NAT)
Transmitting (NAT) to 192.168.0.146:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.146:5060;branch=z9hG4bK-37f69ae1;received=192.168.0.146
From: “” sip:SipPhone@192.168.0.114;tag=ebb677a85784e098o0
To: “” sip:SipPhone@192.168.0.114
Call-ID: 624b0ee8-53873258@192.168.0.146
CSeq: 2 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:SipPhone@192.168.0.114
Content-Length: 0
Transmitting (NAT) to 192.168.0.146:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.146:5060;branch=z9hG4bK-37f69ae1;received=192.168.0.146
From: “” sip:SipPhone@192.168.0.114;tag=ebb677a85784e098o0
To: “” sip:SipPhone@192.168.0.114;tag=as182d71ec
Call-ID: 624b0ee8-53873258@192.168.0.146
CSeq: 2 REGISTER
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Expires: 180
Contact: sip:SipPhone@192.168.0.146:5060;expires=180
Date: Thu, 26 Oct 2006 21:39:02 GMT
Content-Length: 0
Any help is highly appreciated.
Thanks.