static void Main(string[] args) { // Find your Account Sid and Auth Token at twilio.com/user/account string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string AuthToken = "your_auth_token"; string WorkspaceSid = "WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string TaskSid = "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string ReservationSid = "WRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var client = new TaskRouterClient(AccountSid, AuthToken); Reservation reservation = client.GetReservation(WorkspaceSid, TaskSid, ReservationSid); Console.WriteLine(reservation.ReservationStatus); Console.WriteLine(reservation.WorkerName); }
static void Main(string[] args) { // Find your Account Sid and Auth Token at twilio.com/user/account string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string AuthToken = "your_auth_token"; string WorkspaceSid = "WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string TaskSid = "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string ReservationSid = "WRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var client = new TaskRouterClient(AccountSid, AuthToken); // Update a Reservation with a Dequeue instruction Reservation reservation = client.GetReservation(WorkspaceSid, TaskSid, ReservationSid); Console.WriteLine(reservation.ReservationStatus); Console.WriteLine(reservation.WorkerName); client.UpdateReservation(WorkspaceSid, "Tasks", TaskSid, ReservationSid, instruction: "dequeue", dequeueFrom: "+18001231234"); }
static void Main(string[] args) { // Find your Account Sid and Auth Token at twilio.com/user/account string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string AuthToken = "your_auth_token"; string WorkspaceSid = "WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string TaskSid = "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string ReservationSid = "WRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var client = new TaskRouterClient(AccountSid, AuthToken); // Update a Reservation with a Redirect instruction Reservation reservation = client.GetReservation(WorkspaceSid, TaskSid, ReservationSid); Console.WriteLine(reservation.ReservationStatus); Console.WriteLine(reservation.WorkerName); client.UpdateReservation(WorkspaceSid, "Tasks", TaskSid, ReservationSid, instruction: "Redirect", redirectCallSid: "CA123456789", redirectUrl: "http://example.com/assignment_redirect"); }
static void Main(string[] args) { // Find your Account Sid and Auth Token at twilio.com/user/account string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string AuthToken = "your_auth_token"; string WorkspaceSid = "WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string TaskSid = "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string ReservationSid = "WRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var client = new TaskRouterClient(AccountSid, AuthToken); // Update a Reservation with a Conference instruction Reservation reservation = client.GetReservation(WorkspaceSid, TaskSid, ReservationSid); Console.WriteLine(reservation.ReservationStatus); Console.WriteLine(reservation.WorkerName); client.UpdateReservation(WorkspaceSid, "Tasks", TaskSid, ReservationSid, instruction: "conference", from: "+18001231234", conferenceStatusCallback: "https://www.example.com/ConferenceEvents", conferenceStatusCallbackEvent: new string[] { "start", "end", "join", "leave", "mute", "hold" } ); }
static void Main(string[] args) { // Find your Account Sid and Auth Token at twilio.com/user/account string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string AuthToken = "your_auth_token"; string WorkspaceSid = "WSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string TaskSid = "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; string ReservationSid = "WRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var client = new TaskRouterClient(AccountSid, AuthToken); // Update a Reservation with a Call instruction Reservation reservation = client.GetReservation(WorkspaceSid, TaskSid, ReservationSid); Console.WriteLine(reservation.ReservationStatus); Console.WriteLine(reservation.WorkerName); client.UpdateReservation(WorkspaceSid, "Tasks", TaskSid, ReservationSid, instruction: "call", callFrom: "+19876543210", callUrl: "http://example.com/agent_answer", callStatusCallbackUrl: "http://example.com/agent_answer_status_callback", callAccept: "true"); }