api:pbx:playback:get
Table of Contents
API : PBX : Playback Get
Introduction
A Playback is a dialplan object that plays back audio files or speaks a composed text that may consist of a mix of texts and variables to be spoken.
Request
This request will return a single playback item.
| URL | https://api.telecomx.dk/pbx/playback/PLAYBACK_ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Param | PLAYBACK_ID | Id of the playback (24 hex-char string) |
| Query | expandGoto | [optional] True to expand goto id's into _id/type/number/name objects |
Query examples
https://api.telecomx.dk/pbx/playback/1234567890ABCDEF12345678 https://api.telecomx.dk/pbx/playback/1234567890ABCDEF12345678?expandGoto=true
Response
| JSON object | ||
|---|---|---|
| _id | Id | Unique id of the playback item. |
| type | String | Always 'PLAYBACK'. |
| customer | Id | Id of the customer the playback belongs to. |
| name | String | Name/description of the playback item. |
| number | String | The phone number to dial to reach this playback item locally, null if it is not dial-able. |
| startAudio | Id | A sound item to playback when the playback item is entered, null if not used. |
| redirect | String | Number to redirect to when execution starts. Used to quickly circumvent the playback item. |
| notes | String | Notes about the playback item. |
| speak | Object | Speak settings |
| speak.message | String | The message to perform text-to-speech on, including variables. |
| speak.engine | String | [Optional] Which TTS engine to use: ELEVEN_TURBO, ELEVEN_FLASH, ELEVEN_ML, ELEVEN_V3. Defaults to ELEVEN_FLASH. |
| speak.language | String | [Optional] Optional language of the message. ISO 639-1 format. If not set, it is inferred from the voice. |
| speak.voice | String | The voice to speak with. |
| speak.speed | Number | [Optional] Speaking speed, optional, default to 100, range 70-120 (fastest). |
| speak.stability | Number | [Optional] Stability, default 50, min 0, max 100. |
| goto | Id | The PbxDialplans item to goto when done. |
Example
{ _id: '12345678901234567890ABCD', name: 'VIP Welcome', number: '565', startAudio: null, redirect: null, notes: 'Welcome message for VIP customers', speak: { message: 'Hello <A_NAME>, the time is now <DATE_NOW TIME> and the office is closed. As you are a VIP customer, you are now forward to VIP support. There are current <QUEUE_CALLERS_COUNT 12345678901234567890BBBB> callers in the queue, but we expect to be talking to you in about <QUEUE_CALLERS_MAX_WAIT 12345678901234567890BBBB>.', voice: '44864153xd489e48f48f48e948f486df', speed: 100, engine: 'ELEVEN_V3' }, goto: '1234567890123457890AAAA' }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in requestURI |
| 404 | not_found | Playback not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/playback/get.txt · Last modified: 2025/09/23 12:57 by Per Møller