Voice mail
- Overview
- Requests
- Retrieving a list of voicemail messages from the archive
- Clearing the voice message archive
- Retrieving voice message metadata from the archive
- Setting the 'error' status to an archived voice message
- Deleting a voice message from the archive
- Retrieving a voice message recording file from the archive
Overview
Manages the archive of voice messages placed in the number box of a specific SIP account attached to an authorized user.
Archive - A collection in a data store that duplicates voice messages served by a microservice vmail.
UUIDs are used as identifiers, and the original voice message identifiers are contained in the field 'nativeId'.
Operations with the archive do not affect the functioning of the voice mail service and indicators MWI.
The voicemail box has the same number as the account it belongs to.
It is accessed by the script component "Voicemail".
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 management (listening, deleting) is possible with IVR scripts and subscriber function code 'voicemail'.
When you listen to messages with your phone via the subscriber function code, the message status is automatically changed from 'new' to 'listened'.
The archive reflects these changes.
The full path collection is available to users to subscribe to changes via websocket subscr and to CRUD operations via websocket rest.
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For all requests:
Domain Type: working
Retrieving a list of voicemail messages from the archive
Returns a list of all voice messages from the SIP account box specified using the identifier and attached to the authorized user.
The list contains all the specified messages for the time interval linked to the subscriber’s number.
If an Endpoint with a date is used, the source set is all messages for that date.
Otherwise it is necessary to specify the GET-parameter 'interval'.
Request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/archive_voicemail_messages?inteval=["2022-10-28","2022-10-29"] HTTP/1.1
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/archive_voicemail_messages/2022-10-28 HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "c2043c10-0184-1ec8-cb0b-7cd30a921f58",
"nativeId": "20221028-161946505-13.wav",
"dateTime": "2022-10-28T16:19:46.505Z",
"from": "9274137274",
"messageState": "new",
"statusText": null,
"listenedDateTime": null,
"archivedDateTime": null,
"recording": {
"author_id": "",
"hasha": "md5;1A55FB50B63CF31DBEFE5FC680D0798C",
"link": "fs://00000000-0000-0000-0000-000000000000/attachments_auto/test.okteller.ru/telephony/VoicemailMessages/2022-10-28/c2/04/3c/10-0184-1ec8-cb0b-7cd30a921f58/recording/content",
"mtime": "2022-10-28T13:19:46Z",
"name": "20221028-162946505-13.wav",
"size": 21804
},
"size": 21804
},
{
"id": "21d27ce0-0184-1ec7-cf64-7cd30a921f58",
"nativeId": "20221028-162842083-13.wav",
"dateTime": "2022-10-28T16:28:42.083Z",
"from": "13",
"messageState": "archived",
"statusText": null,
"listenedDateTime": null,
"archivedDateTime": "2022-10-28T13:29:21Z",
"recording": {
"author_id": "",
"hasha": "md5;242335DB1542623B292E594F018079FA",
"link": "fs://00000000-0000-0000-0000-000000000000/attachments_auto/test.okteller.ru/telephony/VoicemailMessages/2022-10-28/21/d2/7c/e0-0184-1ec7-cf64-7cd30a921f58/recording/content",
"mtime": "2022-10-28T13:28:42Z",
"name": "20221028-162842083-13.wav",
"size": 388442
},
"size": 388442
}
]
Clearing the voice message archive
Deletes all voice messages from the archive.
Relating to the SIP account box specified with an identifier and attached to an authorized user.
Deletion of messages from the archive is performed by applying an interval of 3 years.
If there are earlier messages in the archive, they can be purged via single deletions, via detaching the database partition and date directories in the file store, and via a full cleanup of the 'telephony/VoicemailMessages' collection by an administrator.
Deletion of messages not put into 'archived' state via subscriber function or IVR script component "Voice mail".
Retrieving voice message metadata from the archive
Request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/archive_voicemail_messages/2022-10-28/21d27ce0-0184-1ec7-cf64-7cd30a921f58 HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "21d27ce0-0184-1ec7-cf64-7cd30a921f58",
"nativeId": "20221028-162842083-13.wav",
"dateTime": "2022-10-28T16:28:42.083Z",
"from": "13",
"messageState": "archived",
"statusText": null,
"listenedDateTime": null,
"archivedDateTime": "2022-10-28T13:29:21Z",
"recording": {
"author_id": "",
"hasha": "md5;242335DB1542623B292E594F018079FA",
"link": "fs://00000000-0000-0000-0000-000000000000/attachments_auto/test.okteller.ru/telephony/VoicemailMessages/2022-10-28/21/d2/7c/e0-0184-1ec7-cf64-7cd30a921f58/recording/content",
"mtime": "2022-10-28T13:28:42Z",
"name": "20221028-162842083-13.wav",
"size": 388442
},
"size": 388442
}
Setting the 'error' status to an archived voice message
Sets the 'error' status and optionally the error description text in the field 'statusText'.
The error status is final. It is not intended to be changed further.
Deleting a voice message from the archive
Deletes the specified voice message.
Does not affect voicemail service and MWI.
If the original voice message has not been deleted from the archive by the time it is deleted from the archive, it will remain accessible via the script component and the subscriber function 'voicemail'.
Retrieving a voice message recording file from the archive
You can download recordings of archived messages as well as new and already listened to messages.
Does not affect voicemail or MWI service, and does not cause the original voice message to be moved from the new messages box to the listened messages box.