Recording
The audio of one Leg. A Call can have none, one or several.
A Recording belongs to one Leg of a Call. A Call with a transfer can have one on each side of it.
This is the player of the Recordings page of app.onsim. It shows who called whom and when, and it plays the audio of the Leg. The audio here is a sample, not a real call.
Fields
Section titled “Fields”| Field | Type | What it is | On app.onsim |
|---|---|---|---|
leg_id | string | The ID of the Leg of the Recording. | The address of the page of the Recording, which the last button of the player opens. |
expires_at | string | When the links stop. Ask again for new links. | Not shown. |
files | list of RecordingFile | The parts of the Recording, in the order to play them. Most Recordings have one. | The audio that the player plays, and the wave that it draws. |
A Recording can come in more than one file. Play the files in the order of the list.
| Field | Type | What it is |
|---|---|---|
url | string | A link to the audio, as a WAV file. It works until expires_at. |
Example
Section titled “Example”The Recording of the sample Call: the Leg of extension 202, which answers.
{ "leg_id": "8A6F20D3 174BC9E5 D05A8F61 D05A8F61", "expires_at": "2026-10-01T10:19:02.000Z", "files": [ { "url": "https://..." } ]}The links stop after 5 minutes
Section titled “The links stop after 5 minutes”Each link works until expires_at. Download the audio, or ask again for new links. Do not keep a link.
Methods
Section titled “Methods”Both methods take the ID of a call in the path.
- For most Legs, that is the
idof the Call. - A Leg of an attended transfer has a
call_idof its own. Use that ID for its Recording. See A Call with an attended transfer.
The list of a Call with no Recording answers 404, and so does an ID that no Call has. The get of a Leg with no Recording answers 404 too, and so does a Leg under the ID of another call.
A Recording is kept longer than the Call. So these methods still find it when the Call is too old for the list of Calls.
Encode both IDs before you put them in the path.