<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi,</p>
    <p>changing:</p>
    <p># account only INVITEs<br>
              if (is_method("INVITE")) {<br>
                      setflag(FLT_ACC); # do accounting<br>
              }</p>
    <p>with:</p>
    <p> if (is_method("INVITE")) {<br>
                      dlg_manage();<br>
                      setflag(FLT_ACC); # do accounting<br>
              }</p>
    <p>solve.</p>
    <p>Thank you</p>
    <p>Regards<br>
    </p>
    <br>
    <div class="moz-cite-prefix">El 05/01/2017 a las 11:21, Diego
      Nadares escribió:<br>
    </div>
    <blockquote
cite="mid:CAP-r+epv4Dw-zFVh9+wPpb8yYMqSVBLU=6_qmc6hOpRaivJUTQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Sorry. I thought that after sending the email. 
        <div><br>
        </div>
        <div>Kamailio It's not saving even in acc table? Are you
          starting a dialog?
          <div><br>
          </div>
          <div><span class="emphasis"
style="color:rgb(0,0,0);font-family:helvetica,arial;font-size:12px;text-align:justify"><em>dialog</em></span><span
style="color:rgb(0,0,0);font-family:helvetica,arial;font-size:12px;text-align:justify"> --
              Dialog, if </span><span class="gmail-quote"
style="color:rgb(0,0,0);font-family:helvetica,arial;font-size:12px;text-align:justify">“<span
                class="gmail-quote">cdr_enable</span>”</span><span
style="color:rgb(0,0,0);font-family:helvetica,arial;font-size:12px;text-align:justify"> module
              parameter is enabled</span><br>
          </div>
          <div><span
style="color:rgb(0,0,0);font-family:helvetica,arial;font-size:12px;text-align:justify"><br>
            </span></div>
          <div style="text-align:justify"><font face="helvetica, arial"
              color="#000000"><span style="font-size:12px">In my cfg</span></font></div>
          <div style="text-align:justify"><font face="helvetica, arial"
              color="#000000"><span style="font-size:12px"><br>
              </span></font></div>
          <div style="text-align:justify">
            <div style="font-size:13px;text-align:start">if
              (is_method("INVITE") && !has_totag()) {</div>
            <div style="font-size:13px;text-align:start">               
              setflag(FLT_ACC); # do accounting</div>
            <div style="font-size:13px;text-align:start">               
              dlg_manage(); <--------- Starting dialog</div>
            <div style="font-size:13px;text-align:start">               
              setflag(FLT_ACCMISSED);</div>
            <div style="font-size:13px;text-align:start">               
              setflag(FLT_ACCFAILED);</div>
            <div style="font-size:13px;text-align:start"> }</div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-01-05 11:58 GMT-03:00 Annus Fictus
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:annusfictus@gmail.com" target="_blank">annusfictus@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>Hi Diego,</p>
              <p>I'm using default script:</p>
              <p># account only INVITEs<br>
                        if (is_method("INVITE")) {<br>
                                setflag(FLT_ACC); # do accounting<br>
                        }</p>
              <p><br>
              </p>
              <p>if (is_method("BYE")) {<br>
                                        setflag(FLT_ACC); # do
                accounting ...<br>
                                        setflag(FLT_ACCFAILED); # ...
                even if the transaction fails<br>
                                }</p>
              <p>Regards<br>
              </p>
              <div>
                <div class="h5"> <br>
                  <div class="m_121252918161017691moz-cite-prefix">El
                    05/01/2017 a las 09:54, Diego Nadares escribió:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hi Annus,
                      <div><br>
                      </div>
                      <div>Did you set the flags for those calls you
                        want to account?</div>
                      <div><br>
                      </div>
                      <div>I have something like this in my request
                        route</div>
                      <div><br>
                      </div>
                      <div>
                        <div>if (is_method("INVITE") &&
                          !has_totag()) {</div>
                        <div>                setflag(FLT_ACC); # do
                          accounting</div>
                        <div>                dlg_manage();</div>
                        <div>                setflag(FLT_ACCMISSED);</div>
                        <div>                setflag(FLT_ACCFAILED);</div>
                        <div> }</div>
                      </div>
                      <div><br>
                      </div>
                      <div>Logs?</div>
                      <div><br>
                      </div>
                      <div>Cheers,</div>
                      <div><br>
                      </div>
                      <div>Diego</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">2017-01-05 11:13
                        GMT-03:00 Annus Fictus <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:annusfictus@gmail.com"
                            target="_blank">annusfictus@gmail.com</a>></span>:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">Hello,<br>
                          <br>
                          I'm trying to save Kamailio CDR on acc_cdrs
                          table without success. My relevant
                          configuration look like:<br>
                          <br>
                          -----<br>
                          <br>
                          #!define FLT_ACC 1<br>
                          #!define FLT_ACCMISSED 2<br>
                          #!define FLT_ACCFAILED 3<br>
                          <br>
                          -----<br>
                          <br>
                          #!define WITH_ACCDB<br>
                          <br>
                          ----<br>
                          <br>
                          loadmodule "dialog.so"<br>
                          loadmodule "acc.so"<br>
                          modparam("dialog", "dlg_flag", 0)<br>
                          <br>
                          ----<br>
                          <br>
                          # ----- acc params -----<br>
                          modparam("acc", "early_media", 0)<br>
                          modparam("acc", "report_ack", 0)<br>
                          modparam("acc", "report_cancels", 0)<br>
                          modparam("acc", "detect_direction", 0)<br>
                          modparam("acc", "log_flag", FLT_ACC)<br>
                          modparam("acc", "log_missed_flag",
                          FLT_ACCMISSED)<br>
                          modparam("acc", "log_extra",<br>
                                  "src_user=$fU;src_domain=$fd;s<wbr>rc_ip=$si;"<br>
                                  "dst_ouser=$tU;dst_user=$rU;ds<wbr>t_domain=$rd")<br>
                          modparam("acc", "failed_transaction_flag",
                          FLT_ACCFAILED)<br>
                          #!ifdef WITH_ACCDB<br>
                          modparam("acc", "db_flag", FLT_ACC)<br>
                          modparam("acc", "db_missed_flag",
                          FLT_ACCMISSED)<br>
                          modparam("acc", "db_url", DBURL)<br>
                          modparam("acc", "cdr_enable", 1)<br>
                          modparam("acc", "cdr_log_enable", 1)<br>
                          modparam("acc", "cdr_on_failed", 1)<br>
                          modparam("acc", "cdrs_table", "acc_cdrs")<br>
                          modparam("acc", "cdr_start_on_confirmed", 1)<br>
                          modparam("acc", "db_extra",<br>
                                  "src_user=$fU;src_domain=$fd;s<wbr>rc_ip=$si;"<br>
                                  "dst_ouser=$tU;dst_user=$rU;ds<wbr>t_domain=$td")<br>
                          #!endif<br>
                          <br>
                          Any hint is really appreciate.<br>
                          <br>
                          Regards<br>
                          <br>
                          <br>
                          <br>
                          ______________________________<wbr>_________________<br>
                          SIP Express Router (SER) and Kamailio
                          (OpenSER) - sr-users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:sr-users@lists.sip-router.org"
                            target="_blank">sr-users@lists.sip-router.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                            rel="noreferrer" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a><br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset
                      class="m_121252918161017691mimeAttachmentHeader"></fieldset>
                    <br>
                    <pre>______________________________<wbr>_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="m_121252918161017691moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="m_121252918161017691moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>
</pre>
    </blockquote>
    

  </div></div></div>


______________________________<wbr>_________________

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" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>


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


<fieldset class="mimeAttachmentHeader"></fieldset>
<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>
</body></html>