<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I will patch and backport during next days -- I was mostly out of
    the office during past weeks.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 3/12/12 11:30 AM, Reda Aouad wrote:
    <blockquote
cite="mid:CAA30pc5Xzv6o8PUWx0qYfgrDp4M8zsnUV_WaZPc7ZuaKRF5_ZQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><font color="#3366ff"><font><font
              face="tahoma,sans-serif">Hi Daniel,<br>
              <br>
              Any plans to backport this to 3.2 ?<br>
              I could still do the changes manually before compilation
              if you don't have time to do it.<br clear="all">
            </font></font></font>
        <div dir="ltr"><font color="#3366ff" face="tahoma, sans-serif"><br>
            Thank you again<br>
          </font>
          <div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div>
        </div>
        <br>
        <br>
        <br>
        <div class="gmail_quote">On Wed, Feb 29, 2012 at 10:19, Reda
          Aouad <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:reda.aouad@gmail.com">reda.aouad@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr"><font color="#3366ff"><font><font
                    face="tahoma,sans-serif">Daniel, It works with flag
                    28.</font></font></font>
              <div><font color="#3366ff" face="tahoma, sans-serif">Can
                  you confirm that flag 28 isn't used by another module?<br>
                </font>
                <div><font color="#3366ff"><font><font
                        face="tahoma,sans-serif">If so, can you patch
                        it? When is the next release scheduled for?</font></font></font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif"><br>
                  </font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif">The
                    following are the changes I made:</font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif"><br>
                  </font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif">modules_k/call_control.c:
                    flag changed to 28</font></div>
                <div><span
                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-------------------------------------------</span>
                </div>
                <div><font color="#666666" face="'courier new',
                    monospace">#define FL_USE_CALL_CONTROL &nbsp; &nbsp; &nbsp;
                    (1&lt;&lt;28) // use call control for a dialog</font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif"><br>
                  </font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif">parser/msg_parser.h:
                    warning added</font></div>
                <div><font color="#3366ff" face="tahoma, sans-serif">-------------------------------------------</font></div>
                <div>
                  <div><font color="#666666" face="'courier new',
                      monospace">/* WARNING: Value (1 &lt;&lt; 28) is
                      temporarily reserved for use in kamailio
                      call_control</font></div>
                  <div><font color="#666666" face="'courier new',
                      monospace">&nbsp;* module (flag&nbsp;
                      FL_USE_CALL_CONTROL&nbsp;)! */</font></div>
                  <div
                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                  </div>
                </div>
                <div>
                  <div>
                    <div>
                      <div dir="ltr"><font color="#3366ff" face="tahoma,
                          sans-serif"><br>
                        </font></div>
                      <div dir="ltr">
                        <font color="#3366ff" face="tahoma, sans-serif">Thank
                          you :)</font></div>
                      <span class="HOEnZb"><font color="#888888">
                          <div dir="ltr">
                            <div><font color="#3366ff" face="tahoma,
                                sans-serif">Reda</font></div>
                          </div>
                        </font></span>
                      <div>
                        <div class="h5"><br>
                          <br>
                          <br>
                          <div class="gmail_quote">On Wed, Feb 29, 2012
                            at 09:58, Reda Aouad <span dir="ltr">&lt;<a
                                moz-do-not-send="true"
                                href="mailto:reda.aouad@gmail.com"
                                target="_blank">reda.aouad@gmail.com</a>&gt;</span>
                            wrote:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex">
                              <div dir="ltr">
                                <div dir="ltr">
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">A
                                    quick grep on flags FL_* in the
                                    sources shows the following :</div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">
                                    Flag 29 is used by acc module, 31 by
                                    nat_traversal, 0 to 12 in the
                                    parser.</div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">Thus
                                    I assume that it is safe to test
                                    using flag 28.</div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">
                                    I'll keep you posted on the test
                                    result.</div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                  </div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">You'll
                                    also find below warnings in
                                    msg_parser.h for the used
                                    flags.&nbsp;Since flag 30 is declared for
                                    mediaproxy in msg_parser.h, I'll
                                    change the flag of callcontrol to
                                    28.</div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                  </div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-----------------------------------------------------------------
                                  </div>
                                  <div>
                                    <div style="font-family:arial"><font
                                        color="#666666" face="'courier
                                        new', monospace">/* WARNING:
                                        Value (1 &lt;&lt; 29) is
                                        temporarily reserved for use in
                                        kamailio acc</font></div>
                                    <div style="font-family:arial">
                                      <font color="#666666"
                                        face="'courier new', monospace">&nbsp;*
                                        module (flag FL_REQ_UPSTREAM)!
                                        */</font></div>
                                    <div style="font-family:arial"><font
                                        color="#666666" face="'courier
                                        new', monospace"><br>
                                      </font></div>
                                    <div style="font-family:arial"><font
                                        color="#666666" face="'courier
                                        new', monospace">/* WARNING:
                                        Value (1 &lt;&lt; 30) is
                                        temporarily reserved for use in
                                        kamailio</font></div>
                                    <div style="font-family:arial">
                                      <font color="#666666"
                                        face="'courier new', monospace">&nbsp;*
                                        media proxy module (flag
                                        FL_USE_MEDIA_PROXY)! */</font></div>
                                    <div style="font-family:arial"><font
                                        color="#666666" face="'courier
                                        new', monospace"><br>
                                      </font></div>
                                    <div style="font-family:arial"><font
                                        color="#666666" face="'courier
                                        new', monospace">/* WARNING:
                                        Value (1 &lt;&lt; 31) is
                                        temporarily reserved for use in
                                        kamailio</font></div>
                                    <div style="font-family:arial">
                                      <font color="#666666"
                                        face="'courier new', monospace">&nbsp;*
                                        nat_traversal module (flag
                                        FL_DO_KEEPALIVE)! */</font></div>
                                  </div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-----------------------------------------------------------------
                                  </div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                  </div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">$
                                      grep -R &nbsp;'define FL.* (1'
                                      src/kamailio/kamailio-3.2.0</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace"><br>
                                    </font></div>
                                  <div><font face="'courier new',
                                      monospace"><font color="#666666">modules_k/call_control/call_control.c:#define
                                        FL_USE_CALL_CONTROL &nbsp; &nbsp; &nbsp;
                                        (1&lt;&lt;30) // use call
                                        control for a dialog</font></font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">modules_k/nat_traversal/nat_traversal.c:#define
                                      FL_DO_KEEPALIVE (1&lt;&lt;31)</font></div>
                                  <div><font color="#666666"><font
                                        face="'courier new', monospace">modules_k/acc/acc.h:#define
                                        FL_REQ_UPSTREAM </font><font
                                        face="'courier new', monospace">(1&lt;&lt;29)</font></font></div>
                                  <div><font color="#666666"><font
                                        face="'courier new', monospace">parser/msg_parser.h:#define
                                        FL_FORCE_RPORT &nbsp;</font><font
                                        face="'courier new', monospace">(1
                                        &lt;&lt; 0)</font><font
                                        face="'courier new', monospace">
                                        &nbsp;/*!&lt; force rport */</font></font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_FORCE_ACTIVE (1 &lt;&lt; 1)
                                      &nbsp;/*!&lt; force active SDP */</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_SDP_IP_AFS &nbsp; (1 &lt;&lt; 2)
                                      &nbsp;/*!&lt; SDP IP rewritten */</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_SDP_PORT_AFS (1 &lt;&lt; 3)
                                      &nbsp;/*!&lt; SDP port rewritten */</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_SHM_CLONE &nbsp; &nbsp;(1 &lt;&lt; 4)
                                      &nbsp;/*!&lt; msg cloned in SHM as a
                                      single chunk */</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_TIMEOUT &nbsp; &nbsp; &nbsp;(1 &lt;&lt; 5)
                                      &nbsp;/*!&lt; message belongs to an
                                      "expired" branch</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_REPLIED &nbsp; &nbsp; &nbsp;(1 &lt;&lt; 6)
                                      &nbsp;/*!&lt; message branch received
                                      at least one reply</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_HASH_INDEX &nbsp; (1 &lt;&lt; 7)
                                      &nbsp;/*!&lt; msg-&gt;hash_index
                                      contains a valid value (tm use)*/</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_MTU_TCP_FB &nbsp; (1 &lt;&lt; 8)</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_MTU_TLS_FB &nbsp; (1 &lt;&lt; 9)</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_MTU_SCTP_FB &nbsp;(1 &lt;&lt; 10)</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_ADD_LOCAL_RPORT &nbsp;(1 &lt;&lt;
                                      11) /*!&lt; add 'rport' to local
                                      via hdr */</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">parser/msg_parser.h:#define
                                      FL_SDP_BODY &nbsp; &nbsp; (1 &lt;&lt; 12)
                                      &nbsp;/*!&lt; msg has SDP in body */</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace">modules/mediaproxy/mediaproxy.c:#define
                                      FL_USE_MEDIA_PROXY (1&lt;&lt;30)</font></div>
                                  <div><font color="#666666"
                                      face="'courier new', monospace"><br>
                                    </font></div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-----------------------------------------------------------------</div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                  </div>
                                  <div
                                    style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                  </div>
                                  <div><font color="#3366ff"
                                      face="tahoma, sans-serif">Reda</font></div>
                                </div>
                                <div>
                                  <div><br>
                                    <br>
                                    <br>
                                    <div class="gmail_quote">On Wed, Feb
                                      29, 2012 at 00:18,
                                      Daniel-Constantin Mierla <span
                                        dir="ltr">&lt;<a
                                          moz-do-not-send="true"
                                          href="mailto:miconda@gmail.com"
                                          target="_blank">miconda@gmail.com</a>&gt;</span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote"
                                        style="margin:0 0 0
                                        .8ex;border-left:1px #ccc
                                        solid;padding-left:1ex">
                                        <div text="#000000"
                                          bgcolor="#FFFFFF"> That should
                                          be. Try changing one of them
                                          to (1&lt;&lt;29) and see if
                                          all works fine.<br>
                                          <br>
                                          On another hand, defining and
                                          using core msg flags in a
                                          module is a risk, a different
                                          solution has to be done, a
                                          simple one is to move the
                                          definition of these flags in
                                          the core, so there will be no
                                          overlap in the future.<br>
                                          <br>
                                          Cheers,<br>
                                          Daniel
                                          <div>
                                            <div><br>
                                              <br>
                                              On 2/27/12 9:32 PM, Reda
                                              Aouad wrote:
                                              <blockquote type="cite">
                                                <div dir="ltr">
                                                  <div><span
                                                      style="font-family:tahoma,sans-serif;color:rgb(51,102,255)">I
                                                      looked into
                                                      mediaproxy.c and
                                                      found the
                                                      following :</span></div>
                                                  <div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                                      </span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-------------------------------------------------------</span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">#define

                                                        FL_USE_MEDIA_PROXY
                                                        (1&lt;&lt;30)</span></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif"><br>
                                                      </font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">...</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif"><br>
                                                      </font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">#
                                                        dialog callback</font></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                                      </span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">_</span><span
style="color:rgb(51,102,255);font-family:tahoma,sans-serif">_dialog_created

                                                        (...) {</span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">&nbsp;
                                                        &nbsp; &nbsp; &nbsp;</span><span
style="color:rgb(51,102,255);font-family:tahoma,sans-serif">&nbsp;</span><span
style="color:rgb(51,102,255);font-family:tahoma,sans-serif">....</span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">
                                                        <div>&nbsp; &nbsp; &nbsp; &nbsp; if
                                                          ((request-&gt;msg_flags
                                                          &amp;
                                                          FL_USE_MEDIA_PROXY)
                                                          == 0)</div>
                                                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                                          &nbsp; &nbsp; return;</div>
                                                        <div>&nbsp; &nbsp; &nbsp;
                                                          &nbsp;&nbsp;&nbsp;....</div>
                                                        <div>&nbsp; &nbsp; &nbsp; &nbsp;
                                                          use_media_proxy
                                                          (...);</div>
                                                        <div>}</div>
                                                      </span></div>
                                                    <div>
                                                      <div><span
                                                          style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-------------------------------------------------------</span></div>
                                                      <br>
                                                    </div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif"><br>
                                                      </font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">I
                                                        also found this
                                                        in
                                                        call_control.c</font></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-------------------------------------------------------</span></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">#define

                                                        FL_USE_CALL_CONTROL
                                                        &nbsp; &nbsp; &nbsp;
                                                        (1&lt;&lt;30)</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif"><br>
                                                      </font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">#
                                                        Public API</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">CallControl

                                                        (...) {</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">&nbsp; &nbsp;
                                                        &nbsp; &nbsp; ...</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">&nbsp; &nbsp;
                                                        &nbsp;
                                                        &nbsp;&nbsp;msg-&gt;msg_flags
                                                        |=
                                                        FL_USE_CALL_CONTROL;</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">&nbsp; &nbsp;
                                                        &nbsp; &nbsp; ...</font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">}</font></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">-------------------------------------------------------</span></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif"><br>
                                                      </font></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif">So I
                                                        suspect that
                                                        since the
                                                        call_control
                                                        module uses the
                                                        same flag as the
                                                        mediaproxy
                                                        module,
                                                        call_control
                                                        function is
                                                        used, flag 30 is
                                                        set, and the
                                                        following
                                                        condition in the
                                                        __dialog_created
                                                        callback
                                                        function above
                                                        is never met</font></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                                      </span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">&nbsp;
                                                        &nbsp; &nbsp; &nbsp;
                                                        (request-&gt;msg_flags
                                                        &amp;
                                                        FL_USE_MEDIA_PROXY)
                                                        == 0</span> </div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><br>
                                                      </span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">so

                                                        the callback
                                                        function
                                                        continues until
                                                        executing its
                                                        last line :
                                                        use_media_proxy
                                                        (...)</span></div>
                                                    <div><span
                                                        style="color:rgb(51,102,255);font-family:tahoma,sans-serif">which

                                                        is called on
                                                        every call to
                                                        call_control ( )
                                                        function..</span></div>
                                                    <div><font
                                                        color="#3366ff"
                                                        face="tahoma,
                                                        sans-serif"><br>
                                                      </font></div>
                                                    <div>
                                                      <div dir="ltr">
                                                        <div><font
                                                          color="#3366ff"
                                                          face="tahoma,
                                                          sans-serif">Reda</font></div>
                                                      </div>
                                                      <br>
                                                      <br>
                                                      <br>
                                                      <div
                                                        class="gmail_quote">On
                                                        Mon, Feb 27,
                                                        2012 at 18:39,
                                                        Reda Aouad <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:reda.aouad@gmail.com"
                                                          target="_blank">reda.aouad@gmail.com</a>&gt;</span>
                                                        wrote:<br>
                                                        <blockquote
                                                          class="gmail_quote"
                                                          style="margin:0pt
                                                          0pt 0pt
                                                          0.8ex;border-left:1px
                                                          solid
                                                          rgb(204,204,204);padding-left:1ex">
                                                          <div
                                                          bgcolor="#FFFFFF">
                                                          <div>Ok thanks
                                                          Daniel.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>I'll do
                                                          what you
                                                          suggested and
                                                          we'll see how
                                                          to proceed.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>Thanks
                                                          again</div>
                                                          <div>Reda</div>
                                                          </div>
                                                        </blockquote>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </blockquote>
                                              <br>
                                              <blockquote type="cite"> </blockquote>
                                              <br>
                                            </div>
                                          </div>
                                          <div>
                                            <pre cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
                                          </div>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                          <br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.asipto.com/index.php/kamailio-advanced-training/">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
  </body>
</html>