Hello
<div><br></div><div>Kamailio 3.3.0 </div><div>All default "extra fields" created in database. I create in Database new field "duration" and trying write in this field variable $DLG_lifetime (from dialog module) , but can't do this. What i'm doing wrong?</div>
<div><br></div><div>installed modules: 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> "src_user=$fU;src_domain=$fd;src_ip=$si;"</div><div> "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"</div><div> "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> "src_user=$fU;src_domain=$fd;src_ip=$si;" /* extra fields created in DataBase */</div><div> "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"</div>
<div> "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) /* 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> # enable additional event routes for forwarded requests</div>
<div> # - serial forking, RTP relaying handling, a.s.o.</div><div> if (is_method("INVITE|SUBSCRIBE")) {</div><div> t_on_branch("MANAGE_BRANCH");</div><div> t_on_reply("MANAGE_REPLY");</div>
<div> }</div><div> if (is_method("INVITE")) {</div><div> t_on_failure("MANAGE_FAILURE");</div><div> }</div><div> setflag(DLG_FLAG); # flag 4 duration</div><div>
setflag(FLT_ACC); # do accounting ...</div><div> setflag(FLT_ACCFAILED); # ... even if the transaction fails</div><div> if (!t_relay()) {</div><div> sl_reply_error();</div><div> }</div>
<div> exit;</div><div>}</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>