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:
|
| vm_to_number | Yes | String | The extension number to which the voicemail message was left. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| 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: yeastardocs.example.yeastarcloud.com 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" }