From a3a795a08acc1f349a625062008991d669911203 Mon Sep 17 00:00:00 2001 From: Anthony Minessale <anthm@freeswitch.org> Date: Mon, 20 Jan 2014 23:34:46 +0500 Subject: [PATCH] add version to log --- src/mod/endpoints/mod_sofia/sofia.c | 4 ++++ src/mod/endpoints/mod_sofia/sofia_glue.c | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 267dc7ec74..9893366806 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -7831,6 +7831,10 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia sofia_glue_get_addr(de->data->e_msg, network_ip, sizeof(network_ip), &network_port); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "%s receiving invite from %s:%d version: %s\n", + switch_channel_get_name(tech_pvt->channel), network_ip, network_port, SWITCH_VERSION_FULL_HUMAN); + + if (sofia_test_pflag(profile, PFLAG_AGGRESSIVE_NAT_DETECTION)) { if (sip && sip->sip_via) { const char *port = sip->sip_via->v_port; diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index c97d35943a..b7446960fd 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -2735,10 +2735,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) tech_pvt->session_refresher = nua_no_refresher; } - if (tech_pvt->local_sdp_str) { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, - "Local SDP:\n%s\n", tech_pvt->local_sdp_str); - } + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "%s sending invite version: %s\nLocal SDP:\n%s\n", + switch_channel_get_name(tech_pvt->channel), SWITCH_VERSION_FULL_HUMAN, tech_pvt->local_sdp_str ? tech_pvt->local_sdp_str : "NO SDP PRESENT\n"); if (sofia_use_soa(tech_pvt)) {