User Tools

Site Tools


api:pbx:recording:send

API : PBX : Send to self

Request

This is an internal API used by PBX servers.

It is invoked when a recording has completed and the employee who owns the recording wants to receive it via e-mail. The e-mail is sent to the employees own e-mail address.

The e-mail has the same content as the E-mail endpoint - in this order, and only when present on the recording:

  1. A warning box at the top when the AI sensitivity level is not NORMAL.
  2. The AI summary, formatted for easy reading.
  3. The calendar events found by the AI, each with an “add to Google Calendar” link and attached to the e-mail as an .ics calendar file.
  4. The sensitivity level and the reasons the AI chose it, when the level is not NORMAL.
  5. The recording attached as MP3 - only when the employees recording notification settings ask for attachments (recording.notification.attach) and the estimated file size is within recording.notification.maxSize - otherwise a link to the portal.
  6. The transcription, folded and expanded by the click of a button (e-mail clients without support for folding show it expanded).

The e-mail is written in the employees language (Danish or English).

Waiting for the transcription

When the owner of the recording has automatic transcription enabled (recording.transcribe is not DISABLED), this endpoint does not send the e-mail before the transcription and the AI summary are stored on the recording. Without that wait the e-mail is rendered without them, as the PBX invokes Transcribe auto and this endpoint as two independent requests.

  • When another request is already transcribing the recording, it waits for that request - up to 3 minutes - and then uses what it stored. See pbxRecordingTranscribe.
  • When nothing has transcribed the recording yet, it transcribes and summarizes the recording itself.
  • When the transcription fails, or the wait runs out, the e-mail is sent without the summary and transcription rather than not at all.

The request may therefore take minutes to reply - far longer than the PBX HTTP timeout. That is harmless: the e-mail is sent whether or not the PBX is still waiting for the reply. A PBX retry does not send a second e-mail - the recording is claimed in pbxRecordingEmailSent for 15 minutes and the retry replies with sent set to false.

URL https://api.telecomx.dk/pbx/recording/RECORDING_ID/send
Method GET
Access level None - may only be invoked from PBX server IP addresses.
Params RECORDING_ID String Id of recording to e-mail.

Query example

https://api.telecomx.dk/pbx/recording/1234578901234567890ABCD/send

Response

JSON object
success Boolean True on success
sent Boolean True when this request sent the e-mail, false when the recording had already been e-mailed within the last 15 minutes (a PBX retry)

Example

{
  "success": true,
  "sent": true
}

Errors

Error code Message Description
403 access_denied Not invoked from a PBX server
404 not_found Recording not found
404 employee Recording is a common recording with no employee, or the employee has no e-mail address
500 internal_error <Unspecified>
api/pbx/recording/send.txt · Last modified: by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki