]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add RECORD_READ_ONLY and RECORD_WRITE_ONLY chan vars to influence session_record
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 27 Oct 2009 22:04:44 +0000 (22:04 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 27 Oct 2009 22:04:44 +0000 (22:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15257 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_async.c

index 945ec06a5f69ab61de171998dc6e238fc75df88c..5905b1ad547b7bb80637aef3ddc85b72e19f306e 100644 (file)
@@ -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;