0

I use CallResource.Create(); But it makes a call without ring back tone and disconnected and I need pure C# code to make outbound call form browser due to browser compatibility of twilio.js and I'm confusing regarding https URI what to specify there because create already make calls on "To" number.

public ActionResult MakeCall(string number)
{
        string AccountSid = "********";
        string AuthToken = "*********";
        TwilioClient.Init(AccountSid, AuthToken);
        var to = new PhoneNumber(number);
        var from = new PhoneNumber("********");
        ServicePointManager.SecurityProtocol =(SecurityProtocolType)3072;

        if (number!= null) {
           var call = CallResource.Create(to: to, from: from, m 
       achineDetection: "Enable",timeout:600, url: new Uri("https://handler.twilio.com/"));
              ViewBag.Message = call.Sid;
         }

         return View("Index");
 }
  • Which API endpoint are you connecting to? The URI that you mentioned here https://handler.twilio.com I am unable to connect to. Also can that API be tested without paying? – anand_v.singh Jul 16 '19 at 07:01
  • yes, you can test it on trial version with verified caller id or number. I'm just giving example of URI here, you get this from twilio documentations for testing purpose or give it URL of twiML bin or functions created in Twilio console. – Abhijit Malwe Jul 17 '19 at 08:20

0 Answers0