401 Unauthorized

Hello,

I am doing some interop testing between a new PBX and a SIP provider who uses an Asterisk server.

When I try to register to the server, it responds with 100 Trying and then 401 Unauthorized.

Normally (with other SIP servers), I would expect to receive 407 Proxy Authentication Required, and then I would resend my Register message, incorporating the nonce value.

Does anyone have any idea why Asterisk would be rejecting my Register (trace below)?

1.1.1.1 = PBX
2.2.2.2 = Asterisk

Internet Protocol, Src: 1.1.1.1 (1.1.1.1), Dst: 2.2.2.2 (2.2.2.2)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
Request-Line: REGISTER sip:sip.provider.net;transport=udp SIP/2.0
Message Header
From: sip:32018147@sip.provider.net;tag=A099324631353641F6280000
To: sip:32018147@sip.provider.net
Contact: sip:32018147@1.1.1.1:5060
Expires: 3600
Call-ID: 0232651C8E81400000000002@1.1.1.1
CSeq: 1 REGISTER
Max-Forwards: 70
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKDC7E8F5BB0011CBC
Content-Length: 0

Internet Protocol, Src: 2.2.2.2 (2.2.2.2), Dst: 1.1.1.1 (1.1.1.1)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 100 Trying
Message Header
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKDC7E8F5BB0011CBC;received=1.1.1.1;rport=5060
From: sip:32018147@sip.provider.net;tag=A099324631353641F6280000
To: sip:32018147@sip.provider.net
Call-ID: 0232651C8E81400000000002@1.1.1.1
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: sip:32018147@2.2.2.2
Content-Length: 0

Internet Protocol, Src: 2.2.2.2 (2.2.2.2), Dst: 1.1.1.1 (1.1.1.1)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 401 Unauthorized
Status-Code: 401
Resent Packet: False
Message Header
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKDC7E8F5BB0011CBC;received=1.1.1.1;rport=5060
From: sip:32018147@sip.provider.net;tag=A099324631353641F6280000
To: sip:32018147@sip.provider.net;tag=as23ee871c
Call-ID: 0232651C8E81400000000002@1.1.1.1
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: sip:32018147@2.2.2.2
WWW-Authenticate: Digest realm=“asterisk”, nonce="3b3ed7ad"
Content-Length: 0

Thank you
Richard

The Allow header does not include the REGISTER method. Asterisk is not acting as a Registrar server.

The system that I register with, my local asterisk box and a sipxchange server both return a 401 when you first try and register.

Sequence is

Phone to Server: REGISTER
Server to Phone: 100 Trying
Server to Phone: 401 Unaithorized
Phone to Server: REGISTER
Server to Phone: 100 Trying
Server to Phone: 200 OK

Also the Allow Line from my Asterisk Server (now running 1.2.6) during a REGISTER, does not show REGISTER on the line, but the sipxchange server does. Here is what my Asterisk Allow line looks like:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Mike