How to record a call

This guide covers:

  • How to create a call with recording enabled
  • How to toggle-on recording on an active call
  • How to toggle-off recording on an active call

Before playing audio file

  1. Create call with callback URL -or- Recieve Incoming Call
  2. Make sure call is answered and active

How to create a call and start recording it create call

POST https://api.catapult.inetwork.com/v1/users/{userId}/calls HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "from"             : "{fromNumber}",
    "to"               : "{toNumber}",
    "recordingEnabled" : "true"
}

How to start recording on an active call active call

POST https://api.catapult.inetwork.com/v1/users/{userId}/calls/{callId} HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "recordingEnabled": "true"
}

How to stop recording on an active call active call

POST https://api.catapult.inetwork.com/v1/users/{userId}/calls/{callId} HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "recordingEnabled": "false"
}

Response

HTTP/1.1 200 OK

This sends these call backs when the recording has been completed

POST your_server.com HTTP/1.1
Content-Type: application/json; charset=utf-8

{
   "callId"       : "{callId}",
   "eventType"    : "recording",
   "recordingId"  : "{recordingId}",
   "recordingUri" : "https://api.catapult.inetwork.com/v1/users/{userId}/recordings/{recordingId}",
   "status"       : "complete",
   "startTime"    : "2013-08-19T16:56:57.643Z",
   "endTime"      : "2013-08-19T16:57:08.712Z"
}

How to create a call and start recording it create call

client.Call.create({
    from: "{fromNumber}",
    to: "{toNumber}",
    recordingEnabled: true
})
.then(function (id) {
    console.log(id);
})
var call = await client.Call.CreateAsync(new CreateCallData{
    From = "{fromNumber}",
    To = "{toNumber}",
    RecordingEnabled = true
});
Console.WriteLine($"Created call with id {call.Id}");
call = Call.create(client, {
    :from => "{fromNumber}",
    :to => "{toNumber}",
    :recording_enabled => true
})

How to start recording on an active call active call

client.Call.enableRecording("callId").then(function (res) {});
await client.Call.TurnCallRecordingAsync("callID", true);
call.recording_on()

How to stop recording on an active call active call

client.Call.disableRecording("callId").then(function (res) {});
await client.Call.TurnCallRecordingAsync("callID", false);
call.recording_off()

results matching ""

    No results matching ""