Partial implementation of db_flatstore CDRs from *ser

This commit is contained in:
DanB
2015-07-10 21:03:38 +02:00
parent c78953a19f
commit c359516996
10 changed files with 386 additions and 54 deletions

View File

@@ -37,8 +37,7 @@ modparam("tm", "onreply_avp_mode", 1)
#### Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)
#### MAX ForWarD module
loadmodule "maxfwd.so"
@@ -83,17 +82,31 @@ modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600) # 6 hours timeout
modparam("dialog", "db_mode", 0)
#### DbFlatstore module
loadmodule "db_flatstore.so"
modparam("db_flatstore", "single_file", 1)
#### ACCounting module
loadmodule "acc.so"
modparam("acc", "detect_direction", 1)
#modparam("acc", "cdr_flag", "CDR")
modparam("acc", "evi_flag", "CDR")
modparam("acc", "evi_missed_flag", "CDR")
#modparam("acc", "evi_flag", "CDR")
#modparam("acc", "evi_missed_flag", "CDR")
modparam("acc", "evi_extra", "cgr_reqtype=$avp(cgr_reqtype);
cgr_account=$avp(cgr_account);
cgr_destination=$avp(cgr_destination);
cgr_supplier=$avp(cgr_supplier);
dialog_id=$DLG_did")
modparam("acc", "db_url", "flatstore:/tmp")
modparam("acc", "db_flag", "CDR")
modparam("acc", "db_missed_flag", "CDR")
modparam("acc", "db_table_missed_calls", "cgr_missed")
modparam("acc", "db_extra", "cgr_reqtype=$avp(cgr_reqtype);
cgr_account=$avp(cgr_account);
cgr_destination=$avp(cgr_destination);
cgr_supplier=$avp(cgr_supplier);
dialog_id=$DLG_did")
#### CfgUtils module
loadmodule "cfgutils.so"
@@ -205,9 +218,6 @@ route{
# during the dialog.
record_route();
}
# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(relay);
@@ -300,7 +310,6 @@ route{
}
if (!uri==myself) {
append_hf("P-hint: outbound\r\n");
route(relay);
}
@@ -349,6 +358,9 @@ route[location] {
t_reply("404", "Not Found");
exit;
}
append_branch();
append_branch();
setflag(CDR);
}
failure_route[missed_call] {