Ejemplo n.º 1
0
        private static void ConvertTransfer(global::VoiceModel.Transfer model, ref Tropo tmodel)
        {
            List <string> toList = new List <string>();

            toList.Add(model.destination);

            TropoCSharp.Tropo.Transfer xfer = new TropoCSharp.Tropo.Transfer()
            {
                To   = toList,
                From = model.from
            };
            tmodel.Transfer(xfer);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Overload for Transfer that allows a Transfer object to be passed directly.
 /// </summary>
 /// <param name="transfer">A Transfer object.</param>
 public void Transfer(Transfer transfer)
 {
     Transfer(transfer.AnswerOnMedia, transfer.Choices, transfer.From, transfer.On, transfer.Timeout, transfer.To);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Overload for Transfer that allows events to be set via allowSignals.
        /// </summary>
        /// <param name="answerOnMedia"></param>
        /// <param name="allowSignals">Allows for the assignment of an interruptable signal for this Tropo function</param>
        /// <param name="choices"></param>
        /// <param name="from"></param>
        /// <param name="on"></param>
        /// <param name="timeout"></param>
        /// <param name="to"></param>
        public void Transfer(bool? answerOnMedia, Array allowSignals, Choices choices, string from, On on, float? timeout, IEnumerable<String> to)
        {
            Transfer transfer = new Transfer();
            transfer.AnswerOnMedia = answerOnMedia;
            transfer.allowSignals = allowSignals;
            transfer.Choices = choices;
            transfer.From = from;
            transfer.On = on;
            transfer.Timeout = timeout;
            transfer.To = to;

            Serialize(transfer, "transfer");
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Overload for Transfer that allows a Transfer object to be passed directly.
 /// </summary>
 /// <param name="transfer">A Transfer object.</param>
 public void transfer(Transfer transfer)
 {
     this.transfer(transfer.answerOnMedia, transfer.choices, transfer.from, transfer.on, transfer.ringRepeat, transfer.timeout, transfer.to);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Transfers an already answered call to another destination / phone number.
        /// Call may be transferred to another phone number or SIP address, which is set through the "to" parameter and is in URL format.
        /// </summary>
        /// <param name="answerOnMedia">If this is set to true, the call will be considered "answered" and audio will begin playing as soon as media is received from the far end.</param>
        /// <param name="choices">The grammar to use in recognizing and validating input.</param>
        /// <param name="from">An Endpoint object representing who the call is from.</param>
        /// <param name="on">An On object.</param>
        /// <param name="ringRepeat">The number of rings to allow on the outbound call attempt.</param>
        /// <param name="timeout">The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.</param>
        /// <param name="to">The new destination for the incoming call as a URL.</param>
        public void transfer(bool? answerOnMedia, Choices choices, Endpoint from, On on, int? ringRepeat, float? timeout, ArrayList to)
        {
            Transfer transfer = new Transfer();
            transfer.answerOnMedia = answerOnMedia;
            transfer.choices = choices;
            transfer.from = from;
            transfer.on = on;
            transfer.ringRepeat = ringRepeat;
            transfer.timeout = timeout;
            transfer.to = to;

            serialize(transfer, "transfer");
        }