Voice mail

Overview

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

The voicemail box has the same number as the account it belongs to.
It is accessed by the IVR script component "Voice Mail".
In order to leave a voicemail message, subscriber function code 'voicemail_send' is used, where the number must be appended to the box number when called.
Alternatively, an IVR script can be created with a pause of 10-20 seconds before the handset is picked up, placing a voicemail (either by itself or by transferring to a subscriber function number with an extension), and assigned as parallel number.

Voicemail is served by a microservice vmail.

Voicemail management (listening, deleting) is also possible with IVR scripts and subscriber function code 'voicemail'.
When you listen to messages with the phone via the subscriber function code, the status of the message is automatically changed from new ("new") to listened to ("listened").

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

The full path collection is available to users to subscribe to changes via websocket subscr and to CRUD operations via websocket rest.
Subscription works through a collection of voice message archive.

Requests

HTTP verb Endpoint Description

GET

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

Retrieving a list of voicemail messages

CLEAR

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

Clearing the voice mailbox

GET

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

Retrieving voice message metadata

PATCH

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

Moving a voice message to listened to messages

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

Retrieving a voice message recording file

For all requests:
Domain Type: working

Retrieving a list of voicemail messages

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

The list includes both new messages that have not been listened to before and messages that have been listened to.

Request

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

Response

Response example
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 voice mailbox

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

Request

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

Response

Response example
HTTP/1.1 204 No Content

Retrieving voice message metadata

Request

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

Response

Response example
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 to messages

Changes the status of an existing voice message by moving it to listened to.
If this is the only unheard message, the indicator light on the MWI activated handset goes out.

Request

Request example
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

Response example
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 unheard message, the indicator light on the MWI activated handset goes out.

Request

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

Response

Response example
HTTP/1.1 204 No Content

Retrieving a voice message recording file

Request

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

Response

Response example
HTTP/1.1 200 OK
Content-Type: media/x-wav

BINARY BODY OF RECORING