add vars: flip_record_on_hold to make the recording flip to the other leg on hold, record_check_bridge to make recording the same file on the opposite leg of a bridge considered a duplicate attempt and record_toggle_on_repeat to make repeat recording the same file toggle the recording off

This commit is contained in:
Anthony Minessale authored and Brian West committed 2011-05-31 22:22:18 -05:00
1 parent 3ef2692fb8
commit 7bbbb9ccc5
5 files changed
+73 -7

No files matched your search

+13 -1
View File
@@ -635,7 +635,7 @@ SWITCH_DECLARE(void) switch_channel_mark_hold(switch_channel_t *channel, switch_
switch_event_t *event;
if (!!on == !!switch_channel_test_flag(channel, CF_LEG_HOLDING)) {
return;
goto end;
}
if (on) {
@@ -649,6 +649,18 @@ SWITCH_DECLARE(void) switch_channel_mark_hold(switch_channel_t *channel, switch_
switch_event_fire(&event);
}
end:
if (on) {
if (switch_true(switch_channel_get_variable(channel, "flip_record_on_hold"))) {
switch_core_session_t *other_session;
if (switch_core_session_get_partner(channel->session, &other_session) == SWITCH_STATUS_SUCCESS) {
switch_core_media_bug_transfer_recordings(channel->session, other_session);
switch_core_session_rwunlock(other_session);
}
}
}
}
SWITCH_DECLARE(const char *) switch_channel_get_hold_music(switch_channel_t *channel)