display fixes and add 2 new cols to channels to store last sent display data

This commit is contained in:
Anthony Minessale
2011-08-03 23:43:41 -05:00
parent 3b2203b71b
commit d364e9f2b8
5 changed files with 70 additions and 17 deletions
@@ -1570,6 +1570,8 @@ static switch_status_t t38_gateway_on_consume_media(switch_core_session_t *sessi
switch_core_session_receive_message(session, &msg);
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_BRIDGE) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridge-A-Unique-ID", switch_core_session_get_uuid(session));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridge-B-Unique-ID", peer_uuid);
switch_channel_event_set_data(channel, event);
switch_event_fire(&event);
}
+11 -3
View File
@@ -2013,13 +2013,21 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
tech_pvt->last_sent_callee_id_name = switch_core_session_strdup(tech_pvt->session, name);
tech_pvt->last_sent_callee_id_number = switch_core_session_strdup(tech_pvt->session, number);
switch_channel_set_variable(channel, "last_sent_callee_id_name", name);
switch_channel_set_variable(channel, "last_sent_callee_id_number", number);
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "SEND");
switch_channel_set_profile_var(channel, "callee_id_name", name);
switch_channel_set_profile_var(channel, "callee_id_number", number);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Sent-Callee-ID-Name", name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Sent-Callee-ID-Number", number);
//switch_channel_set_profile_var(channel, "callee_id_name", name);
//switch_channel_set_profile_var(channel, "callee_id_number", number);
if (uuid) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
}
+8 -9
View File
@@ -952,8 +952,9 @@ static void our_sofia_event_callback(nua_event_t event,
}
}
case nua_r_ack:
if (channel)
if (channel) {
switch_channel_set_flag(channel, CF_MEDIA_ACK);
}
break;
case nua_r_shutdown:
if (status >= 200) {
@@ -4968,6 +4969,12 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
sofia_clear_flag(tech_pvt, TFLAG_RECOVERING);
}
if ((status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
const char *val;
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
nua_notify(nh, NUTAG_NEWSUB(1), NUTAG_SUBSTATE(nua_substate_active), SIPTAG_EVENT_STR("talk"), TAG_END());
}
}
}
end:
@@ -5158,14 +5165,6 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
status = 183;
}
if (channel && (status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
const char *val;
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
nua_notify(nh, NUTAG_NEWSUB(1), NUTAG_SUBSTATE(nua_substate_active), SIPTAG_EVENT_STR("talk"), TAG_END());
}
}
state_process: