]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] add call-id to log line to link with session uuid 1034/head
authorSeven Du <dujinfang@x-y-t.cn>
Tue, 19 Jan 2021 02:47:10 +0000 (10:47 +0800)
committerSeven Du <dujinfang@x-y-t.cn>
Tue, 19 Jan 2021 03:09:19 +0000 (11:09 +0800)
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index ce45548478ac1a1254999fe43180e11150643d9a..f580813657bbf7fd9396c2ad8f4e665f87dad767 100644 (file)
@@ -10278,8 +10278,8 @@ 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());
+       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_INFO, "%s receiving invite from %s:%d version: %s call-id: %s\n",
+                                         switch_channel_get_name(tech_pvt->channel), network_ip, network_port, switch_version_full_human(), sip->sip_call_id ? switch_str_nil(sip->sip_call_id->i_id) : "");
 
 
        if (sip->sip_via && sip->sip_via->v_protocol && switch_stristr("sip/2.0/ws", sip->sip_via->v_protocol)) {
index 27171890ddec1b8a43d656753873771e7c4d7d05..047af5e90249f8dd6941a6abcef3189239a5046b 100644 (file)
@@ -1615,6 +1615,9 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                tech_pvt->session_refresher = nua_no_refresher;
        }
 
+       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_INFO, "%s sending invite call-id: %s\n",
+                                         switch_channel_get_name(tech_pvt->channel), call_id);
+
        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->mparams.local_sdp_str ? tech_pvt->mparams.local_sdp_str : "NO SDP PRESENT\n");