<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&#39;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&#39;ll also find below warnings in msg_parser.h for the used flags. Since flag 30 is declared for mediaproxy in msg_parser.h, I&#39;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="color:rgb(0,0,0);font-family:arial"><font face="&#39;courier new&#39;, monospace" color="#666666">/* WARNING: Value (1 &lt;&lt; 29) is temporarily reserved for use in kamailio acc</font></div><div style="color:rgb(0,0,0);font-family:arial">

<font face="&#39;courier new&#39;, monospace" color="#666666"> * module (flag FL_REQ_UPSTREAM)! */</font></div><div style="color:rgb(0,0,0);font-family:arial"><font face="&#39;courier new&#39;, monospace" color="#666666"><br>

</font></div><div style="color:rgb(0,0,0);font-family:arial"><font face="&#39;courier new&#39;, monospace" color="#666666">/* WARNING: Value (1 &lt;&lt; 30) is temporarily reserved for use in kamailio</font></div><div style="color:rgb(0,0,0);font-family:arial">

<font face="&#39;courier new&#39;, monospace" color="#666666"> * media proxy module (flag FL_USE_MEDIA_PROXY)! */</font></div><div style="color:rgb(0,0,0);font-family:arial"><font face="&#39;courier new&#39;, monospace" color="#666666"><br>

</font></div><div style="color:rgb(0,0,0);font-family:arial"><font face="&#39;courier new&#39;, monospace" color="#666666">/* WARNING: Value (1 &lt;&lt; 31) is temporarily reserved for use in kamailio</font></div><div style="color:rgb(0,0,0);font-family:arial">

<font face="&#39;courier new&#39;, monospace" color="#666666"> * 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 face="&#39;courier new&#39;, monospace" color="#666666">$ grep -R  &#39;define FL.* (1&#39; src/kamailio/kamailio-3.2.0</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666"><br></font></div><div><font face="&#39;courier new&#39;, monospace"><font color="#666666">modules_k/call_control/call_control.c:#define FL_USE_CALL_CONTROL       (1&lt;&lt;30) // use call control for a dialog</font></font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">modules_k/nat_traversal/nat_traversal.c:#define FL_DO_KEEPALIVE (1&lt;&lt;31)</font></div><div><font color="#666666"><font face="&#39;courier new&#39;, monospace">modules_k/acc/acc.h:#define FL_REQ_UPSTREAM </font><font face="&#39;courier new&#39;, monospace">(1&lt;&lt;29)</font></font></div>

<div><font color="#666666"><font face="&#39;courier new&#39;, monospace">parser/msg_parser.h:#define FL_FORCE_RPORT  </font><font face="&#39;courier new&#39;, monospace">(1 &lt;&lt; 0)</font><font face="&#39;courier new&#39;, monospace">  /*!&lt; force rport */</font></font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_FORCE_ACTIVE (1 &lt;&lt; 1)  /*!&lt; force active SDP */</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_SDP_IP_AFS   (1 &lt;&lt; 2)  /*!&lt; SDP IP rewritten */</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_SDP_PORT_AFS (1 &lt;&lt; 3)  /*!&lt; SDP port rewritten */</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_SHM_CLONE    (1 &lt;&lt; 4)  /*!&lt; msg cloned in SHM as a single chunk */</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_TIMEOUT      (1 &lt;&lt; 5)  /*!&lt; message belongs to an &quot;expired&quot; branch</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_REPLIED      (1 &lt;&lt; 6)  /*!&lt; message branch received at least one reply</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_HASH_INDEX   (1 &lt;&lt; 7)  /*!&lt; msg-&gt;hash_index contains a valid value (tm use)*/</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_MTU_TCP_FB   (1 &lt;&lt; 8)</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_MTU_TLS_FB   (1 &lt;&lt; 9)</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_MTU_SCTP_FB  (1 &lt;&lt; 10)</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_ADD_LOCAL_RPORT  (1 &lt;&lt; 11) /*!&lt; add &#39;rport&#39; to local via hdr */</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666">parser/msg_parser.h:#define FL_SDP_BODY     (1 &lt;&lt; 12)  /*!&lt; msg has SDP in body */</font></div>

<div><font face="&#39;courier new&#39;, monospace" color="#666666">modules/mediaproxy/mediaproxy.c:#define FL_USE_MEDIA_PROXY (1&lt;&lt;30)</font></div><div><font face="&#39;courier new&#39;, monospace" color="#666666"><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><br>
<br><br><div class="gmail_quote">On Wed, Feb 29, 2012 at 00:18, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">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 class="h5"><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"> 
                   </span><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">....</span></div>
          <div><span style="color:rgb(51,102,255);font-family:tahoma,sans-serif">
              <div>        if ((request-&gt;msg_flags &amp;
                FL_USE_MEDIA_PROXY) == 0)</div>
              <div>                return;</div>
              <div>         ....</div>
              <div>        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       (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">       
              ...</font></div>
          <div><font color="#3366ff" face="tahoma, sans-serif">     
                msg-&gt;msg_flags |= FL_USE_CALL_CONTROL;</font></div>
          <div><font color="#3366ff" face="tahoma, sans-serif">       
              ...</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"> 
                    (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 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&#39;ll do what you suggested and we&#39;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 class="im"><pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
  </div></div>

</blockquote></div><br></div>