Plivo Manager Shut down

264 views Asked by At

hello I am using Plivo in my jsp application .. I have two jsp pages from index. jsp page I have one text box and one submit button.. when I enter number in textbox and press submit at that time plivo service call and I can call to any number.. and it gives me req_uuid .After calling I have get data from json array.. from that array I retrive call_uuid. when I pass that call_uuid in to record. record=restAPI.recordConference(record_params);

I get error like "Manager is shutdown"

JSP Page Call From Plivo....

    call_params = new LinkedHashMap();
    LinkedHashMap record_params = new LinkedHashMap();
    String to=request.getParameter("to");
    String from=request.getParameter("from");
    String toPlus="+91"+ to;

    call_params.put("from","+111111111111");
    call_params.put("to", toPlus);
    call_params.put("answer_url", "http://dl.dropbox.com/u/54579287/Docs/speak.xml");

   Call call;


            try 
            {
                    call = restAPI.makeCall(call_params);
                    out.println("Request UUID---->>" + call.requestUUID);
            }
            catch (PlivoException e) 
            {
                    System.out.println(e.getMessage());
            }

            try
            {
                DefaultHttpClient client = new DefaultHttpClient();
                HttpGet request1 = new HttpGet(url);
                request1.addHeader("User-Agent", USER_AGENT);
                request1.addHeader(BasicScheme.authenticate(new UsernamePasswordCredentials("username", "password"), "UTF-8",false));
                HttpResponse response1 = client.execute(request1);
                System.out.println("Response Code : " + response1.getStatusLine().getStatusCode());
                data = EntityUtils.toString(response1.getEntity());
                dataArray =data.split(","); 
            } 

            catch (Exception ex) 
            {

            }
            JSONObject mJSONObject = new JSONObject(data);

            try 
            {
                JSONArray mjSONArray = mJSONObject.getJSONArray("objects");
                for (int i = 0;i>>>>" + call_uuid);
                }


            }

            catch (JSONException ex)
            {
                System.out.println(ex);
            }         

            Record record;

            record_params.put("conference_name","Recording");
            record_params.put("call_uuid",call_uuid);

            try
            {
                record=restAPI.recordConference(record_params);
                out.println("hello Man");
                out.println(record.url);
                out.println(record.error);
                out.println(record.api_id);
                out.println(record.message);

            }
            catch (PlivoException e) 
            {
                 System.out.println(e.getMessage());
            }

%>
2

There are 2 answers

0
menzoic On BEST ANSWER

Plivo has 24/7 tech support. They should be able to handle this.

0
zephyr On

You should create a plivo client eveytime its used, otherwise plivo throws an exception saying Connection manager has been shut down

RestAPI plivoClient = new RestAPI(authKey, authToken, version);

should be done whenever its used.