mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-14 15:24:13 +00:00
RTP stats were not being logged. There is no JIRA on this sigh
This commit is contained in:
1 parent
442a53ae3c
commit
7a42ec06df
7 files changed
+64
-57
No files matched your search
@@ -632,9 +632,6 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
*tech_pvt->sofia_private->uuid = '\0';
|
||||
}
|
||||
|
||||
|
||||
sofia_glue_set_rtp_stats(tech_pvt);
|
||||
|
||||
switch_mutex_unlock(tech_pvt->sofia_mutex);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
@@ -1065,7 +1065,6 @@ switch_status_t list_profiles_full(const char *line, const char *cursor, switch_
|
||||
switch_status_t list_profiles(const char *line, const char *cursor, switch_console_callback_match_t **matches);
|
||||
|
||||
sofia_cid_type_t sofia_cid_name2type(const char *name);
|
||||
void sofia_glue_set_rtp_stats(private_object_t *tech_pvt);
|
||||
void sofia_glue_get_addr(msg_t *msg, char *buf, size_t buflen, int *port);
|
||||
sofia_destination_t *sofia_glue_get_destination(char *data);
|
||||
void sofia_glue_free_destination(sofia_destination_t *dst);
|
||||
|
||||
@@ -1339,52 +1339,6 @@ void sofia_glue_do_xfer_invite(switch_core_session_t *session)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define add_stat(_i, _s) \
|
||||
switch_snprintf(var_name, sizeof(var_name), "rtp_%s_%s", switch_str_nil(prefix), _s) ; \
|
||||
switch_snprintf(var_val, sizeof(var_val), "%" SWITCH_SIZE_T_FMT, _i); \
|
||||
switch_channel_set_variable(channel, var_name, var_val)
|
||||
|
||||
static void set_stats(switch_core_session_t *session, switch_media_type_t type, const char *prefix)
|
||||
{
|
||||
switch_rtp_stats_t *stats = switch_core_media_get_stats(session, type, NULL);
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
|
||||
char var_name[256] = "", var_val[35] = "";
|
||||
|
||||
if (stats) {
|
||||
|
||||
add_stat(stats->inbound.raw_bytes, "in_raw_bytes");
|
||||
add_stat(stats->inbound.media_bytes, "in_media_bytes");
|
||||
add_stat(stats->inbound.packet_count, "in_packet_count");
|
||||
add_stat(stats->inbound.media_packet_count, "in_media_packet_count");
|
||||
add_stat(stats->inbound.skip_packet_count, "in_skip_packet_count");
|
||||
add_stat(stats->inbound.jb_packet_count, "in_jb_packet_count");
|
||||
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");
|
||||
add_stat(stats->outbound.packet_count, "out_packet_count");
|
||||
add_stat(stats->outbound.media_packet_count, "out_media_packet_count");
|
||||
add_stat(stats->outbound.skip_packet_count, "out_skip_packet_count");
|
||||
add_stat(stats->outbound.dtmf_packet_count, "out_dtmf_packet_count");
|
||||
add_stat(stats->outbound.cng_packet_count, "out_cng_packet_count");
|
||||
|
||||
add_stat(stats->rtcp.packet_count, "rtcp_packet_count");
|
||||
add_stat(stats->rtcp.octet_count, "rtcp_octet_count");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void sofia_glue_set_rtp_stats(private_object_t *tech_pvt)
|
||||
{
|
||||
set_stats(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, "audio");
|
||||
set_stats(tech_pvt->session, SWITCH_MEDIA_TYPE_VIDEO, "video");
|
||||
}
|
||||
|
||||
/* map sip responses to QSIG cause codes ala RFC4497 section 8.4.4 */
|
||||
switch_call_cause_t sofia_glue_sip_cause_to_freeswitch(int status)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user