Reputation: 31
When I enter any number in text box. I receive a call from plivo number and I get request_uuid
and call_uuid.Now
. I want to record the call.
When i make call to another person and he/she received my call it should be recorded.
Can anyone tell me how to complete this task?
package plivo.helper;
import java.util.LinkedHashMap;
import com.plivo.helper.api.client.RestAPI;
import com.plivo.helper.exception.PlivoException;
import com.plivo.helper.api.response.response.Record;
public class RecordConference
{
public static void main(String[] args) {
RestAPI restAPI = new RestAPI("XXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXX", "v1");
LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
params.put("conference_name", "1234");
Record response = new Record();
try {
response = restAPI.recordConference(params);
System.out.println(response.url);
} catch (PlivoException plivoException) {
plivoException.printStackTrace();
}
}
Here i got null
response as result.
Upvotes: 0
Views: 621
Reputation: 11
Hi try this for recording it works fine
public Class RecordConference {
public static void main(String...args){
PlivoClient newCall = new PlivoClient("v0.1", auth_id, auth_token , plivo_url, true);
CallFeature call = newCall.call();
Map<String, String> callParams = new HashMap<String, String> ();
callParams.put("CallUUID", "eau76-rty-67ueg-876960-ghy");
callParams.put("FileFormat", "wav");
callParams.put("FilePath","/home/teleswitch/development/prompts/");
callParams.put("FileName","record1");
RecordStartResponse callResponse = call.recordStart(callParams);
System.out.println(callResponse);
}
}
Upvotes: 1