FS-5772 --resolve this is sort of a hack but less painful than reporting bugs to polycom

This commit is contained in:
Anthony Minessale 2013-09-10 23:14:30 +05:00
parent a84610b3b0
commit 38cd508a12
3 changed files with 15 additions and 1 deletions

View File

@ -5396,11 +5396,14 @@ 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) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "BARGE: %s (cannot barge on myself)\n", (char *) data);

View File

@ -8782,6 +8782,17 @@ 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)) {
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 {

View File

@ -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";