[Home]

Summary:ASTERISK-04741: An wrong authname in Invite for 407 proxy authen
Reporter:kaiser cheng (kaiser)Labels:
Date Opened:2005-07-31 08:49:48Date Closed:2011-06-07 14:03:11
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Asterisk works a sip client to call Notel sofeswich MX5x00
When server request a proxy authentication, Asterisk forget to put authname

It makes the call fail....because the server will send 403 back for auth fail.


Sip read:
SIP/2.0 407 Proxy Authentication Required
t: <sip:096666666@cht.com.tw>;tag=699713214
f: "0709000021" <sip:0709000021@cht.com>;tag=as66a3a02f
i: 71171abd7a90f9ee5f21f345314da10f@cht.com
CSeq: 102 INVITE
v: SIP/2.0/UDP 210.64.89.116:5100;branch=z9hG4bK41840eff
Proxy-Authenticate: Digest realm="Realm",nonce="MTEyMjgxMDE3OTg3MjY1MTRkODdkY2ExNzE2MzdjYmEyNmNkNTM5OGEzOTIz",stale=false,algorithm=MD5,qop="auth,auth-int"
k: com.nortelnetworks.firewall,p-3rdpartycontrol,nosec
l: 0


9 headers, 0 lines
Transmitting:
ACK sip:0918113966@cht.com.tw SIP/2.0
Via: SIP/2.0/UDP 210.64.89.116:5100;branch=z9hG4bK41840eff
From: "0709000021" <sip:0709000021@cht.com>;tag=as66a3a02f
To: <sip:096666666@cht.com>;tag=699713214
Contact: <sip:0709000021@210.64.89.116:5100>
Call-ID: 71171abd7a90f9ee5f21f345314da10f@cht.com.tw
CSeq: 102 ACK
User-Agent: Asterisk
Content-Length: 0

(no NAT) to 203.74.219.132:5060
We're at 210.64.89.116 port 17586
Answering/Requesting with root capability 0x100 (g729)
Answering with preferred capability 0x400 (ilbc)
Answering with preferred capability 0x1 (g723)
Answering with non-codec capability 0x1 (telephone-event)
Reliably Transmitting:
INVITE sip:0966666666@cht.com.tw SIP/2.0
Via: SIP/2.0/UDP 210.64.89.116:5100;branch=z9hG4bK3c8b5631
From: "0709000021" <sip:0709000021@cht.com.tw>;tag=as66a3a02f
To: <sip:096666666@cht.com.tw>
Contact: <sip:0709000021@210.64.89.116:5100>
Call-ID: 71171abd7a90f9ee5f21f345314da10f@cht.com.tw
CSeq: 103 INVITE
User-Agent: Asterisk
Proxy-Authorization: Digest username="", realm="Realm", algorithm=MD5, uri="sip:0966666666@cht.com", nonce="MTEyMjgxMDE3OTg3MjY1MTRkODdkY2ExNzE2MzdjYmEyNmNkNTM5OGEzOTIz", response="8d015eac67f1dd79e7b4ffef672ea918", opaque="", qop="auth", cnonce="71164eef", nc=00000001
Date: Sun, 31 Jul 2005 11:58:48 GMT
Comments:By: Olle Johansson (oej) 2005-07-31 10:41:54

We need to see your configurations for this.

By: Olle Johansson (oej) 2005-07-31 10:42:34

Try adding "username=authname" in the config for this session.

By: kaiser cheng (kaiser) 2005-07-31 21:03:43

This is our peer setting in sip.conf:

[0709000021]
type=friend
username=0709000021
;callerid=0709000021
host=dynamic
nat=no                       ; X-Lite is behind a NAT route
fromdomain=cht.com
canreinvite=no                ; Typically set to NO if behind NAT
secret=xxxxxx
disallow=all
allow=g723.1
allow=g729
dtmfmode=rfc2833


BTW, register to nortel and its 407 auth is ok.

By: Olle Johansson (oej) 2005-08-01 01:29:15

Set "Fromuser" to the same value as "username"  - does it work then?

By: kaiser cheng (kaiser) 2005-08-01 04:46:55

We haev solved the issue. It's not code problem, it is extension.conf and sip.conf setting issue. Please close the ticket. Thanks.