Voicemail

Overview

Manages voice messages placed in the box of the number of a specific SIP account attached to the authorized user.

The voicemail box has the same number as the account it belongs to.
Access to it is provided by the "Voicemail" IVR script component.
To leave a voicemail message, the feature code 'voicemail_send' is used; when calling its number, the number must be supplemented with the box number.
As an alternative, an IVR script with a 10-20 second pause before answering can be created that places voicemail (by itself or by transferring to the feature code number with an extension) and assigned as a parallel number.

Voicemail is serviced by the vmail microservice.

Voicemail management (listening, deletion) is also possible via IVR scripts and the feature code 'voicemail'.
When listening to messages via a telephone using the feature code, the message state automatically changes from new ("new") to listened ("listened").

Unlike most other classes, the voice message entity identifier is a string with arbitrary content.

The full-path collection is available to users for subscription to changes via websocket subscr, as well as CRUD operations via websocket rest.
Subscription works through the voice message archive collection.

Requests

HTTP verb Endpoint Description

GET

/rest/v1/user/sip/accounts/<AccountID>/voicemail_messages

Getting the list of voicemail messages

CLEAR

/rest/v1/user/sip/accounts/<AccountID>/voicemail_messages

Clearing the voicemail box

GET

/rest/v1/user/sip/accounts/<AccountID>/voicemail_messages/<Id>

Getting voice message metadata

PATCH

/rest/v1/user/sip/accounts/<AccountID>/voicemail_messages/<Id>

Moving a voice message to listened

DELETE

/rest/v1/user/sip/accounts/<AccountID>/voicemail_messages/<Id>

Deleting a voice message

GET

/rest/v1/user/sip/accounts/<AccountID>/voicemail_messages/<Id>/recording

Getting the voice message recording file

For all requests:
Domain type: worker

Getting the list of voicemail messages

Returns the list of all voice messages from the box of the SIP account specified by identifier and attached to the authorized user.

The list contains both new previously unheard messages and listened ones.

Request

Example request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/voicemail_messages HTTP/1.1

Response

Example response
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "id": "20221011-110213255-13",
    "dt": "2022-10-11T13:54:36.307Z",
    "from_number": "891234567890",
    "status": "listened"
  },
  {
    "id": "20221011-135436307-13",
    "dt": "2022-10-11T13:54:36.307Z",
    "from_number": "13",
    "status": "new"
  }
]

Clearing the voicemail box

Deletes all voice messages, both listened and unlistened.
From the box of the SIP account specified by identifier and attached to the authorized user.

Request

Example request
CLEAR /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/voicemail_messages HTTP/1.1

Response

Example response
HTTP/1.1 204 No Content

Getting voice message metadata

Request

Example request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/voicemail_messages/20221011-135436307-13 HTTP/1.1

Response

Example response
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "20221011-135436307-13",
  "dt": "2022-10-11T13:54:36.307Z",
  "from_number": "13",
  "status": "new"
}

Moving a voice message to listened

Changes the status of the existing voice message, moving it to listened.
If this is the only unlistened message, the indicator on a telephone with MWI enabled goes out.

Request

Example request
PATCH /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/voicemail_messages/20221011-135436307-13 HTTP/1.1
Content-Type: application/json

{
  "status": "listened"
}

Response

Example response
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "20221011-135436307-13",
  "dt": "2022-10-11T13:54:36.307Z",
  "from_number": "13",
  "status": "listened"
}

Deleting a voice message

Deletes the specified voice message.
If this is the only unlistened message, the indicator on a telephone with MWI enabled goes out.

Request

Example request
DELETE /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/voicemail_messages/20221011-135436307-13 HTTP/1.1

Response

Example response
HTTP/1.1 204 No Content

Getting the voice message recording file

Request

Example request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/voicemail_messages/20221011-135436307-13/recording HTTP/1.1

Response

Example response
HTTP/1.1 200 OK
Content-Type: media/x-wav

BINARY BODY OF RECORING