200 OK not coming after 401

Hello,
I am able to receive 401 UnAuthorized from Asterisk.
But after 401, I am not able to send the Header Correctly.
Below is my 401 log

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK-333530-c53d12b9839031a886b2c169cfbb574a;received=115.187.33.88;rport=5060
From: <sip:David@xx.xx.xx.xx>;tag=textclientv1.0
To: <sip:David@xx.xx.xx.xx>;tag=as28d7e2a2
Call-ID: c0447e43c29ab2b390d99aa8d52ad062@192.168.0.6
CSeq: 1 REGISTER
Server: Asterisk PBX 16.7.0
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE
Supported: replaces,timer
WWW-Authenticate: Digest algorithm=MD5,realm="asterisk",nonce="0ffac2d4"
Content-Length: 0

Now again I am sending the register request as below log.

REGISTER sip:xx.xx.xx.xx SIP/2.0
Call-ID: 9fb7fd524457b65fd82e0f4bc46f4262@192.168.0.6
CSeq: 1 REGISTER
From: <sip:David@xx.xx.xx.xx>;tag=textclientv1.0
To: <sip:David@xx.xx.xx.xx>
Via: SIP/2.0/UDP 192.168.0.6:5060
Max-Forwards: 70
Expires: 3060
Authorization: Digest username="David",realm="asterisk",nonce="0ffac2d4",uri="sip:xx.xx.xx.xx",algorithm=MD5,response="83d27ff9dd7f059f479b0cdc3db66676"
Content-Length: 0

But 200 OK is not coming. Am I doing any mistake?

You’ve sent a duplicate of the first, according to the CSEQ header.

Now I have changed the CSEQ number. But still the same issue.

 SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK-3831-7f0491b9b47c606e40cf2d133e65b1d4;received=115.187.33.88;rport=5060
From: <sip:David@xx.xx.xx.xx>;tag=textclientv1.0
To: <sip:David@xx.xx.xx.xx>;tag=as178902ce
Call-ID: 8bd0f227e344a4640dbb93903a29aed8@192.168.0.6
CSeq: 1 REGISTER
Server: Asterisk PBX 16.7.0
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE
Supported: replaces,timer
WWW-Authenticate: Digest algorithm=MD5,realm="asterisk",nonce="5264e6e5"
Content-Length: 0


REGISTER sip:xx.xx.xx.xx SIP/2.0
Via: SIP/2.0/UDP 192.168.0.6:5060
Max-Forwards: 70
From: <sip:David@xx.xx.xx.xx>;tag=textclientv1.0
To: <sip:David@xx.xx.xx.xx>
Call-ID: 1432d58c0cf8817371e24626e4d32bd3@192.168.0.6
CSeq: 2 REGISTER
Contact: <sip:David@192.168.0.6;transport=udp>
Expires: 3060
Authorization: Digest username="David",realm="asterisk",nonce="5264e6e5",uri="sip:xx.xx.xx.xx",algorithm=MD5,response="7a9c6b16766e14c78b98826a20f5bbaf"
Content-Length: 0

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.