add param:confirm-blind-transfer var:confirm_blind_transfer that makes blind transfers keep the transferrer on the line until its confirmed that the call was completed or brings it back to the bridge. blind_transfer_ack app can be executed in the dp by the transferee to indicate sucess or fail or a sucessful bridge will automatically trigger a success

This commit is contained in:
Anthony Minessale committed 2012-05-08 08:50:41 -05:00
1 parent 2325dfbc4a
commit 07204a1fb5
7 files changed
+143 -20

No files matched your search

@@ -4462,6 +4462,34 @@ static char *file_string_supported_formats[SWITCH_MAX_CODECS] = { 0 };
/* /FILE STRING INTERFACE */
SWITCH_STANDARD_APP(blind_transfer_ack_function)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_bool_t val = 0;
if (data) {
val = switch_true((char *) val);
}
if (switch_channel_test_flag(channel, CF_CONFIRM_BLIND_TRANSFER)) {
switch_core_session_t *other_session;
const char *uuid = switch_channel_get_variable(channel, "blind_transfer_uuid");
switch_channel_clear_flag(channel, CF_CONFIRM_BLIND_TRANSFER);
if (!zstr(uuid) && (other_session = switch_core_session_locate(uuid))) {
switch_core_session_message_t msg = { 0 };
msg.message_id = SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE;
msg.from = __FILE__;
msg.numeric_arg = val;
switch_core_session_receive_message(other_session, &msg);
switch_core_session_rwunlock(other_session);
}
}
}
#define SPEAK_DESC "Speak text to a channel via the tts interface"
#define DISPLACE_DESC "Displace audio from a file to the channels input"
@@ -4541,6 +4569,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
SWITCH_ADD_API(api_interface, "strftime", "strftime", strftime_api_function, "<format_string>");
SWITCH_ADD_API(api_interface, "presence", "presence", presence_api_function, PRESENCE_USAGE);
SWITCH_ADD_APP(app_interface, "blind_transfer_ack", "", "", blind_transfer_ack_function, "[true|false]", SAF_NONE);
SWITCH_ADD_APP(app_interface, "bind_digit_action", "bind a key sequence or regex to an action",
"bind a key sequence or regex to an action", bind_digit_action_function, BIND_DIGIT_ACTION_USAGE, SAF_SUPPORT_NOMEDIA);