From 52e940ff26eee95aca4d85d3d57aa688296917fd Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 27 Oct 2009 22:04:44 +0000 Subject: [PATCH] add RECORD_READ_ONLY and RECORD_WRITE_ONLY chan vars to influence session_record git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15257 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_async.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 945ec06a5f..5905b1ad54 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -902,6 +902,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t } } + if ((p = switch_channel_get_variable(channel, "RECORD_WRITE_ONLY")) && switch_true(p)) { + flags &= ~SMBF_READ_STREAM; + flags |= SMBF_WRITE_STREAM; + } + + if ((p = switch_channel_get_variable(channel, "RECORD_READ_ONLY")) && switch_true(p)) { + flags &= ~SMBF_WRITE_STREAM; + flags |= SMBF_READ_STREAM; + } + if ((p = switch_channel_get_variable(channel, "RECORD_STEREO")) && switch_true(p)) { flags |= SMBF_STEREO; channels = 2;