[sr-dev] git:master:b7075b10: modules/ims_charging: added extra stat replies received for CCRs

jaybeepee jason.penton at gmail.com
Tue Apr 14 09:30:22 CEST 2015


Module: kamailio
Branch: master
Commit: b7075b103d27b3fe2b2c02e27e826b7638951c30
URL: https://github.com/kamailio/kamailio/commit/b7075b103d27b3fe2b2c02e27e826b7638951c30

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2015-04-14T09:30:08+02:00

modules/ims_charging: added extra stat replies received for CCRs

---

Modified: modules/ims_charging/ims_charging_stats.c
Modified: modules/ims_charging/ims_charging_stats.h
Modified: modules/ims_charging/ims_ro.c

---

Diff:  https://github.com/kamailio/kamailio/commit/b7075b103d27b3fe2b2c02e27e826b7638951c30.diff
Patch: https://github.com/kamailio/kamailio/commit/b7075b103d27b3fe2b2c02e27e826b7638951c30.patch

---

diff --git a/modules/ims_charging/ims_charging_stats.c b/modules/ims_charging/ims_charging_stats.c
index c21ea61..d62b4fc 100644
--- a/modules/ims_charging/ims_charging_stats.c
+++ b/modules/ims_charging/ims_charging_stats.c
@@ -21,6 +21,7 @@ counter_def_t ims_charging_cnt_defs[] = {
     {&ims_charging_cnts_h.successful_final_ccrs,    "successful_final_ccrs",	0, 0, 0,			    "total number of successful final CCRs"},
     {&ims_charging_cnts_h.successful_initial_ccrs,  "successful_initial_ccrs",	0, 0, 0,			    "total number of successful initial CCRs"},
     {&ims_charging_cnts_h.successful_interim_ccrs,   "successful_interim_ccrs",	0, 0, 0,			    "total number of successful interim CCRs"},
+    {&ims_charging_cnts_h.ccr_replies_received,     "ccr_replies_received",     0, 0, 0,                            "total number of CCR replies received"},
     {0, 0, 0, 0, 0, 0}
 };
 
diff --git a/modules/ims_charging/ims_charging_stats.h b/modules/ims_charging/ims_charging_stats.h
index 0e345be..14a8280 100644
--- a/modules/ims_charging/ims_charging_stats.h
+++ b/modules/ims_charging/ims_charging_stats.h
@@ -26,6 +26,7 @@ struct ims_charging_counters_h {
     counter_handle_t successful_initial_ccrs;
     counter_handle_t successful_interim_ccrs;
     counter_handle_t active_ro_sessions;
+    counter_handle_t ccr_replies_received;
 };
 
 int ims_charging_init_counters();
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index eb35165..8078ad6 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -664,6 +664,7 @@ static void resume_on_interim_ccr(int is_timeout, void *param, AAAMessage *cca,
     }
 
     counter_add(ims_charging_cnts_h.ccr_response_time, elapsed_msecs);
+    counter_add(ims_charging_cnts_h.ccr_response_time, 1);
 
     if (!i_req) {
 	LM_ERR("This is so wrong: ro session is NULL\n");
@@ -884,6 +885,7 @@ static void resume_on_termination_ccr(int is_timeout, void *param, AAAMessage *c
 	goto error;
     }
 
+    counter_add(ims_charging_cnts_h.ccr_response_time, 1);
     counter_add(ims_charging_cnts_h.ccr_response_time, elapsed_msecs);
 
     if (!cca) {
@@ -1169,6 +1171,7 @@ static void resume_on_initial_ccr(int is_timeout, void *param, AAAMessage *cca,
 	goto error0;
     }
 
+    counter_add(ims_charging_cnts_h.ccr_response_time, 1);
     counter_add(ims_charging_cnts_h.ccr_response_time, elapsed_msecs);
 
     if (!cca) {




More information about the sr-dev mailing list