[Asterisk-Users] empty username in authorization section ?!

Dawid Mielnik dmielnik at elka.pw.edu.pl
Tue Nov 30 04:15:45 MST 2004


Hi all,


Why does asterisk send empty username in authorization section ?

 

My setup is as follows:

 

SIP UA(x-lite) ------ ASTERISK ------ SER ------ 

 

I am trying to have asterisk route calls to a sip proxy. The sip proxy
requires authorization on calls to pstn. The problem is that asterisk sends
an empty username in the Authorization section (INVITE message) in response
to the Unauthorized challenge message sent by proxy: 

 

Authorization: Digest username="", realm="myrealm", algorithm=MD5,
uri="sip:0501657887 at myrealm

 

 

Below is the configuration info and the full sip debug.

 

Thanks,

 

Dave

 

Sip.conf

 

[general]

.

register => 4804915:4804915 at myrealm

 

[sip-proxy]

type=peer

secret=4804915

username=4804915

fromuser=4804915

host=myrealm

 

 

[4804915]

type=friend

username=4804915

fromuser=4804915

secret=4804915

callerid="XX 1" <4804915>

host=dynamic

nat=no

canreinvite=yes

disallow=all

allow=gsm

 

 

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP
192.168.2.140:5060;branch=z9hG4bK4bd7f6a2;rport=5060;received=80.55.21.254

From: "XX 1" <sip:4804915 at 192.168.2.140>;tag=as5fc122cc

To: <sip:0501657887 at myrealm>;tag=b27e1a1d33761e85846fc98f5f3a7e58.e518

Call-ID: 5b0e2ac471272baa26b067e62201f6fe at 192.168.2.140

CSeq: 102 INVITE

WWW-Authenticate: Digest realm="myrealm",
nonce="41ac519aee7825573a272767883112d560eb089d"

Server: Sip EXpress router (0.8.14-2 (i386/linux))

Content-Length: 0

Warning: 392 213.241.58.141:5060 "Noisy feedback tells:  pid=1908
req_src_ip=80.55.21.254 req_src_port=5060 in_uri=sip:0501657887 at myrealm
out_uri=sip:0501657887 at myrealm via_cnt==1"

 

 

Nov 30 10:50:10 VERBOSE[1089325632]: Transmitting:

ACK sip:0501657887 at myrealm SIP/2.0

Via: SIP/2.0/UDP 192.168.2.140:5060;branch=z9hG4bK4bd7f6a2

From: "XX 1" <sip:4804915 at 192.168.2.140>;tag=as5fc122cc

To: <sip:0501657887 at myrealm>;tag=b27e1a1d33761e85846fc98f5f3a7e58.e518

Contact: <sip:4804915 at 192.168.2.140>

Call-ID: 5b0e2ac471272baa26b067e62201f6fe at 192.168.2.140

CSeq: 102 ACK

User-Agent: Asterisk PBX

Content-Length: 0

 

 (no NAT) to 213.241.58.141:5060

 

Nov 30 10:50:10 VERBOSE[1089325632]: Reliably Transmitting:

INVITE sip:0501657887 at myrealm SIP/2.0

Via: SIP/2.0/UDP 192.168.2.140:5060;branch=z9hG4bK5c85c28f

From: "XX 1" <sip:4804915 at 192.168.2.140>;tag=as5fc122cc

To: <sip:0501657887 at myrealm>

Contact: <sip:4804915 at 192.168.2.140>

Call-ID: 5b0e2ac471272baa26b067e62201f6fe at 192.168.2.140

CSeq: 103 INVITE

User-Agent: Asterisk PBX

Authorization: Digest username="", realm="myrealm", algorithm=MD5,
uri="sip:0501657887 at myrealm",
nonce="41ac519aee7825573a272767883112d560eb089d",
response="1069242044fd7063e9579a5df68cbb83", opaque=""

Date: Tue, 30 Nov 2004 09:50:10 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER

Content-Type: application/sdp

Content-Length: 263

 

v=0

o=root 3738 3739 IN IP4 192.168.2.140

s=session

c=IN IP4 192.168.2.140

t=0 0

m=audio 15096 RTP/AVP 3 0 8 101

a=rtpmap:3 GSM/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=silenceSupp:off - - - -

 (no NAT) to 213.241.58.141:5060

Nov 30 10:50:10 VERBOSE[1089325632]:

 

Sip read:

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP
192.168.2.140:5060;branch=z9hG4bK5c85c28f;rport=5060;received=80.55.21.254

From: "XX 1" <sip:4804915 at 192.168.2.140>;tag=as5fc122cc

To: <sip:0501657887 at myrealm>;tag=b27e1a1d33761e85846fc98f5f3a7e58.155e

Call-ID: 5b0e2ac471272baa26b067e62201f6fe at 192.168.2.140

CSeq: 103 INVITE

WWW-Authenticate: Digest realm="myrealm",
nonce="41ac519aee7825573a272767883112d560eb089d"

Server: Sip EXpress router (0.8.14-2 (i386/linux))

Content-Length: 0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041130/917fa1e4/attachment.htm


More information about the asterisk-users mailing list