Search in sources :

Example 1 with Call

use of com.twilio.rest.api.v2010.account.Call in project api-snippets by TwilioDevEd.

the class MakePhoneCall method main.

public static void main(String[] args) throws URISyntaxException {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
    String from = "+15017122661";
    String to = "+14155551212";
    Call call = Call.creator(new PhoneNumber(to), new PhoneNumber(from), new URI("http://demo.twilio.com/docs/voice.xml")).create();
    System.out.println(call.getSid());
}
Also used : Call(com.twilio.rest.api.v2010.account.Call) PhoneNumber(com.twilio.type.PhoneNumber) URI(java.net.URI)

Aggregations

Call (com.twilio.rest.api.v2010.account.Call)1 PhoneNumber (com.twilio.type.PhoneNumber)1 URI (java.net.URI)1