<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    do you get any error message or what is the problem you encounter?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 10/15/12 10:14 AM, Nord7 wrote:<br>
    </div>
    <blockquote
cite="mid:CAHViUgeOO+KXzap8yspGKH+ng90W+QbfnhWAbOZu=YJ8d_nPxQ@mail.gmail.com"
      type="cite">Hello
      <div><br>
      </div>
      <div>Kamailio 3.3.0&nbsp;</div>
      <div>All default "extra fields" created in database. I create in
        Database new field "duration" and trying write in this field
        variable&nbsp;$DLG_lifetime (from dialog module) , but can't do this.
        What i'm doing wrong?</div>
      <div><br>
      </div>
      <div>installed modules:&nbsp;ACC, DIALOG</div>
      <div>
        <div># ----- acc params -----</div>
        <div>/* what special events should be accounted ? */</div>
        <div>modparam("acc", "early_media", 0)</div>
        <div>
          modparam("acc", "report_ack", 0)</div>
        <div>modparam("acc", "report_cancels", 0)</div>
        <div>modparam("acc", "detect_direction", 0)</div>
        <div>/* account triggers (flags) */</div>
        <div>modparam("acc", "log_level", 1)</div>
        <div>modparam("acc", "log_flag", FLT_ACC)</div>
        <div>modparam("acc", "log_missed_flag", FLT_ACCMISSED)</div>
        <div>modparam("acc", "log_extra",</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; "src_user=$fU;src_domain=$fd;src_ip=$si;"</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; "duration=$DLG_lifetime")</div>
        <div>modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)</div>
        <div>/* enhanced DB accounting */</div>
        <div>modparam("acc", "db_flag", FLT_ACC)</div>
        <div>modparam("acc", "db_missed_flag", FLT_ACCMISSED)</div>
        <div>modparam("acc", "db_url", DBURL)</div>
        <div>modparam("acc", "db_extra",</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; "src_user=$fU;src_domain=$fd;src_ip=$si;" &nbsp; &nbsp; &nbsp;/*
          extra fields created in DataBase */</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; "duration=$DLG_lifetime")</div>
        <div>modparam("acc", "cdr_enable", 1)</div>
        <div>modparam("acc", "cdr_start_on_confirmed", 0)</div>
        <div>modparam("acc", "cdr_facility", "LOG_DAEMON")</div>
        <div><br>
        </div>
      </div>
      <div>
        <div># ----- dialog params -----</div>
        <div>modparam("dialog", "enable_stats", 1)</div>
        <div>modparam("dialog", "hash_size", 4096)</div>
        <div>modparam("dialog", "rr_param", "did")</div>
        <div>modparam("dialog", "dlg_flag", DLG_FLAG) &nbsp;/* DLG_FLAG=4 */</div>
        <div>modparam("dialog", "default_timeout", 21600)</div>
        <div>modparam("dialog", "timeout_avp", "$avp(i:10)")</div>
        <div>modparam("dialog", "dlg_match_mode", 0)</div>
        <div>modparam("dialog", "detect_spirals", 1)</div>
        <div>modparam("dialog", "db_url", DBURL)</div>
        <div>modparam("dialog", "db_mode", 1)</div>
        <div>modparam("dialog", "db_fetch_rows", 500)</div>
      </div>
      <div><br>
      </div>
      <div>
        <div><br>
        </div>
        <div>########Routing Logic########</div>
        <div><br>
        </div>
        <div>route[RELAY] {</div>
        <div><br>
        </div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; # enable additional event routes for forwarded
          requests</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; # - serial forking, RTP relaying handling, a.s.o.</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (is_method("INVITE|SUBSCRIBE")) {</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_branch("MANAGE_BRANCH");</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_reply("MANAGE_REPLY");</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (is_method("INVITE")) {</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_on_failure("MANAGE_FAILURE");</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; setflag(DLG_FLAG); # flag 4 duration</div>
        <div>
          &nbsp; &nbsp; &nbsp; &nbsp; setflag(FLT_ACC); # do accounting ...</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; setflag(FLT_ACCFAILED); # ... even if the
          transaction fails</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (!t_relay()) {</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_reply_error();</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; exit;</div>
        <div>}</div>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a></pre>
  </body>
</html>