Add an Alarm
Add an alarm for an extension user.
Endpoint
POST /api/v0.0.1/wakeupcall/create?token={token}&type={type}
Request Parameters
Name | Importance | Type | Description |
number | Required | String | The extension number.
Ranges: Single extension number: add an alarm for the specified extension. For example: “number”: “110” Multiple extension numbers: add the same alarm for multiple extensions. Multiple extension numbers are separated by half-width commas (,). For example: “number”: “110,111” |
time | Required | String | Alarm time. |
type | Required | String | Alarm type.
Ranges: onetime: When the alarm completes the set number of repetitions, the alarm will be automatically deleted. custom: When type is custom, weekdays is not empty. |
weekdays | Optional | String | The week the alarm applies to.
Value range: 0~6. Among them, 0 means Sunday, 1-6 means Monday to Saturday. The options available when the type is set to custom. |
Prompt | Optional | String | The file name of the custom prompt. This prompt must be a custom prompt. |
Response Parameters
Name | Type | Description |
status | String | Request results.
Success: Success. Failed: failed. |
Examples
Request Example
Add an alarm for extension 106.
POST /api/v0.0.1/wakeupcall/create?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“number”:”106″,
“type”:”custom”,
“time”:”15:55″,
“weekdays”:”0,1,2,3,5″,
“prompt”:”custom/test”
}
Response Example
HTTP/1.1 200 OK
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<status>Success</status>
</xml>