Add a Voicemail Message

Add a voicemail message to a specific extension.

Scenario

The PBX is used for room extension management in a hotel, and the hotel system utilizes a third-party voicemail system to store voicemail messages. When there is a voicemail message left for a room extension, the third-party voicemail system calls the API to add a voicemail message to the PBX extension registered on the room phone. As a result, the message indicator on the room phone will light up, notifying the guest of the new voicemail message.

Request URL

POST {base_url}/{api_path}/vm/create?access_token={access_token}

Request parameters

Parameter Required Type Description
vm_from_number Yes String The number that leaves the voicemail message.
Note:
  • Numbers 0-9 and characters *, #, +, [, ], (, ), -, . are allowed.
  • The maximum character length is 31.
vm_to_number Yes String The extension number to which the voicemail message was left.

Response parameters

Table 1.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
id String The unique ID of the voicemail message.

Examples

Request example

POST /openapi/v1.0/vm/create?access_token=LOTrEg962uKH7lQAYGDtGDf3CT48RwmE HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
User-Agent: OpenAPI

{
  "vm_from_number": "5503301",
  "vm_to_number": "1005"
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "id": "1718170428-00000009"
}