]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add largest_jb_size
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 6 May 2011 20:25:00 +0000 (15:25 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 6 May 2011 20:25:00 +0000 (15:25 -0500)
src/include/switch_types.h
src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_rtp.c

index 988d2da64124d6f894259d78657ca6f2a98f672f..6664dc06535fa3cd9f93099584159a37b940ebec 100644 (file)
@@ -489,6 +489,7 @@ typedef struct {
        switch_size_t dtmf_packet_count;
        switch_size_t cng_packet_count;
        switch_size_t flush_packet_count;
+       switch_size_t largest_jb_size;
 } switch_rtp_numbers_t;
 
 
index 74da94b2c4dc85233b5d196c749f36c797c89f41..ab37ecd7f79df46a9e37ab79300965474cd05c57 100644 (file)
@@ -2554,6 +2554,7 @@ static void set_stats(switch_rtp_t *rtp_session, private_object_t *tech_pvt, con
                add_stat(stats->inbound.dtmf_packet_count, "in_dtmf_packet_count");
                add_stat(stats->inbound.cng_packet_count, "in_cng_packet_count");
                add_stat(stats->inbound.flush_packet_count, "in_flush_packet_count");
+               add_stat(stats->inbound.largest_jb_size, "in_largest_jb_size");
 
                add_stat(stats->outbound.raw_bytes, "out_raw_bytes");
                add_stat(stats->outbound.media_bytes, "out_media_bytes");
index 038401da198f7eaa4dcc7144977aa8c784dc9bb4..2eeb7bfdb9e70f324ab01a411e45f28031eec6e1 100644 (file)
@@ -4138,6 +4138,10 @@ SWITCH_DECLARE(switch_rtp_stats_t *) switch_rtp_get_stats(switch_rtp_t *rtp_sess
                s = &rtp_session->stats;
        }
 
+       if (rtp_session->jb) {
+               s->inbound.largest_jb_size = stfu_n_get_most_qlen(rtp_session->jb);
+       }
+
        return s;
 }