/** @param args */
  public static void main(String[] args) {

    RestAPI restAPI = new RestAPI("<AUTH_ID>", "<AUTH_TOKEN>", "v1");

    LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();

    params.put("conference_name", "1234");

    GenericResponse response = new GenericResponse();

    try {
      response = restAPI.stopRecordConference(params);
      System.out.println(response.apiId);
    } catch (PlivoException plivoException) {
      plivoException.printStackTrace();
    }
  }
Example #2
0
 @Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
         throws ServletException, IOException {
     
     PlivoResponse response = new PlivoResponse();
     Wait wait = new Wait();
     wait.setLength(10);
     Speak spk = new Speak("Hello");
     
     try {
         response.append(wait);
         response.append(spk);
         System.out.println(response.toXML());
         resp.addHeader("Content-Type", "text/xml");
         resp.getWriter().print(response.toXML());;
     } catch (PlivoException e) {
         e.printStackTrace();
     }       
 }
 @Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
         throws ServletException, IOException {
     
     PlivoResponse response = new PlivoResponse();
     Speak speak = new Speak("Connecting your call..");
     Dial dial = new Dial();
     dial.setAction("https://dry-fortress-4047.herokuapp.com/dial_status");
     dial.setMethod("GET");
     Number num = new Number("1111111111");
     
     try {
         response.append(speak);
         dial.append(num);
         response.append(dial);
         System.out.println(response.toXML());
         resp.addHeader("Content-Type", "text/xml");
         resp.getWriter().print(response.toXML());;
     } catch (PlivoException e) {
         e.printStackTrace();
     }       
 }