Inheritance: ELement
Beispiel #1
0
        /// <summary>
        /// The Dial element starts an outgoing dial from the current call.
        /// </summary>
        /// <param name="number">Number to dial</param>
        /// <param name="action">URL where some parameters specific to <Dial> will be sent for further processing. The calling party can be redirected here upon the hangup of the B leg caller.</param>
        /// <param name="method">Method used to request the action URL.</param>
        /// <param name="timeout">The number of seconds calls made with <Dial> are allowed silence before ending.</param>
        /// <param name="hangupOnStar">Boolean value specifying if pressing * should end the dial.</param>
        /// <param name="timeLimit">The duration in seconds a call made through <Dial> should occur for before ending.</param>
        /// <param name="callerId">Number to display as calling. Defaults to the ID of phone being used.</param>
        /// <param name="hideCallerId">Boolean value specifying if the caller ID should be hidden or not.</param>
        /// <param name="dialMusic">URL containing an audio file that can be played during the dial.</param>
        /// <param name="callbackUrl">URL requested once the dialed call connects.</param>
        /// <param name="callbackMethod">Method used to request the callback URL.</param>
        /// <param name="confirmSound">Boolean value specifying if a sound should play when dial is successful.</param>
        /// <param name="digitsMatch">Specifies digits that TelAPI should listen for and send to the callbackUrl if a caller inputs them. Seperate additional digits or digit patterns with a comma.</param>
        /// <param name="straightToVm">Boolean value specifying if call should be redirected to voicemail imediately.</param>
        /// <param name="heartbeatUrl">A URL TelAPI can request every 60 seconds during the call to notify of elapsed time and pass other general information.</param>
        /// <param name="heartbeatMethod">Method used to request the heartbeat URL.</param>
        /// <param name="forwardedFrom">Specifies the number to list the call as forwarded from.</param>
        /// <returns></returns>
        public static Dial Create(string number, string action, HttpMethod? method, long? timeout, bool? hangupOnStar, long? timeLimit, string callerId, bool? hideCallerId, string dialMusic, string callbackUrl, HttpMethod? callbackMethod, bool? confirmSound, string digitsMatch, bool? straightToVm, string heartbeatUrl, HttpMethod? heartbeatMethod, string forwardedFrom)
        {
            Dial dial = new Dial();

            dial.Value = number;
            dial.Action = action;
            dial.Method = method == null ? null : method.ToString();
            dial.Timeout = timeout == null ? null : timeout.ToString();
            dial.HangupOnStar = hangupOnStar == null ? null : hangupOnStar.ToString();
            dial.TimeLimit = timeLimit == null ? null : timeLimit.ToString();
            dial.CallerId = callerId;
            dial.HideCallerId = hideCallerId == null ? null : hideCallerId.ToString();           
            dial.DialMusic = dialMusic;
            dial.CallbackUrl = callbackUrl;
            dial.CallbackMethod = callbackMethod == null ? null : callbackMethod.ToString();
            dial.ConfirmSound = confirmSound == null ? null : confirmSound.ToString();
            dial.DigitsMatch = digitsMatch;
            dial.StraightToVm = straightToVm == null ? null : straightToVm.ToString();
            dial.HeartbeatUrl = heartbeatUrl;
            dial.HeartbeatMethod = heartbeatMethod == null ? null : heartbeatMethod.ToString();
            dial.ForwardedFrom = forwardedFrom;

            return dial;
        }
Beispiel #2
0
        /// <summary>
        /// The Dial element starts an outgoing dial from the current call.
        /// </summary>
        /// <param name="number">Number to dial</param>
        /// <returns></returns>
        public static Dial Create(string number)
        {
            var dial = new Dial();
            dial.Value = number;

            return dial;
        }
Beispiel #3
0
 /// <summary>
 /// The Dial element starts an outgoing dial from the current call.
 /// </summary>
 /// <param name="dial">Dial element</param>
 /// <returns></returns>
 public Response Dial(Dial dial)
 {
     Elements.Add(dial);
     return this;
 }