<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hello,</tt><tt><br>
        <br>
        If you want to add to your acc record information from the BYE
        time, you need to use the db_extra_bye (versus db_extra which is
        for info at INVITE time):<br>
        &nbsp;&nbsp;&nbsp;
        <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.10.x/acc.html#id294720">http://www.opensips.org/html/docs/modules/1.10.x/acc.html#id294720</a><br>
        <br>
        So try:<br>
        &nbsp;&nbsp;&nbsp; </tt><tt>modparam("acc", "db_extra_bye",
        "direction=$DLG_dir")</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Regards,</tt><br>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 30.01.2014 19:04, Wilmar Campos wrote:<br>
    </div>
    <blockquote
cite="mid:CAH_cxxFUPjmPD0KJWOiuhQUGLU4K1owedue8+zz0OdL8j9vnwQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Razvan, Yes I have, but it have an empty value.
        <div>I have even try to assign it to a pvar but nothing works.</div>
        <div><br>
        </div>
        <div>So far I have try this:&nbsp;dialog_dir=$avp(dlg_dir)")</div>
        <div>and&nbsp;dialog_dir=$DLG_dir)")</div>
        <div><br>
        </div>
        <div>Please note that I have a local route for the dialog timer:</div>
        <div>
          <div>local_route {</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; if (is_method("BYE") &amp;&amp;
            $DLG_dir=="UPSTREAM") {</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; acc_db_request("200 Dialog
            Timeout","acc_bye");</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("L_ERROR", "$si $rU Dialog Timeout |
            $DLG_dir &nbsp;\n");</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>In this record, the $DLG_dir value is stored correctly.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Jan 30, 2014 at 4:13 AM, R&#259;zvan
          Crainea <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,
            Wilmar!<br>
            <br>
            Have you tried setting the $DLG_dir pvar in the db_extra?
            For example:<br>
            <br>
            modparam("acc", "db_extra", "direction=$DLG_dir")<br>
            <br>
            Don't forget you have to add the direction column to your
            database table, both acc and missed_calls.<br>
            <br>
            Best regards,<br>
            <br>
            Razvan Crainea<br>
            OpenSIPS Core Developer<br>
            <a moz-do-not-send="true"
              href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a><br>
            <br>
            On 01/29/2014 09:15 PM, Wilmar Campos wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              Hi All,<br>
              <br>
              Can someone please point me to the right direction on how
              to store the<br>
              $DLG_dir into the accounting cdr?<br>
              <br>
              Thanks,<br>
              <br>
              Wilmar<br>
              <br>
              <br>
              _______________________________________________<br>
              Users mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
              <br>
            </blockquote>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>