User Tools

Site Tools


api:pbx:voicemailbox:get

API : PBX : Voicemail Box Get

Introduction

A voicemail box item sends the caller to the voicemail box of an employee - either to leave a message, or to listen to the messages and configure the voicemail.

The voicemail box belongs to the employee currently on the selected extension, so it follows hotdesking. When listening, the caller can instead be asked to enter the extension number (askForExtension), which makes the item a number the employees can call from any phone to reach their voicemail. If no extension is selected, or the extension has no employee, the caller is told that voicemail is not enabled.

Listening always requires the employee's pincode - also when the employee calls from their own phone. If the call variable pin holds the correct pincode, for example set with a Set value item or by a URL router earlier in the call, the caller is let straight in. Otherwise the caller is asked to enter it. A wrong pin counts as a wrong pincode, and after 5 wrong pincodes the voicemail box is locked for 15 minutes. The value of the call variable pin is never shown in realtime events or API responses - it is shown as ****.

Request

This request will return a single voicemail box item.

URL https://api.telecomx.dk/pbx/voicemailbox/VOICEMAIL_BOX_ID
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
RESELLER_ADMIN.
ADMIN.
Param VOICEMAIL_BOX_ID Id of the voicemail box (24 hex-char string)
Query expandGoto [optional] True to expand the extension id into an _id/type/number/name object

Query examples

https://api.telecomx.dk/pbx/voicemailbox/1234567890ABCDEF12345678
https://api.telecomx.dk/pbx/voicemailbox/1234567890ABCDEF12345678?expandGoto=true

Response

JSON object
Property Type Description
_id Id Unique id of the voicemail box.
type String Always 'VOICEMAIL_BOX'.
customer Id Id of the customer the voicemail box belongs to.
name String Name/description of the voicemail box.
number String The phone number to dial to reach this voicemail box locally, null if it is not dial-able.
startAudio Id A PBX audio item to playback when the voicemail box is entered. Null if not used.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the voicemail box item.
notes String Notes about the voicemail box item.
mode String What the caller is sent to the voicemail box for: RECORD - leave a message (default). LISTEN - listen to messages and configure the voicemail, pincode protected.
extension Id Extension dialplan item whose employee owns the voicemail box. Null when askForExtension is true. Set to null automatically if the extension is deleted.
askForExtension Boolean LISTEN only: true to ask the caller for the extension number instead of using extension. Always false for RECORD.
x Number X position in visual dialplan.
y Number Y position in visual dialplan.

Example

{
  _id: '12345678901234567890FEED',
  type: 'VOICEMAIL_BOX',
  customer: '12345678901234567890ABCD',
  name: 'Aflyt telefonsvarer',
  number: '8888',
  startAudio: null,
  redirect: '',
  notes: '',
  mode: 'LISTEN',
  extension: null,
  askForExtension: true,
  x: 123,
  y: 456
}

Errors

Error code Message Description
400 bad_request Id not found in requestURI
404 not_found Voicemail box not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/voicemailbox/get.txt · Last modified: by Telecom X AI

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki