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

+19
View File
@@ -640,6 +640,7 @@ static const char *message_names[] = {
"SIGNAL_DATA",
"INFO",
"AUDIO_DATA",
"BLIND_TRANSFER_RESPONSE",
"INVALID"
};
@@ -722,6 +723,24 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
break;
}
}
if (message->message_id == SWITCH_MESSAGE_INDICATE_BRIDGE &&
switch_channel_test_flag(session->channel, CF_CONFIRM_BLIND_TRANSFER)) {
switch_core_session_t *other_session;
const char *uuid = switch_channel_get_variable(session->channel, "blind_transfer_uuid");
switch_channel_clear_flag(session->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 = 1;
switch_core_session_receive_message(other_session, &msg);
switch_core_session_rwunlock(other_session);
}
}
}