0

テキストボックスに任意の数字を入力すると。plivo 番号から電話がかかってきて、request_uuidcall_uuid.Now. 通話を録音したい。

私が他の人に電話をかけ、彼/彼女が私の電話を受けたとき、それは録音されるべきです.

このタスクを完了する方法を誰か教えてもらえますか?

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();
    }
}

ここで私はnull結果として応答を得ました。

4

1 に答える 1

1

こんにちは、これを録音してみてください。正常に動作します

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);
  }
}  
于 2014-04-28T13:43:34.233 に答える