mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
display fixes and add 2 new cols to channels to store last sent display data
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user