<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&ntilde;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 &lt;<a moz-do-not-send="true" href="mailto:peter.dunkley@crocodile-rcs.com">peter.dunkley@crocodile-rcs.com</a>&gt;
&gt;
&gt; Hello,
&gt;
&gt; This does look like an issue with authentication rather than WebSockets.
&gt; Have you tried using an ordinary SIP client (for example, Jitsi) with your
&gt; Kamailio configuration to verify that the authentication part of
&gt; kamailio.cfg is correct?
&gt;
&gt; Regards,
&gt;
&gt; Peter
&gt;
&gt;
&gt; On Tue, 2012-08-21 at 10:59 +0200, David Pati&ntilde;o wrote:
&gt;
&gt; Hi there,
&gt;
&gt; I'm new on kamailio users list.
&gt; Now I'm developing a client in javascript (using websockets) to SIP calls.
&gt;
&gt; I'm using last devel version of kamailio with websocket support. I've
&gt; already get a correct REGISTER transaction but now I'm not able to get
&gt; a correct INVITE transaction. Actually I'm not sure if this a kamailio
&gt; error or a problem with my source code however I'm using the same
&gt; function to get digest info from received nonce both REGISTER and
&gt; INVITE transactions. The INVITE transaction always enters in an
&gt; endless loop with 407 requests.
&gt;
&gt; Please, is there anybody who could help me?
&gt;
&gt; Those are the frames of my code (obtained from chrome browser console):
&gt;
&gt; wsUri: <a class="moz-txt-link-freetext" href="ws://10.1.20.40:80/">ws://10.1.20.40:80/</a>
&gt; SOCKET CREATED
&gt; SOCKET OPENED
&gt;
&gt; SENT:
&gt; REGISTER <a moz-do-not-send="true" href="sip:10.1.20.40">sip:10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bK1C36k8S3b0OobHUAOLLOae0SbsbEQg
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Me0arqDG6K8o7l32oJgR
&gt; To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>
&gt; Call-ID: 0EQSBkoG9RGgfg3E
&gt; CSeq: 1 REGISTER
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt; Contact: &lt;<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws&gt;
&gt;         reg-id=98
&gt;         +sip.instance="&lt;urn:uuid:beb-68a9-6396e5f4&gt;"
&gt;
&gt;
&gt; RESPONSE:
&gt; SIP/2.0 401 Unauthorized
&gt; Via: SIP/2.0/WS
&gt;
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bK1C36k8S3b0OobHUAOLLOae0SbsbEQg;rport=50906;received=10.1.2.229
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Me0arqDG6K8o7l32oJgR
&gt; To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.000c
&gt; Call-ID: 0EQSBkoG9RGgfg3E
&gt; CSeq: 1 REGISTER
&gt; WWW-Authenticate: Digest realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re"
&gt; Server: kamailio (3.4.0-dev3 (i386/linux))
&gt; Content-Length: 0
&gt;
&gt;
&gt; SENT:
&gt; REGISTER <a moz-do-not-send="true" href="sip:10.1.20.40">sip:10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bKl521S8acS8nVEcejv2GOJ8r46Jb037
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Pb8d1gV8K5qJo1gOv612
&gt; To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>
&gt; Call-ID: 0EQSBkoG9RGgfg3E
&gt; CSeq: 2 REGISTER
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt; Contact: &lt;<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws&gt;
&gt;         reg-id=98
&gt;         +sip.instance="&lt;urn:uuid:beb-68a9-6396e5f4&gt;"
&gt; Authorization: Digest username="101", realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re", opaque="",
&gt; uri="<a moz-do-not-send="true" href="sip:10.1.20.40">sip:10.1.20.40</a>", response= "9b209eb35ee88192e2e0c468f8cf91da"
&gt;
&gt;
&gt; RESPONSE:
&gt; SIP/2.0 200 OK
&gt; Via: SIP/2.0/WS
&gt;
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bKl521S8acS8nVEcejv2GOJ8r46Jb037;rport=50906;received=10.1.2.229
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=Pb8d1gV8K5qJo1gOv612
&gt; To: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.b2e4
&gt; Call-ID: 0EQSBkoG9RGgfg3E
&gt; CSeq: 2 REGISTER
&gt; Contact:
&gt; &lt;<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws&gt;;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="&lt;urn:uuid:beb-68a9-6396e5f4&gt;";reg-id=98
&gt; Server: kamailio (3.4.0-dev3 (i386/linux))
&gt; Content-Length: 0
&gt;
&gt;
&gt; SENT:
&gt; INVITE <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bKOIosJ8TMPgvfHme6NIm4GSn24Fu7f7
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 1 INVITE
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt; Contact: &lt;<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws
&gt;         gr=urn:uuid:beb-68a9-6396e5f4;ob&gt;
&gt; Content-Type: application/sdp
&gt;
&gt;
&gt; RESPONSE:
&gt; SIP/2.0 407 Proxy Authentication Required
&gt; Via: SIP/2.0/WS
&gt;
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bKOIosJ8TMPgvfHme6NIm4GSn24Fu7f7;rport=50906;received=10.1.2.229
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.f545
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 1 INVITE
&gt; Proxy-Authenticate: Digest realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re"
&gt; Server: kamailio (3.4.0-dev3 (i386/linux))
&gt; Content-Length: 0
&gt;
&gt;
&gt; SENT:
&gt; ACK <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bKAmmLhK71tr2QoAiV9f5QmdKF9dGkke
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.f545
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 1 ACK
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt;
&gt;
&gt; SENT:
&gt; INVITE <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bK1GRkmlTVo7Cb4fg8OMe9g39g096hmn
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 2 INVITE
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt; Contact: &lt;<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws
&gt;         gr=urn:uuid:beb-68a9-6396e5f4;ob&gt;
&gt; Proxy-Authorization: Digest username="101", realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re", opaque="",
&gt; uri="<a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>", response= "f4bbe128abf3acb3a4e11882749d8798"
&gt; Content-Type: application/sdp
&gt;
&gt;
&gt; RESPONSE:
&gt; SIP/2.0 407 Proxy Authentication Required
&gt; Via: SIP/2.0/WS
&gt;
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bK1GRkmlTVo7Cb4fg8OMe9g39g096hmn;rport=50906;received=10.1.2.229
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.0007
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 2 INVITE
&gt; Proxy-Authenticate: Digest realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re"
&gt; Server: kamailio (3.4.0-dev3 (i386/linux))
&gt; Content-Length: 0
&gt;
&gt;
&gt; SENT:
&gt; ACK <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bKG9v5g7i1LNsoVGo18ULlgqdA1EcFGb
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.0007
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 2 ACK
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt;
&gt;
&gt; SENT:
&gt; INVITE <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a> SIP/2.0
&gt; Via: SIP/2.0/WS
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bK8cie6bGSG0eOGh7Ne08Ro4CS1hI0oJ
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 3 INVITE
&gt; Max-Forwards: 70
&gt; Supported: path, outbound, gruu
&gt; Contact: &lt;<a moz-do-not-send="true" href="sip:101@KMkjMf37lVeM.invalid">sip:101@KMkjMf37lVeM.invalid</a>;transport=ws
&gt;         gr=urn:uuid:beb-68a9-6396e5f4;ob&gt;
&gt; Proxy-Authorization: Digest username="101", realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4Re", opaque="",
&gt; uri="<a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>", response= "f4bbe128abf3acb3a4e11882749d8798"
&gt; Content-Type: application/sdp
&gt;
&gt;
&gt; RESPONSE:
&gt; SIP/2.0 407 Proxy Authentication Required
&gt; Via: SIP/2.0/WS
&gt;
&gt; KMkjMf37lVeM.invalid;branch=z9hG4bK8cie6bGSG0eOGh7Ne08Ro4CS1hI0oJ;rport=50906;received=10.1.2.229
&gt; From: <a moz-do-not-send="true" href="sip:101@10.1.20.40">sip:101@10.1.20.40</a>;tag=3U0osO4h3h2bgCrvnCqO
&gt; To: <a moz-do-not-send="true" href="sip:102@10.1.20.40">sip:102@10.1.20.40</a>;tag=9de7b31b15b69da019f867d4866ff286.b1f7
&gt; Call-ID: 9KoKnFdh285k2jg4
&gt; CSeq: 3 INVITE
&gt; Proxy-Authenticate: Digest realm="10.1.20.40",
&gt; nonce="UDND2VAzQq0Tz8wvIFWNh2eYRxdtu4
&gt; Re"
&gt; Server: kamailio (3.4.0-dev3 (i386/linux))
&gt; Content-Length: 0
&gt;
&gt;
&gt; .......and so on in an endless loop with 407 requests
&gt;
&gt; Thanks a lot
&gt;
&gt; Kind Regards
&gt;
&gt; --
&gt;      --DAVID--
&gt;
&gt; _______________________________________________
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
&gt; <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
&gt; <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>
&gt;
&gt;
&gt; --
&gt; Peter Dunkley
&gt; Technical Director
&gt; Crocodile RCS Ltd
&gt;
&gt;
&gt; _______________________________________________
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
&gt; <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
&gt; <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>
&gt;

_______________________________________________
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>