static void Main() { var response = new VoiceResponse(); var dial = new Dial(); var sip = new Sip(new Uri("http://example.com"), "jack"); dial.Append(sip); response.Append(dial); Console.WriteLine(response.ToString());; }
static void Main() { var response = new VoiceResponse(); var dial = new Dial(); var client = new Client(); client.Identity("user-jane"); client.Parameter(name: "FirstName", value: "Jane"); client.Parameter(name: "LastName", value: "Doe"); dial.Append(client); response.Append(dial); Console.WriteLine(response.ToString()); }
static void Main() { var response = new VoiceResponse(); var dial = new Dial(); var sip = new Sip( new Uri("http://example.com"), "kate", statusCallbackEvent: new List <EventEnum>( EventEnum.Initiated, EventEnum.Ringing, EventEnum.Answered, EventEnum.Completed ), statusCallback: new Uri("https://myapp.com/calls/events"), statusCallbackMethod: HttpMethod.Post ); dial.Append(sip); response.Append(dial); Console.WriteLine(response.ToString());; }