Ronan
Ronan

Reputation: 327

Making call with twilio C#

Im trying to build a site where users can click a button that will call a phone (maybe an IP phone) using a verified twilio number. Do I have to build this in MVC or can I do it in web forms using code like this?

Find your Account Sid and Auth Token at twilio.com/user/account 
        string AccountSid = "nnnnnn";
        string AuthToken = "nnnnnn";
        var twilio = new TwilioRestClient(AccountSid, AuthToken);

        // Build the parameters 
        var options = new CallOptions();
        options.To = "+00000000";
        options.From = "+0000000";
        options.ApplicationSid = "nnnnnnnn";
        options.Method = "GET";
        options.FallbackMethod = "GET";
        options.StatusCallbackMethod = "GET";
        options.Record = false;

        var call = twilio.InitiateOutboundCall(options);
        Console.WriteLine(call.Sid);

Upvotes: 2

Views: 498

Answers (1)

E.J. Brennan
E.J. Brennan

Reputation: 46859

MVC is not a requirement of Twilio. Webforms works just as well.

Upvotes: 3

Related Questions