Exemplo n.º 1
0
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string AccountSid = "{{ account_sid }}";
        string AuthToken  = "{{ auth_token }}";
        var    twilio     = new TwilioRestClient(AccountSid, AuthToken);

        var options = new SipDomainOptions();

        options.FriendlyName = "My Domain";
        options.VoiceUrl     = "https://demo.twilio.com/welcome";
        options.AuthType     = "IP_ACL";
        options.DomainName   = "marlo.sip.twilio.com";
        var domain = twilio.CreateSipDomain(options);

        Console.WriteLine(domain.Sid);
    }
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string AccountSid = "{{ account_sid }}";
        string AuthToken  = "{{ auth_token }}";
        var    twilio     = new TwilioRestClient(AccountSid, AuthToken);

        var options = new SipDomainOptions();

        options.FriendlyName = "Scranton Office";
        options.VoiceUrl     = "https://dundermifflin.example.com/twilio/app.php";
        options.AuthType     = "IP_ACL";
        options.DomainName   = "dunder-mifflin-scranton.sip.twilio.com";
        var domain = twilio.CreateSipDomain(options);

        Console.WriteLine(domain.Sid);
    }