add ignore_display_updates variable to block display updates on that leg

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15218 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-10-23 22:04:34 +00:00
parent 700fa6815b
commit fb395e14db
3 changed files with 13 additions and 0 deletions

View File

@ -111,6 +111,7 @@ SWITCH_BEGIN_EXTERN_C
#define SWITCH_PATH_SEPARATOR "/"
#endif
#define SWITCH_URL_SEPARATOR "://"
#define SWITCH_IGNORE_DISPLAY_UPDATES_VARIABLE "ignore_display_updates"
#define SWITCH_AUDIO_SPOOL_PATH_VARIABLE "audio_spool_path"
#define SWITCH_BRIDGE_HANGUP_CAUSE_VARIABLE "bridge_hangup_cause"
#define SWITCH_READ_TERMINATOR_USED_VARIABLE "read_terminator_used"

View File

@ -430,6 +430,10 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
const char *val;
int fs = 0;
if (switch_true(switch_channel_get_variable(channel, SWITCH_IGNORE_DISPLAY_UPDATES_VARIABLE))) {
return;
}
if (sip->sip_to) {
number = sip->sip_to->a_url->url_user;
}

View File

@ -615,6 +615,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
switch_log_printf(SWITCH_CHANNEL_ID_LOG, message->_file, message->_func, message->_line,
switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "%s receive message [%s]\n",
switch_channel_get_name(session->channel), message_names[message->message_id]);
if (message->message_id == SWITCH_MESSAGE_INDICATE_DISPLAY &&
switch_true(switch_channel_get_variable(session->channel, SWITCH_IGNORE_DISPLAY_UPDATES_VARIABLE))) {
switch_log_printf(SWITCH_CHANNEL_ID_LOG, message->_file, message->_func, message->_line,
switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "Ignoring display update.\n");
return SWITCH_STATUS_SUCCESS;
}
if (session->endpoint_interface->io_routines->receive_message) {
status = session->endpoint_interface->io_routines->receive_message(session, message);