Class that contains all possible Record options
Exemplo n.º 1
0
        public void Can_I_Generate_Record_With_Options()
        {
            var response = new Response();
            var options = new RecordOptions();

            options.FileFormat = RecordingFileFormat.wav;
            options.FinishOnKey = "*";
            options.Timeout = 10;

            response.Record(options);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Exemplo n.º 2
0
        /// <summary>
        /// The Record element is used to record audio during a call.
        /// </summary>
        /// <param name="recordOptions">Record options</param>
        /// <returns></returns>
        public Response Record(RecordOptions recordOptions)
        {
            Elements.Add(Element.Record.Create(recordOptions.Action,
                recordOptions.Method,
                recordOptions.Timeout,
                recordOptions.FinishOnKey,
                recordOptions.MaxLength,
                recordOptions.Transcribe,
                recordOptions.TranscribeCallback,
                recordOptions.PlayBeep,
                recordOptions.BothLegs,
                recordOptions.FileFormat
                ));

            return this;
        }