lib/punchblock/translator/freeswitch/component/record.rb in punchblock-1.7.1 vs lib/punchblock/translator/freeswitch/component/record.rb in punchblock-1.8.0

- old
+ new

@@ -27,9 +27,17 @@ component.finished end record_args = ['start', filename] record_args << max_duration/1000 unless max_duration == -1 + case @component_node.direction + when :send + call.uuid_foo :setvar, "RECORD_WRITE_ONLY true" + when :recv + call.uuid_foo :setvar, "RECORD_READ_ONLY true" + else + call.uuid_foo :setvar, "RECORD_STEREO true" + end call.uuid_foo :record, record_args.join(' ') send_ref rescue OptionError => e with_error 'option error', e.message