Module: sip-router Branch: tma0/iptrtpproxy-v2 Commit: e8ced19c9b862fa4cd16f081625cbe8cb765d564 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e8ced19c...
Author: Tomas Mandys tomas.mandys@iptel.org Committer: Tomas Mandys tomas.mandys@iptel.org Date: Tue Apr 5 21:47:01 2011 +0200
Log missed calls fix
Added flag to log also missed calls
---
etc/sip-router-oob.cfg | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/etc/sip-router-oob.cfg b/etc/sip-router-oob.cfg index f204ae8..3c7d694 100644 --- a/etc/sip-router-oob.cfg +++ b/etc/sip-router-oob.cfg @@ -358,7 +358,8 @@ flags FLAG_RTP_PROXY : 13, # the RTP proxy is turned on FLAG_NAT_REG : 14, # the UAC behind NAT, stored in location record FLAG_INIT_DLG : 15, # init INVITE dialog - FLAG_REVERSE_DIR : 16; # set if request goes callee -> caller direction, requires rr.append_fromtag=1 + FLAG_REVERSE_DIR : 16, # set if request goes callee -> caller direction, requires rr.append_fromtag=1 + FLAG_ACC_MISSED : 17; # the missed call will be recorded by ACC
avpflags dialog_cookie; # attribute will be stored in Route headers @@ -500,6 +501,8 @@ modparam("acc_db", "failed_transactions", 1) # If you don't want to have accounting entries written into the database, # comment the next line out. modparam("acc_db", "log_flag", "FLAG_ACC") +# seems "log_flag" and "log_flag_missed" cannot share the same flag! +modparam("acc_db", "log_missed_flag", "FLAG_ACC_MISSED")
# if you would like to customize your CDRs, do it here.... #modparam("acc_db", "attrs", @@ -724,24 +727,26 @@ route[INIT] # Check if the UAC is NATed and fix the message accordingly route(UAC_NAT_DETECTION);
- # if needed then we MUST put after force_rport() which is located in NAT_DETECTION!!! - # Check t_reply() vs. sl_reply() usage in script - #if (!t_newtran()) { - # sl_reply("500", "Internal tm error"); - # drop; - #} - # Activate accounting for all initial INVITEs. In-dialog requests # are accounted by a RR cookie (see below). # It should work also when the call has been already forked at a previous router if (method == "INVITE" && !isflagset(FLAG_TOTAG)) { $dialog_id = @sys.unique; # make unique dialogid setflag(FLAG_ACC); + setflag(FLAG_ACC_MISSED); setflag(FLAG_INIT_DLG); } else if (isflagset(FLAG_TOTAG) && @hf_value.route[0].params.ftag != @from.tag) { setflag(FLAG_REVERSE_DIR); # callee -> caller }
+ # if needed then we MUST put after force_rport() which is located in NAT_DETECTION!!! + # also must be called after FLAG_ACC is set !!! + # Check t_reply() vs. sl_reply() usage in script + #if (!t_newtran()) { + # sl_reply("500", "Internal tm error"); + # drop; + #} + # Set flag and use it instead of the attribute. if ($replicate==1) { setflag(FLAG_REPL_ENABLED); @@ -946,6 +951,7 @@ route[PROCESS_ROUTES] # for this. if ($account == "yes") { setflag(FLAG_ACC); + setflag(FLAG_ACC_MISSED); }
# Restore the RTP proxy flag if present