diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 6aa805b90a..dde5b51fbe 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -678,6 +678,7 @@ typedef enum { SWITCH_MESSAGE_INDICATE_UUID_CHANGE, SWITCH_MESSAGE_INDICATE_SIMPLIFY, SWITCH_MESSAGE_INDICATE_DEBUG_AUDIO, + SWITCH_MESSAGE_INDICATE_PROXY_MEDIA, SWITCH_MESSAGE_INVALID } switch_core_session_message_types_t; diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 0f75303035..dc84006584 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1119,6 +1119,17 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi /* ones that do not need to lock sofia mutex */ switch (msg->message_id) { + case SWITCH_MESSAGE_INDICATE_PROXY_MEDIA: + { + if (switch_rtp_ready(tech_pvt->rtp_session)) { + if (msg->numeric_arg) { + switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA); + } else { + switch_rtp_clear_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA); + } + } + } + break; case SWITCH_MESSAGE_INDICATE_DEBUG_AUDIO: { if (switch_rtp_ready(tech_pvt->rtp_session) && !zstr(msg->string_array_arg[0]) && !zstr(msg->string_array_arg[1])) { diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 304ecc2a36..31adfd7143 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -547,6 +547,7 @@ static const char *message_names[] = { "UUID_CHANGE", "WARNING", "DEBUG_AUDIO", + "PROXY_MEDIA", "INVALID" };