[SIPForum-discussion] Unable to register getting 401 error

harish T harish0611 at gmail.com
Tue Jan 16 13:40:01 UTC 2007


Hi ,

I wrote a code for registering SIP client in SIP server .I have posted code
here

String sndReq ="REGISTER sip:devclv.com SIP/2.0"+"\n"+
"Via: SIP/2.0/UDP xx.yy.zz.aa:5060;branch=z9hG4bK343g"+"\n"+
"To: Harish T <sip:devclv0008 at dev.com>"+"\n"+
"From: Harish T <sip:devclv0008 at dev.com>;tag=4541232ds"+"\n"+
"Max-Forwards: 70"+"\n"+
"Call-ID: a532422378"+"\n"+
"CSeq: 1 REGISTER"+"\n"+
"Contact: <sip:devclv0008 at dev.com>"+"\n"+
"Content-Type: text/plain"+"\n"+
"Content-Length: 0"+"\n";

Responce from server is like this

SIP/2.0 401 Unauthorized
Call-ID: a5324223458978
Content-Length: 0
CSeq: 16 REGISTER
From: Harish T <sip:devclv0008 at dev.com>;tag=4541232ds
To: Harish T <sip:devclv0008 at dev.com>;tag=1168951224622
Via: SIP/2.0/UDP xx.yy.zz.aa:5060;branch=z9hG4bK343g
WWW-Authenticate: Digest realm="devclv.com",
nonce="4f5a3fdc0bc4f1704eb1435a477baa8f", opaque="", qop="auth",
stale=FALSE, algorithm=MD5


Since i am new to SIP I am not able to identify the exact problem,So can any
one of you tell me where i mistake..IS there anything wrong in SIP request
formate?..For reference i have pasted both reqest and responce formate in
this mail...

-- 
------------------------------------------------------
To accomplish great things, we must not only act, but also dream; not only
plan, but also believe.



With regards
Harish.T
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20070116/0ae065c8/attachment-0002.html>


More information about the discussion mailing list