diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index a370b52442..874e012a74 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -11171,7 +11171,9 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia for (mp = sip->sip_multipart; mp; mp = mp->mp_next) { if (mp->mp_payload && mp->mp_payload->pl_data && mp->mp_content_type && mp->mp_content_type->c_type) { - char *val = switch_core_session_sprintf(session, "%s:%s", mp->mp_content_type->c_type, mp->mp_payload->pl_data); + char *val; + if (mp->mp_content_id) val = switch_core_session_sprintf(session, "%s:~Content-ID: %s\r\n\r\n%s", mp->mp_content_type->c_type, mp->mp_content_id->g_string, mp->mp_payload->pl_data); + else val = switch_core_session_sprintf(session, "%s:%s", mp->mp_content_type->c_type, mp->mp_payload->pl_data); switch_channel_add_variable_var_check(channel, "sip_multipart", val, SWITCH_FALSE, SWITCH_STACK_PUSH); } }