User Tools

Site Tools


api:pbx:voicemailbox:update

API : PBX : Voicemail Box Update

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 update a voicemail box. Only the properties that need to be updated shall be included.

URL https://api.telecomx.dk/pbx/voicemailbox/VOICEMAIL_BOX_ID
Method POST
Access level MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
RESELLER_ADMIN.
ADMIN.
Params VOICEMAIL_BOX_ID Id Id of item to update.
Body 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.

Request body example

{
  mode: 'RECORD',
  extension: '12345678901234567890EEEE'
}

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
404 not_found Voicemail box not found
404 customer Customer not found or not active
422 name Name must be at least 3 characters
409 number Number is in use by another dialplan item
422 number Number is invalid, only 0-9 is allowed and no public service numbers
422 redirect Redirect number is invalid, only + 0-9, # and * is allowed
404 redirect Redirect number is local but does not point to an existing dialplan item
404 startAudio Audio file not found
422 mode Mode must be RECORD or LISTEN
404 extension Extension not found - must be an extension dialplan item of the same customer
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/voicemailbox/update.txt · Last modified: by Telecom X AI

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki