<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
you should run kamailio in debug mode and watch the log messages to
see what is not ok with the authentication. Maybe that gives you
some hints.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<div class="moz-cite-prefix">On 8/21/12 1:29 PM, Peter Dunkley
wrote:<br>
</div>
<blockquote
cite="mid:1345548589.13632.4.camel@pd-notebook-linux.croc.internal"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="GENERATOR" content="GtkHTML/4.4.3">
Hi,<br>
<br>
If the authentication works with another client then it suggest a
problem with your HTML5 client.<br>
<br>
There is nothing special or different about authenticating over a
WebSocket connection.<br>
<br>
Another thing would be to try a different WebSocket client, for
example sipml5 (which is known to work), to check.<br>
<br>
Regards,<br>
<br>
Peter<br>
<br>
On Tue, 2012-08-21 at 13:24 +0200, David Patiño wrote:
<blockquote type="CITE">
<pre>Hello,
I've just test a sip call from an X-Lite client to Ekiga client an
everything has gone ok.
It seems an issue with authentication over WebSockets but I have no
experience in this area so I can not say where the problem is (and
REGISTER auth works fine).
Any other idea or anything else to check?
I'm blocked since last week.
Thanks a lot.
Kind Regards,
--
--DAVID--
2012/8/21 Peter Dunkley <<a moz-do-not-send="true" href="mailto:peter.dunkley@crocodile-rcs.com">peter.dunkley@crocodile-rcs.com</a>>
>
> Hello,
>
> This does look like an issue with authentication rather than WebSockets.
> Have you tried using an ordinary SIP client (for example, Jitsi) with your
> Kamailio configuration to verify that the authentication part of
> kamailio.cfg is correct?
>
> Regards,
>
> Peter
>
>
> On Tue, 2012-08-21 at 10:59 +0200, David Patiño wrote:
>
> Hi there,
>
> I'm new on kamailio users list.
> Now I'm developing a client in javascript (using websockets) to SIP calls.
>
> I'm using last devel version of kamailio with websocket support. I've
> already get a correct REGISTER transaction but now I'm not able to get
> a correct INVITE transaction. Actually I'm not sure if this a kamailio
> error or a problem with my source code however I'm using the same
> function to get digest info from received nonce both REGISTER and
> INVITE transactions. The INVITE transaction always enters in an
> endless loop with 407 requests.
>
> Please, is there anybody who could help me?
>
> Those are the frames of my code (obtained from chrome browser console):
>
> wsUri: <a class="moz-txt-link-freetext" href="ws://10.1.20.40:80/">ws://10.1.20.40:80/</a>
> SOCKET CREATED
> SOCKET OPENED
>
> SENT:
> REGISTER <a moz-do-not-send="true" href="sip:10.1.20.40">sip:10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bK1C36k8S3b0OobHUAOLLOae0SbsbEQg
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Me0arqDG6K8o7l32oJgR
> To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>
> Call-ID: 0EQSBkoG9RGgfg3E
> CSeq: 1 REGISTER
> Max-Forwards: 70
> Supported: path, outbound, gruu
> Contact: <<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws>
>         reg-id=98
>         +sip.instance="<urn:uuid:beb-68a9-6396e5f4>"
>
>
> RESPONSE:
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/WS
>
> KMkjMf37lVeM.invalid;branch=z9hG4bK1C36k8S3b0OobHUAOLLOae0SbsbEQg;rport=50906;received=10.1.2.229
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Me0arqDG6K8o7l32oJgR
> To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.000c
> Call-ID: 0EQSBkoG9RGgfg3E
> CSeq: 1 REGISTER
> WWW-Authenticate: Digest realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re"
> Server: kamailio (3.4.0-dev3 (i386/linux))
> Content-Length: 0
>
>
> SENT:
> REGISTER <a moz-do-not-send="true" href="sip:10.1.20.40">sip:10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bKl521S8acS8nVEcejv2GOJ8r46Jb037
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Pb8d1gV8K5qJo1gOv612
> To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>
> Call-ID: 0EQSBkoG9RGgfg3E
> CSeq: 2 REGISTER
> Max-Forwards: 70
> Supported: path, outbound, gruu
> Contact: <<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws>
>         reg-id=98
>         +sip.instance="<urn:uuid:beb-68a9-6396e5f4>"
> Authorization: Digest username="101", realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re", opaque="",
> uri="<a moz-do-not-send="true" href="sip:10.1.20.40">sip:10.1.20.40</a>", response= "9b209eb35ee88192e2e0c468f8cf91da"
>
>
> RESPONSE:
> SIP/2.0 200 OK
> Via: SIP/2.0/WS
>
> KMkjMf37lVeM.invalid;branch=z9hG4bKl521S8acS8nVEcejv2GOJ8r46Jb037;rport=50906;received=10.1.2.229
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Pb8d1gV8K5qJo1gOv612
> To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.b2e4
> Call-ID: 0EQSBkoG9RGgfg3E
> CSeq: 2 REGISTER
> Contact:
> <<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws>;expires=120;received="<a moz-do-not-send="true" href="sip:10.1.2.229:50906">sip:10.1.2.229:50906</a>;transport=WS";pub-gruu="<a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;gr=urn:uuid:beb-68a9-6396e5f4";temp-gruu="<a moz-do-not-send="true" href="sip:uloc-5033344d-5211-1-1de173@10.1.20.40">sip:uloc-5033344d-5211-1-1de173@10.1.20.40</a>;gr";+sip.instance="<urn:uuid:beb-68a9-6396e5f4>";reg-id=98
> Server: kamailio (3.4.0-dev3 (i386/linux))
> Content-Length: 0
>
>
> SENT:
> INVITE <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bKOIosJ8TMPgvfHme6NIm4GSn24Fu7f7
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 1 INVITE
> Max-Forwards: 70
> Supported: path, outbound, gruu
> Contact: <<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws
>         gr=urn:uuid:beb-68a9-6396e5f4;ob>
> Content-Type: application/sdp
>
>
> RESPONSE:
> SIP/2.0 407 Proxy Authentication Required
> Via: SIP/2.0/WS
>
> KMkjMf37lVeM.invalid;branch=z9hG4bKOIosJ8TMPgvfHme6NIm4GSn24Fu7f7;rport=50906;received=10.1.2.229
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.f545
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 1 INVITE
> Proxy-Authenticate: Digest realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re"
> Server: kamailio (3.4.0-dev3 (i386/linux))
> Content-Length: 0
>
>
> SENT:
> ACK <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bKAmmLhK71tr2QoAiV9f5QmdKF9dGkke
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.f545
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 1 ACK
> Max-Forwards: 70
> Supported: path, outbound, gruu
>
>
> SENT:
> INVITE <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bK1GRkmlTVo7Cb4fg8OMe9g39g096hmn
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 2 INVITE
> Max-Forwards: 70
> Supported: path, outbound, gruu
> Contact: <<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws
>         gr=urn:uuid:beb-68a9-6396e5f4;ob>
> Proxy-Authorization: Digest username="101", realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re", opaque="",
> uri="<a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>", response= "f4bbe128abf3acb3a4e11882749d8798"
> Content-Type: application/sdp
>
>
> RESPONSE:
> SIP/2.0 407 Proxy Authentication Required
> Via: SIP/2.0/WS
>
> KMkjMf37lVeM.invalid;branch=z9hG4bK1GRkmlTVo7Cb4fg8OMe9g39g096hmn;rport=50906;received=10.1.2.229
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.0007
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 2 INVITE
> Proxy-Authenticate: Digest realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re"
> Server: kamailio (3.4.0-dev3 (i386/linux))
> Content-Length: 0
>
>
> SENT:
> ACK <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bKG9v5g7i1LNsoVGo18ULlgqdA1EcFGb
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.0007
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 2 ACK
> Max-Forwards: 70
> Supported: path, outbound, gruu
>
>
> SENT:
> INVITE <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
> Via: SIP/2.0/WS
> KMkjMf37lVeM.invalid;branch=z9hG4bK8cie6bGSG0eOGh7Ne08Ro4CS1hI0oJ
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 3 INVITE
> Max-Forwards: 70
> Supported: path, outbound, gruu
> Contact: <<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws
>         gr=urn:uuid:beb-68a9-6396e5f4;ob>
> Proxy-Authorization: Digest username="101", realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re", opaque="",
> uri="<a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>", response= "f4bbe128abf3acb3a4e11882749d8798"
> Content-Type: application/sdp
>
>
> RESPONSE:
> SIP/2.0 407 Proxy Authentication Required
> Via: SIP/2.0/WS
>
> KMkjMf37lVeM.invalid;branch=z9hG4bK8cie6bGSG0eOGh7Ne08Ro4CS1hI0oJ;rport=50906;received=10.1.2.229
> From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
> To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.b1f7
> Call-ID: 9KoKnFdh285k2jg4
> CSeq: 3 INVITE
> Proxy-Authenticate: Digest realm="10.1.20.40",
> nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4
> Re"
> Server: kamailio (3.4.0-dev3 (i386/linux))
> Content-Length: 0
>
>
> .......and so on in an endless loop with 407 requests
>
> Thanks a lot
>
> Kind Regards
>
> --
> --DAVID--
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
> <a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
>
>
> --
> Peter Dunkley
> Technical Director
> Crocodile RCS Ltd
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
> <a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<pre>--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</pre>
</td>
</tr>
</tbody>
</table>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 05-08, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a></pre>
</body>
</html>