Package com.twilio.sdk.resource.factory

Examples of com.twilio.sdk.resource.factory.CallFactory.create()


    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>();
View Full Code Here


            callParams.put("To", phoneNumber);
            callParams.put("From", TWILIO_FROM_NUMBER);
            callParams.put("Url", HOST + "/external/partyContactValidation.do?method=validatePhone&code=" + code + "&lang="
                    + lang);
            try {
                callFactory.create(callParams);
                return true;
            } catch (TwilioRestException e) {
                logger.error("Error makeCall: " + e.getMessage(), e);
                return false;
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.