using SignalWire.Relay; using SignalWire.Relay.Calling; using System; using System.Threading.Tasks; namespace josh { internal class Program { public static void Main() { using (Client client = new Client("f3dffdbf-e5ac-4511-a15f-XXXXXXXXXXX", "PTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")) { // Assign callbacks client.OnReady += c => { // This callback cannot block, so create a threaded task Task.Run(() => { //cell //signalwire DialResult resultDial = client.Calling.DialPhone("+1931298XXXX", "+1334212XXXX"); if (resultDial.Successful) { // Your call has been answered, use resultDial.Call to access it Console.Write(resultDial.Call); // Play an audio file, block until it's finished or an error occurs resultDial.Call.PlayAudio("https://cdn.signalwire.com/default-music/welcome.mp3"); } }); }; // Connect the client client.Connect(); // Prevent exit until a key is pressed Console.Write("Press any key to exit..."); Console.ReadKey(true); } } } }