[sr-dev] git:master:bb2fcf8e: modules/ims_qos: added additional stat for total number of rx media sessions

Richard Good richard.good at smilecoms.com
Wed Sep 21 09:57:50 CEST 2016


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

Author: Richard Good <richard.good at smilecoms.com>
Committer: Richard Good <richard.good at smilecoms.com>
Date: 2016-09-21T09:57:09+02:00

modules/ims_qos: added additional stat for total number of rx media sessions

---

Modified: modules/ims_qos/ims_qos_stats.c
Modified: modules/ims_qos/ims_qos_stats.h
Modified: modules/ims_qos/rx_aar.c

---

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

---

diff --git a/modules/ims_qos/ims_qos_stats.c b/modules/ims_qos/ims_qos_stats.c
index 280603d..fcff132 100644
--- a/modules/ims_qos/ims_qos_stats.c
+++ b/modules/ims_qos/ims_qos_stats.c
@@ -69,6 +69,7 @@ counter_def_t ims_qos_cnt_defs[] = {
     {&ims_qos_cnts_h.registration_aar_replies_received,	    "registration_aar_replies_received",	0, 0, 0,            "total number of registration AAR replies received"},
 
     {&ims_qos_cnts_h.active_media_rx_sessions,		    "active_media_rx_sessions",		0, 0, 0,		    "number of currently active media Rx sessions"},
+	{&ims_qos_cnts_h.media_rx_sessions,		    "media_rx_sessions",		0, 0, 0,		    "Total number of media Rx sessions"},
     {&ims_qos_cnts_h.media_aar_avg_response_time,	    "media_aar_avg_response_time",	0, ims_qos_internal_stats, (void*) (long) IMS_QOS_MEDIA_AAR_AVG_RSP,	"avg response time for media AARs"},
     {&ims_qos_cnts_h.media_aar_timeouts,		    "media_aar_timeouts",		0, 0, 0,		    "total number of media AAR timeouts"},
     {&ims_qos_cnts_h.failed_media_aars,			    "failed_media_aars",		0, 0, 0,		    "total number of failed media AARs"},
diff --git a/modules/ims_qos/ims_qos_stats.h b/modules/ims_qos/ims_qos_stats.h
index 20d3a8c..41edb9d 100644
--- a/modules/ims_qos/ims_qos_stats.h
+++ b/modules/ims_qos/ims_qos_stats.h
@@ -26,6 +26,7 @@ struct ims_qos_counters_h {
     counter_handle_t media_aars;
     counter_handle_t successful_media_aars;
     counter_handle_t active_media_rx_sessions;
+    counter_handle_t media_rx_sessions;
     counter_handle_t media_aar_replies_received;
     counter_handle_t registration_aar_replies_received;
 };
diff --git a/modules/ims_qos/rx_aar.c b/modules/ims_qos/rx_aar.c
index 2a39d2d..8ba6f4e 100644
--- a/modules/ims_qos/rx_aar.c
+++ b/modules/ims_qos/rx_aar.c
@@ -167,6 +167,7 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
             }
             p_session_data->session_has_been_opened = 1;
             counter_inc(ims_qos_cnts_h.active_media_rx_sessions);
+			counter_inc(ims_qos_cnts_h.media_rx_sessions);
 
             if (auth) cdpb.AAASessionsUnlock(auth->hash);
 




More information about the sr-dev mailing list