SMBF_WRITE_REPLACE - Replace the Write Stream
SMBF_READ_REPLACE - Replace the Read Stream
SMBF_STEREO - Record in stereo
-SMBF_ANSWER_RECORD_REQ - Don't record until the channel is answered
+SMBF_ANSWER_REQ - Don't record until the channel is answered
+SMBF_BRIDGE_REQ - Don't record until the channel is bridged
SMBF_THREAD_LOCK - Only let the same thread who created the bug remove it.
SMBF_PRUNE -
SMBF_NO_PAUSE -
SMBF_READ_PING = (1 << 4),
SMBF_STEREO = (1 << 5),
SMBF_ANSWER_REQ = (1 << 6),
- SMBF_THREAD_LOCK = (1 << 7),
- SMBF_PRUNE = (1 << 8),
- SMBF_NO_PAUSE = (1 << 9),
- SMBF_STEREO_SWAP = (1 << 10),
- SMBF_LOCK = (1 << 11),
- SMBF_TAP_NATIVE_READ = (1 << 12),
- SMBF_TAP_NATIVE_WRITE = (1 << 13)
+ SMBF_BRIDGE_REQ = (1 << 7),
+ SMBF_THREAD_LOCK = (1 << 8),
+ SMBF_PRUNE = (1 << 9),
+ SMBF_NO_PAUSE = (1 << 10),
+ SMBF_STEREO_SWAP = (1 << 11),
+ SMBF_LOCK = (1 << 12),
+ SMBF_TAP_NATIVE_READ = (1 << 13),
+ SMBF_TAP_NATIVE_WRITE = (1 << 14)
} switch_media_bug_flag_enum_t;
typedef uint32_t switch_media_bug_flag_t;
if (!switch_channel_test_flag(session->channel, CF_ANSWERED) && switch_core_media_bug_test_flag(bp, SMBF_ANSWER_REQ)) {
continue;
}
+
+ if (!switch_channel_test_flag(session->channel, CF_BRIDGED) && switch_core_media_bug_test_flag(bp, SMBF_BRIDGE_REQ)) {
+ continue;
+ }
+
if (switch_test_flag(bp, SMBF_PRUNE)) {
prune++;
continue;
if (!switch_channel_test_flag(session->channel, CF_ANSWERED) && switch_core_media_bug_test_flag(bp, SMBF_ANSWER_REQ)) {
continue;
}
+
+ if (!switch_channel_test_flag(session->channel, CF_BRIDGED) && switch_core_media_bug_test_flag(bp, SMBF_BRIDGE_REQ)) {
+ continue;
+ }
+
if (switch_test_flag(bp, SMBF_PRUNE)) {
prune++;
continue;
continue;
}
+ if (!switch_channel_test_flag(session->channel, CF_BRIDGED) && switch_core_media_bug_test_flag(bp, SMBF_BRIDGE_REQ)) {
+ continue;
+ }
+
if (switch_test_flag(bp, SMBF_PRUNE)) {
prune++;
continue;
flags |= SMBF_ANSWER_REQ;
}
+ if ((p = switch_channel_get_variable(channel, "RECORD_BRIDGE_REQ")) && switch_true(p)) {
+ flags |= SMBF_BRIDGE_REQ;
+ }
+
if ((p = switch_channel_get_variable(channel, "RECORD_APPEND")) && switch_true(p)) {
file_flags |= SWITCH_FILE_WRITE_APPEND;
}