]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
adding total number of fax call recv statistics counter
authorKapil Gupta <kgupta@sangoma.com>
Tue, 11 Sep 2012 13:35:17 +0000 (09:35 -0400)
committerKapil Gupta <kgupta@sangoma.com>
Tue, 11 Sep 2012 13:35:17 +0000 (09:35 -0400)
src/mod/endpoints/mod_media_gateway/media_gateway_cli.c
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
src/mod/endpoints/mod_media_gateway/mod_media_gateway.h

index eb7356eccd3ebe6f4fabc4bd2b055eec79bf2ed0..5834931b49526d128f11069690412fac7ce17ee1 100644 (file)
@@ -984,14 +984,15 @@ switch_status_t handle_show_stats(switch_stream_handle_t *stream, megaco_profile
                return SWITCH_STATUS_FALSE;
        }
 
-       stream->write_function(stream, "Total Number of IN-Service Service change sent  = %d \n", 
-                       mg_profile->mg_stats->total_num_of_term_in_service_change_sent); 
-       stream->write_function(stream, "Total Number of Out-Of-Service Service change sent  = %d \n", 
-                       mg_profile->mg_stats->total_num_of_term_oos_service_change_sent); 
        stream->write_function(stream, "Total Number of Physical ADD received  = %d \n", mg_profile->mg_stats->total_num_of_phy_add_recvd); 
        stream->write_function(stream, "Total Number of RTP      ADD received  = %d \n", mg_profile->mg_stats->total_num_of_rtp_add_recvd); 
        stream->write_function(stream, "Total Number of SUB received  = %d \n", mg_profile->mg_stats->total_num_of_sub_recvd); 
        stream->write_function(stream, "Total Number of CALL received  = %d \n", mg_profile->mg_stats->total_num_of_call_recvd); 
+       stream->write_function(stream, "Total Number of T38-FAX CALL received  = %d \n", mg_profile->mg_stats->total_num_of_fax_call_recvd++); 
+       stream->write_function(stream, "Total Number of IN-Service Service change sent  = %d \n", 
+                       mg_profile->mg_stats->total_num_of_term_in_service_change_sent); 
+       stream->write_function(stream, "Total Number of Out-Of-Service Service change sent  = %d \n", 
+                       mg_profile->mg_stats->total_num_of_term_oos_service_change_sent); 
        stream->write_function(stream, "Total Number of ADD failed  = %d \n", mg_profile->mg_stats->total_num_of_add_failed); 
        stream->write_function(stream, "Total Number of Term Already in context Error  = %d \n", 
                        mg_profile->mg_stats->total_num_of_term_already_in_ctxt_error); 
index 5a6b4d8936b4721130cd4ba359ee21bbcef395ef..7b0533269d3ca7ac0d40ea328347f0f6294cc29a 100644 (file)
@@ -760,6 +760,9 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
 
        mg_apply_tdm_dtmf_removal(term, mg_ctxt);
 
+       if((MG_TERM_RTP == term->type) && (term->u.rtp.t38_options))
+               mg_profile->mg_stats->total_num_of_fax_call_recvd++;
+
        mg_apply_tdm_ec(term, mg_ctxt);
 
        mg_print_t38_attributes(term);
index 1c09fdc517d16e0d9040d7a350e5fa54f6d27e35..0b70920baae335424324416de8356a97847ad854 100644 (file)
@@ -68,6 +68,7 @@ typedef struct mg_stats_s{
        uint32_t  total_num_of_rtp_add_recvd;
        uint32_t  total_num_of_sub_recvd;
        uint32_t  total_num_of_call_recvd;
+       uint32_t  total_num_of_fax_call_recvd;
        uint32_t  total_num_of_add_failed;
        uint32_t  total_num_of_term_already_in_ctxt_error;
        uint32_t  total_num_of_choose_ctxt_failed_error;