From 69a5b300610e5a87dd0eb58c5bbbfad671260c96 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 14 Mar 2011 11:43:42 -0500 Subject: [PATCH] FS-3150 --comment-only this looks like an unhandled parse error, try this patch, though the call will likely fail but we can see what it doesn't like about the sdp now --- src/mod/endpoints/mod_sofia/sofia.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index d612e30f0b..d657fdd410 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4422,10 +4422,15 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status } switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Passing %d %s to other leg\n", status, phrase); - - if (status == 200 && sofia_test_flag(tech_pvt, TFLAG_T38_PASSTHRU) && has_t38) { - if (sip->sip_payload && sip->sip_payload->pl_data) { - switch_t38_options_t *t38_options = sofia_glue_extract_t38_options(session, sip->sip_payload->pl_data); + + if (status == 200 && sofia_test_flag(tech_pvt, TFLAG_T38_PASSTHRU) && has_t38 && sip->sip_payload && sip->sip_payload->pl_data) { + switch_t38_options_t *t38_options = sofia_glue_extract_t38_options(session, sip->sip_payload->pl_data); + + if (!t38_options) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_WARNING, "%s Error parsing SDP:\n%s\n", + switch_channel_get_name(tech_pvt->channel), sip->sip_payload->pl_data); + goto end; + } else { char *remote_host = switch_rtp_get_remote_host(tech_pvt->rtp_session); switch_port_t remote_port = switch_rtp_get_remote_port(tech_pvt->rtp_session); char tmp[32] = "";