From e185cac3cb62962b40f8e6725aafb4cff1509e02 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Mon, 21 Feb 2022 13:40:01 +0100 Subject: [PATCH] sip: Debug print remote SDP and codec to be used Fixes #415 --- plugins/sip/calls-sip-call.c | 2 ++ plugins/sip/calls-sip-origin.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/sip/calls-sip-call.c b/plugins/sip/calls-sip-call.c index c75e392..8bcd574 100644 --- a/plugins/sip/calls-sip-call.c +++ b/plugins/sip/calls-sip-call.c @@ -90,6 +90,8 @@ try_setting_up_media_pipeline (CallsSipCall *self) if (self->pipeline == NULL) { MediaCodecInfo *codec = (MediaCodecInfo *) self->codecs->data; + + g_debug ("Creating new pipeline using codec: %s", codec->name); self->pipeline = calls_sip_media_pipeline_new (codec); } diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c index 6906295..5aa5b8b 100644 --- a/plugins/sip/calls-sip-origin.c +++ b/plugins/sip/calls-sip-origin.c @@ -503,6 +503,7 @@ sip_i_state (int status, { const sdp_session_t *r_sdp = NULL; const sdp_session_t *l_sdp = NULL; + const char *r_sdp_str = NULL; gint call_state = nua_callstate_init; CallsCallState state; CallsSipCall *call; @@ -525,6 +526,7 @@ sip_i_state (int status, tl_gets (tags, SOATAG_LOCAL_SDP_REF (l_sdp), SOATAG_REMOTE_SDP_REF (r_sdp), + SOATAG_REMOTE_SDP_STR_REF (r_sdp_str), NUTAG_CALLSTATE_REF (call_state), NUTAG_OFFER_SENT_REF (offer_sent), NUTAG_OFFER_RECV_REF (offer_recv), @@ -545,8 +547,10 @@ sip_i_state (int status, const char *session_ip = NULL; const char *media_ip = NULL; + g_debug ("Remote SDP was set to:\n%s", r_sdp_str); + if (!codecs) { - g_warning ("No common codecs in SDP. Hanging up"); + g_warning ("No common codecs in SDP. Hanging up. Remote SDP:\n%s", r_sdp_str); calls_call_hang_up (CALLS_CALL (call)); return; }