From 474e3253cf41ed803ae38624df45098e6441b3fc Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 21 Jan 2010 18:03:54 +0000 Subject: [PATCH] add new message to indications git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16434 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_types.h | 1 + src/mod/endpoints/mod_sofia/mod_sofia.c | 11 +++++++++++ src/switch_core_session.c | 1 + 3 files changed, 13 insertions(+) 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" };