|
@@ -358,7 +358,8 @@ flags
|
|
FLAG_RTP_PROXY : 13, # the RTP proxy is turned on
|
|
FLAG_RTP_PROXY : 13, # the RTP proxy is turned on
|
|
FLAG_NAT_REG : 14, # the UAC behind NAT, stored in location record
|
|
FLAG_NAT_REG : 14, # the UAC behind NAT, stored in location record
|
|
FLAG_INIT_DLG : 15, # init INVITE dialog
|
|
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
|
|
avpflags
|
|
dialog_cookie; # attribute will be stored in Route headers
|
|
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,
|
|
# If you don't want to have accounting entries written into the database,
|
|
# comment the next line out.
|
|
# comment the next line out.
|
|
modparam("acc_db", "log_flag", "FLAG_ACC")
|
|
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....
|
|
# if you would like to customize your CDRs, do it here....
|
|
#modparam("acc_db", "attrs",
|
|
#modparam("acc_db", "attrs",
|
|
@@ -724,24 +727,26 @@ route[INIT]
|
|
# Check if the UAC is NATed and fix the message accordingly
|
|
# Check if the UAC is NATed and fix the message accordingly
|
|
route(UAC_NAT_DETECTION);
|
|
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
|
|
# Activate accounting for all initial INVITEs. In-dialog requests
|
|
# are accounted by a RR cookie (see below).
|
|
# are accounted by a RR cookie (see below).
|
|
# It should work also when the call has been already forked at a previous router
|
|
# It should work also when the call has been already forked at a previous router
|
|
if (method == "INVITE" && !isflagset(FLAG_TOTAG)) {
|
|
if (method == "INVITE" && !isflagset(FLAG_TOTAG)) {
|
|
$dialog_id = @sys.unique; # make unique dialogid
|
|
$dialog_id = @sys.unique; # make unique dialogid
|
|
setflag(FLAG_ACC);
|
|
setflag(FLAG_ACC);
|
|
|
|
+ setflag(FLAG_ACC_MISSED);
|
|
setflag(FLAG_INIT_DLG);
|
|
setflag(FLAG_INIT_DLG);
|
|
} else if (isflagset(FLAG_TOTAG) && @hf_value.route[0].params.ftag != @from.tag) {
|
|
} else if (isflagset(FLAG_TOTAG) && @hf_value.route[0].params.ftag != @from.tag) {
|
|
setflag(FLAG_REVERSE_DIR); # callee -> caller
|
|
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.
|
|
# Set flag and use it instead of the attribute.
|
|
if ($replicate==1) {
|
|
if ($replicate==1) {
|
|
setflag(FLAG_REPL_ENABLED);
|
|
setflag(FLAG_REPL_ENABLED);
|
|
@@ -946,6 +951,7 @@ route[PROCESS_ROUTES]
|
|
# for this.
|
|
# for this.
|
|
if ($account == "yes") {
|
|
if ($account == "yes") {
|
|
setflag(FLAG_ACC);
|
|
setflag(FLAG_ACC);
|
|
|
|
+ setflag(FLAG_ACC_MISSED);
|
|
}
|
|
}
|
|
|
|
|
|
# Restore the RTP proxy flag if present
|
|
# Restore the RTP proxy flag if present
|