[asterisk-users] Unauthorized 401

2007-10-01 Thread Jason Kincaid
Hi, 
I'm trying to register SIP phone with an asterisk serve, failing miserably.  
The server is sending "401 Unauthorized" responses to the registration 
attempts, but every time the phone is re-REGISTERing without authorization.  
I'd think this was a problem with the IP phone, except... the very same phone 
registers correctly (authenticated) with another asterisk box, same brand, 
similarly configured.

The phone is a Leadtek BVP 8882 videophone.  The "bad" asterisk server has the 
following build info, but I haven't seen any bug reports for this problem...
Linux aadk 2.6.16.27sx00i-1.0.3.1 #2 Thu Aug 30 13:18:42 CDT 2007 blackfin 
unknown
Asterisk Build:
Asterisk autotag_for_sx00i-1.0.3 (sx00i 1.0.3.1)
Asterisk GUI-version Revision: 1453 $

I'm wondering if the "401 unauthorized" response has bad formatting.  I 
compared the "bad" asterisk server repeated response, with the "good" asterisk 
server first response (the phone includes authorization in subsequent REGISTER 
for that one).  The only difference I can see, is that the "bad" asterisk 
responses have a blank "Access-URL:" line before "WWW-Authenticate".

I've included log from the "bad" asterisk server.  If necessary I can provide 
one from the good server as well, but I've left it out for now to avoid 
confusion.

Asterisk Business Edition autotag_for_sx00i-1.0.3 (sx00i 1.0.3.1), Copyright 
(C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer
Thank you for using Business Edition. This Software is provided by Digium Inc 
under license. Please refer to the license agreement provided with the 
Software. 
===
Connected to Asterisk autotag_for_sx00i-1.0.3 (sx00i 1.0.3.1) currently running 
on aadk (pid = 304)
aadk*CLI> sip debug
aadk*CLI> SIP Debugging enabled
[Kaadk*CLI> The 'sip debug' command is deprecated and will be removed in a 
future release. Please use 'sip set debug' instead.
[Kaadk*CLI> core set debug 255
aadk*CLI> Core debug was 0 and is now 255
[Kaadk*CLI> core set verbose 255
aadk*CLI> Verbosity was 0 and is now 255
[Kaadk*CLI> 
<--- SIP read from 192.168.220.31:5060 --->
REGISTER sip:asterisk.foo.internal SIP/2.0
Call-ID: [EMAIL PROTECTED]
From: 6001;tag=10007c00-4bc9
To: 6001
CSeq: 101 REGISTER
Via: SIP/2.0/UDP 192.168.220.31:5060;branch=z9hG4bKc0a8efe310007f004bce
Contact: sip:[EMAIL PROTECTED]:5060
Max-Forwards: 70
User-Agent: LRSTD LR8882 2.5.00_99
Expires: 300
Content-Length: 0


<->
--- (11 headers 0 lines) ---
Using latest REGISTER request as basis request
Sending to 192.168.220.31 : 5060 (no NAT)

<--- Transmitting (no NAT) to 192.168.220.31:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
192.168.220.31:5060;branch=z9hG4bKc0a8efe310007f004bce;received=192.168.220.31
From: 6001;tag=10007c00-4bc9
To: 6001
Call-ID: [EMAIL PROTECTED]
CSeq: 101 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: 
Access-URL: 
Content-Length: 0


<>

<--- Transmitting (no NAT) to 192.168.220.31:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
192.168.220.31:5060;branch=z9hG4bKc0a8efe310007f004bce;received=192.168.220.31
From: 6001;tag=10007c00-4bc9
To: 6001;tag=as1aa11ae2
Call-ID: [EMAIL PROTECTED]
CSeq: 101 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Access-URL: 
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="141ab0a6"
Content-Length: 0


<>
[Kaadk*CLI> Scheduling destruction of SIP dialog '[EMAIL PROTECTED]' in 32000 
ms (Method: REGISTER)
[Kaadk*CLI> 
<--- SIP read from 192.168.220.31:5060 --->
REGISTER sip:asterisk.foo.internal SIP/2.0
Call-ID: [EMAIL PROTECTED]
From: 6001;tag=10007c00-4bc9
To: 6001
CSeq: 101 REGISTER
Via: SIP/2.0/UDP 192.168.220.31:5060;branch=z9hG4bKc0a8efe310007f004bce
Contact: sip:[EMAIL PROTECTED]:5060
Max-Forwards: 70
User-Agent: LRSTD LR8882 2.5.00_99
Expires: 300
Content-Length: 0


<->
--- (11 headers 0 lines) ---
Using latest REGISTER request as basis request
Sending to 192.168.220.31 : 5060 (no NAT)

<--- Transmitting (no NAT) to 192.168.220.31:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
192.168.220.31:5060;branch=z9hG4bKc0a8efe310007f004bce;received=192.168.220.31
From: 6001;tag=10007c00-4bc9
To: 6001
Call-ID: [EMAIL PROTECTED]
CSeq: 101 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: 
Access-URL: 
Content-Length: 0


<>

<--- Transmitting (no NAT) to 192.168.220.31:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
192.168.220.31:5060;branch=z9hG4bKc0a8efe310007f004bce;received=192.168.220.31
From: 6001;tag=10007c00-4bc9
To: 6001;tag=as1aa11ae2
Call-ID: [EMAIL PROTECTED]
CSeq: 101 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Access-URL: 

Re: [asterisk-users] Unauthorized 401

2007-10-01 Thread Jason Kincaid
I have both units on my desk here, the server is on the local 224 subnet and 
the phone is on 220 subnet (IP 192.168.220.31).  

My PC is on the same jack as the phone, sharing a hub, so I can sniff packets 
with ethereal.  My PC can see the "401 unauthorized" packets so therefore the 
phone can too.

-Original Message-
From: Kyle Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, October 01, 2007 2:47 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Cc: Jason Kincaid
Subject: Re: [asterisk-users] Unauthorized 401


"Jason Kincaid" <[EMAIL PROTECTED]> writes:

> Hi,
> I'm trying to register SIP phone with an asterisk serve, failing miserably.  
> The server is sending "401 Unauthorized"
> responses to the registration attempts, but every time the phone is 
> re-REGISTERing without authorization.  I'd think this
> was a problem with the IP phone, except... the very same phone registers 
> correctly (authenticated) with another asterisk
> box, same brand, similarly configured.

> <--- Transmitting (no NAT) to 192.168.220.31:5060 --->

Is it possible that the Asterisk server is trying to send to a NAT IP
which it can't actually reach?

-- 
Kyle Sexton

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users