Map<String, String> callParams = new HashMap<String, String>();
callParams.put("To", "5105551212"); // Replace with a valid phone number
callParams.put("From", "(510) 555-1212"); // Replace with a valid phone
// number in your account
callParams.put("Url", "http://demo.twilio.com/welcome/voice/");
Call call = callFactory.create(callParams);
System.out.println(call.getSid());
// Send an sms (using the new messages endpoint)
MessageFactory messageFactory = mainAccount.getMessageFactory();
List<NameValuePair> messageParams = new ArrayList<NameValuePair>();