[SIPForum-discussion] What does mean Unauthorized message received from SIP server after sendign INVITE or REGISTER to it?

Cedric Castro ccastro at ergatel.com
Wed Jun 3 19:28:17 UTC 2015


Hi Rodrigo,



Welcome to SIP.

At first I had a similar question just like you. ;-)



This is normal behavior.

I give an example with MD5 authorization token:



First an ordinary REGISTER is sent.



This is answered by a response with 401 Unauthorized, with an authentication token:

fe. WWW-Authenticate: DIGEST qop = "auth" nonce = "xxxxxxxxxxxx", realm = "xxxxxx.eu" algorithm = MD5



Then there's a new REGISTER with the Authorization response there.

fe. response = "3654cfwwwwb6daffxxxx0f290fe059a"

That response is a calculation where MD5 username, realm, password, nonce and Request URI is processed.



When the second rigister is being processed by the registrar, it makes the same MD5 calculation.

If the result is the same as what the SIPclient was sending, a 200 OK response is sent and the authorization is succesfull.



This is basic type of SIP registration,

 just like you, I was suspecting a problem, while it's a type of 3-way normal authorization. ;-)

Hope this helps...



Best Regards,

CASTRO Cedric
Senior Voice Engineer



-----Original Message-----
From: discussion-bounces at sipforum.org [mailto:discussion-bounces at sipforum.org] On Behalf Of Rodrigo Pimenta Carvalho
Sent: dinsdag 2 juni 2015 20:38
To: discussion at sipforum.org
Subject: [SIPForum-discussion] What does mean Unauthorized message received from SIP server after sendign INVITE or REGISTER to it?







Hi.



I'm learning about SIP today. I have a link between Asterisk (SIP server)  and Jitsi (Softphone).



When Jitsi sends sip INVITE to the Asterisk or sends REGISTER, I can see, on wireshark, that my softphone receives an "SIP/2.0 401 Unauthorized" immediately. Why does it happen? That is, what the client may be trying to do here, in therms of SIP protocol? Or what could be forbidden in the server in terms of SIP communication?



Then, the client send INVITE  again and the Asterisk accept this second request responding with TRYING and OK.



After this, the SIP agent (I don't know if client or server, because all is in the same machine) sends OPTION. I guess this OPTION message is a consequence of the message "Unauthorized",  isn't it?

But again the other agent responds with "SIP/2.0 401 Unauthorized".

So, it seems that even the message OPTION is unauthorized witch doesn't make sense.



What are the possibilities, in terms of SIP, to have the situation of receiving "SIP/2.0 401 Unauthorized" for each request? What should I to investigate in the sip agents configurations to solve it?



Any hint will very helpful!



Best regards.





Rodrigo.

_______________________________________________

This is the SIP Forum discussion mailing list TO UNSUBSCRIBE, or edit your delivery options, please visit http://sipforum.org/mailman/listinfo/discussion

Post to the list at discussion at sipforum.org<mailto:discussion at sipforum.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20150603/b8b9e030/attachment-0002.html>


More information about the discussion mailing list