Example #1
0
        /// <summary>
        /// Plays the given file and waits for the user to enter DTMF digits until he
        /// presses '#' or the timeout occurs or the maximum number of digits has
        /// been entered. The user may interrupt the streaming by starting to enter
        /// digits.
        /// </summary>
        /// <param name="file">the name of the file to play</param>
        /// <param name="timeout">the timeout in milliseconds to wait for user input.<br/>
        /// 0 means standard timeout value, -1 means "ludicrous time"
        /// (essentially never times out).</param>
        /// <param name="maxDigits">the maximum number of digits the user is allowed to enter</param>
        /// <returns> a String containing the DTMF the user entered</returns>
        protected internal string GetData(string file, long timeout, int maxDigits)
        {
            AGIChannel channel   = this.Channel;
            AGIReply   lastReply = channel.SendCommand(new Command.GetDataCommand(file, timeout, maxDigits));

            return(lastReply.GetResult());
        }
Example #2
0
        /// <summary>
        /// Plays the given file and waits for the user to enter DTMF digits until he
        /// presses '#'. The user may interrupt the streaming by starting to enter
        /// digits.
        /// </summary>
        /// <param name="file">the name of the file to play</param>
        /// <returns> a String containing the DTMF the user entered</returns>
        protected internal string GetData(string file)
        {
            AGIChannel channel   = this.Channel;
            AGIReply   lastReply = channel.SendCommand(new Command.GetDataCommand(file));

            return(lastReply.GetResult());
        }