mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
add some device-state mechinism to FS to allow tracking of device-specific states where they may have more than one call from the same device
This commit is contained in:
@@ -5850,7 +5850,7 @@ SWITCH_STANDARD_APP(sofia_sla_function)
|
||||
{
|
||||
private_object_t *tech_pvt;
|
||||
switch_core_session_t *bargee_session;
|
||||
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
if (zstr(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: <uuid>\n");
|
||||
return;
|
||||
@@ -5860,8 +5860,7 @@ SWITCH_STANDARD_APP(sofia_sla_function)
|
||||
if (bargee_session == session) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "BARGE: %s (cannot barge on myself)\n", (char *) data);
|
||||
} else {
|
||||
switch_channel_t *channel;
|
||||
|
||||
|
||||
if (switch_core_session_check_interface(bargee_session, sofia_endpoint_interface)) {
|
||||
tech_pvt = switch_core_session_get_private(bargee_session);
|
||||
sofia_clear_flag(tech_pvt, TFLAG_SLA_BARGING);
|
||||
@@ -5874,13 +5873,13 @@ SWITCH_STANDARD_APP(sofia_sla_function)
|
||||
sofia_set_flag(tech_pvt, TFLAG_SLA_BARGING);
|
||||
}
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
switch_channel_set_variable(channel, "sip_barging_uuid", (char *)data);
|
||||
|
||||
}
|
||||
|
||||
switch_core_session_rwunlock(bargee_session);
|
||||
}
|
||||
|
||||
switch_channel_execute_on(channel, "execute_on_sip_barge");
|
||||
|
||||
switch_ivr_eavesdrop_session(session, data, NULL, ED_MUX_READ | ED_MUX_WRITE | ED_COPY_DISPLAY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user