From c20fa5e8f7cef34086c26ef6e0bbd81b2be7df4b Mon Sep 17 00:00:00 2001 From: romana Date: Wed, 30 Nov 2016 17:04:44 -0500 Subject: [PATCH] FS-9734: updated keys to be set in memory on att_xfer execution --- .../applications/mod_dptools/mod_dptools.c | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 383901a5ef..b7f461c409 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -2520,30 +2520,6 @@ void *SWITCH_THREAD_FUNC att_thread_run(switch_thread_t *thread, void *obj) return NULL; } - if (!(attxfer_cancel_key = switch_channel_get_variable(channel, "attxfer_cancel_key"))) { - if (!(attxfer_cancel_key = switch_channel_get_variable_partner(channel, "attxfer_cancel_key"))) { - attxfer_cancel_key = "#"; - } - } - - if (!(attxfer_hangup_key = switch_channel_get_variable(channel, "attxfer_hangup_key"))) { - if (!(attxfer_hangup_key = switch_channel_get_variable_partner(channel, "attxfer_hangup_key"))) { - attxfer_hangup_key = "*"; - } - } - - if (!(attxfer_conf_key = switch_channel_get_variable(channel, "attxfer_conf_key"))) { - if (!(attxfer_conf_key = switch_channel_get_variable_partner(channel, "attxfer_conf_key"))) { - attxfer_conf_key = "0"; - } - } - - keys = switch_core_session_alloc(session, sizeof(*keys)); - keys->attxfer_cancel_key = switch_core_session_strdup(session, attxfer_cancel_key); - keys->attxfer_hangup_key = switch_core_session_strdup(session, attxfer_hangup_key); - keys->attxfer_conf_key = switch_core_session_strdup(session, attxfer_conf_key); - switch_channel_set_private(channel, "__keys", keys); - bond = switch_channel_get_partner_uuid(channel); switch_channel_set_variable(channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE, bond); switch_core_event_hook_add_state_change(session, tmp_hanguphook); @@ -2563,6 +2539,30 @@ void *SWITCH_THREAD_FUNC att_thread_run(switch_thread_t *thread, void *obj) switch_channel_set_flag(peer_channel, CF_INNER_BRIDGE); switch_channel_set_flag(channel, CF_INNER_BRIDGE); + if (!(attxfer_cancel_key = switch_channel_get_variable(channel, "attxfer_cancel_key"))) { + if (!(attxfer_cancel_key = switch_channel_get_variable(peer_channel, "attxfer_cancel_key"))) { + attxfer_cancel_key = "#"; + } + } + + if (!(attxfer_hangup_key = switch_channel_get_variable(channel, "attxfer_hangup_key"))) { + if (!(attxfer_hangup_key = switch_channel_get_variable(peer_channel, "attxfer_hangup_key"))) { + attxfer_hangup_key = "*"; + } + } + + if (!(attxfer_conf_key = switch_channel_get_variable(channel, "attxfer_conf_key"))) { + if (!(attxfer_conf_key = switch_channel_get_variable(peer_channel, "attxfer_conf_key"))) { + attxfer_conf_key = "0"; + } + } + + keys = switch_core_session_alloc(session, sizeof(*keys)); + keys->attxfer_cancel_key = switch_core_session_strdup(session, attxfer_cancel_key); + keys->attxfer_hangup_key = switch_core_session_strdup(session, attxfer_hangup_key); + keys->attxfer_conf_key = switch_core_session_strdup(session, attxfer_conf_key); + switch_channel_set_private(channel, "__keys", keys); + switch_ivr_multi_threaded_bridge(session, peer_session, xfer_on_dtmf, peer_session, NULL); switch_channel_clear_flag(peer_channel, CF_INNER_BRIDGE);