static void Main() { var response = new VoiceResponse(); var start = new Start(); var stream = new Stream(url: "wss://mystream.ngrok.io/example"); stream.Parameter(name: "FirstName", value: "Jane"); stream.Parameter(name: "LastName", value: "Doe"); start.Append(stream); response.Append(start); Console.WriteLine(response.ToString()); }
public IActionResult HandShake() { var response = new VoiceResponse(); var start = new Start(); var stream = new Stream(url: _projectSettings.TwilioMediaStreamWebhookUri, track: Stream.TrackEnum.BothTracks); start.Append(stream); response.Append(start); var say = new Say("Please record a new message."); response.Append(say); response.Pause(length: 60); // TODO: Dial outgoing number to replace Say above //var dial = new Dial(number: "+44"); //response.Append(dial); return(new Twilio.AspNet.Core.TwiMLResult(response.ToString())); }