<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Daniel,<br>
    <br>
    I don't think it is an MSRP issue.  It's just I have first spotted
    it with MSRP and now can't risk touching my SIP WebSocket server.<br>
    <br>
    My suspicion is that (if it is related to the changes made in the
    last 10 days) it is something that happens during or after a call to
    tcp_send().<br>
    <br>
    Regards,<br>
    <br>
    Peter<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 30/05/13 17:56, Daniel-Constantin
      Mierla wrote:<br>
    </div>
    <blockquote cite="mid:51A784A0.3000409@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <br>
      <div class="moz-cite-prefix">On 5/30/13 6:44 PM, Peter Dunkley
        wrote:<br>
      </div>
      <blockquote cite="mid:51A781E6.40306@crocodile-rcs.com"
        type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        I don't have a commit ID for it working as the system that is
        working was installed from RPMs.  However, It was compiled at
        18:39:25 (BST) on May 20 2013.<br>
        <br>
        It will have been a clean pull from Git at the time it was
        built.<br>
      </blockquote>
      After that date, from core perspective, sctp was moved as a
      module, syn_branch parameter removed and pv cache used for confg
      vars, but it doesn't look like should be a direct effect on msrp.
      A bit before was removal of IPv6 define.<br>
      <br>
      Maybe is a side effect with some memory overflow. Can you compile
      with MEMDBG=1 and see if you get some errors from memory manager?<br>
      <br>
      Cheers,<br>
      Daniel<br>
      <br>
      <blockquote cite="mid:51A781E6.40306@crocodile-rcs.com"
        type="cite"> <br>
        Peter<br>
        <br>
        <div class="moz-cite-prefix">On 30/05/13 17:36,
          Daniel-Constantin Mierla wrote:<br>
        </div>
        <blockquote cite="mid:51A78014.1090502@gmail.com" type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          <br>
          <div class="moz-cite-prefix">On 5/30/13 6:17 PM, Peter Dunkley
            wrote:<br>
          </div>
          <blockquote cite="mid:51A77BB5.8090101@crocodile-rcs.com"
            type="cite">
            <meta http-equiv="content-type" content="text/html;
              charset=ISO-8859-1">
            When latest Kamailio git master sends a message over
            WebSocket (specifically an MSRP reply on my test system) I
            get the error,<br>
            <blockquote>
              <pre>One or more reserved bits are on: reserved1 = 1, reserved2 = 0, reserved3 = 0</pre>
            </blockquote>
            in Google Chrome.  This happens for WebSockets over TCP and
            WebSockets over TLS.  It doesn't happen with a build of
            Kamailio git master from around two weeks ago.<br>
            <br>
            Have there been any changes in the network code over the
            last couple of weeks that might have had an effect on what
            Kamailio puts out on the wire for TCP and TLS?<br>
          </blockquote>
          I don't recall any, but if you give the commit id of the
          version you are running and it is ok, we can check the rest of
          the commits till today.<br>
          <br>
          Cheers,<br>
          Daniel<br>
          <blockquote cite="mid:51A77BB5.8090101@crocodile-rcs.com"
            type="cite"> <br>
            The code to send an MSRP reply over WebSocket is in
            modules/msrp/msrp_netio.c:msrp_reply()<br>
            <pre>        if (unlikely((env->srcinfo.proto == PROTO_WS
                        || env->srcinfo.proto == PROTO_WSS)
                        && sr_event_enabled(SREV_TCP_WS_FRAME_OUT))) {
                struct tcp_connection *con = tcpconn_get(env->srcinfo.id, 0, 0,
                                                                0, 0);
                ws_event_info_t wsev;

                if (con == NULL)
                {
                        LM_WARN("TCP/TLS connection for WebSocket could not be"
                                "found\n");
                        return -1;
                }

                memset(&wsev, 0, sizeof(ws_event_info_t));
                wsev.type = SREV_TCP_WS_FRAME_OUT;
                wsev.buf = rplbuf;
                wsev.len = p - rplbuf;
                wsev.id = con->id;
                return sr_event_exec(SREV_TCP_WS_FRAME_OUT, (void *) &wsev);
        }</pre>
            <br>
            The code that handles the SREV_TCP_WS_FRAME_OUT event is in
            modules/websocket/ws_frame.c and basically involves:<br>
            <ul>
              <li>filling in the WebSocket message header<br>
              </li>
              <li>identifying the correct TCP/TLS connection</li>
              <li>setting some flags (for example,
                SND_F_FORCE_CON_REUSE)</li>
              <li>calling tcp_send()</li>
            </ul>
            <p>These areas of the code haven't been changed for months.<br>
            </p>
            <p>Regards,<br>
            </p>
            <p>Peter<br>
            </p>
            <br>
            <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <br>
            <pre wrap="">_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
          </blockquote>
          <br>
          <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
  * <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a> *</pre>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
        </blockquote>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
      </blockquote>
      <br>
      <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
  * <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a> *</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>