FS-5772 --resolve this is sort of a hack but less painful than reporting bugs to polycom
Conflicts: src/mod/endpoints/mod_sofia/sofia.c
This commit is contained in:
parent
4c5be954f2
commit
f5ba0bb7d4
|
@ -5904,10 +5904,13 @@ 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;
|
||||
}
|
||||
|
||||
switch_channel_answer(channel);
|
||||
|
||||
if ((bargee_session = switch_core_session_locate((char *)data))) {
|
||||
if (bargee_session == session) {
|
||||
|
|
|
@ -8696,7 +8696,18 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
|||
}
|
||||
|
||||
if (!zstr(bridge_uuid) && switch_channel_test_flag(b_channel, CF_LEG_HOLDING)) {
|
||||
tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool,
|
||||
const char *b_call_id = switch_channel_get_variable(b_channel, "sip_call_id");
|
||||
|
||||
if (b_call_id) {
|
||||
char *sql = switch_mprintf("update sip_dialogs set call_info_state='idle' where call_id='%q'", b_call_id);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "SQL: %s\n", sql);
|
||||
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
|
||||
|
||||
switch_channel_presence(b_channel, "unknown", "idle", NULL);
|
||||
|
||||
}
|
||||
|
||||
tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool,
|
||||
"%sanswer,intercept:%s", codec_str, bridge_uuid);
|
||||
} else {
|
||||
switch_caller_profile_t *bcp = switch_channel_get_caller_profile(b_channel);
|
||||
|
|
|
@ -730,7 +730,7 @@ SWITCH_DECLARE(void) switch_channel_perform_presence(switch_channel_t *channel,
|
|||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
|
||||
|
||||
|
||||
if (!switch_channel_up_nosig(channel)) {
|
||||
if (!strcasecmp(status, "idle") || !switch_channel_up_nosig(channel)) {
|
||||
call_info_state = "idle";
|
||||
} else if (!strcasecmp(status, "hold-private")) {
|
||||
call_info_state = "held-private";
|
||||
|
|
Loading…
Reference in New Issue