voximplant

How to get Voximplant call recording URL?


In Voximplant scenario, when a call recording ends, I need to take the URL of the recording and send it via a POST request.

I don't understand how can I do this


Solution

  • You can retrieve call record URL by listening to CallEvents.RecordStarted event. The URL then can be passed to your web services using Net.httpRequestAsync function

    let call = callPSTN("18881112233", "14434434434");
    call.record();
    call.addEventListener(CallEvents.RecordStatred, async (e) => {
      const recordUrl = e.url;
      await Net.httpRequestAsync("https://example.org", {method: "POST", postData: recordUrl});
    });