Add an Alarm
Add an alarm for a specific extension.
Note:
- Add one alarm for one extension at a time. If you add multiple alarms at a time, only the newly added alarm will take effect.
- A maximum of 23 alarms can be added for an extension.
Request URL
POST {base_url}/{api_path}/wakeupcall/create?access_token={access_token}
Request parameters
Parameter | Required | Type | Description |
---|---|---|---|
ext_id | Yes | Integer | The unique ID of an extension. Note: You
can query extension's ID using Search Specific Extensions. |
alarm_time | Yes | String |
The alarm time in 24-hour clock format. For example:
|
repeat_type | No | String | The
schedule and specific days for repeating the
alarm. Valid value:
Note:
|
number_of_snoozes | No | Integer | How many times will the alarm be repeated. Valid
value:
|
snooze_duration | No | Integer | The interval in minutes between each repeat. Default value: 10 |
alarm_prompt | No | String | The name of alarm prompt. Note:
|
alarm_day | No | String | Alarm date. Time format: YYYY/MM/DD, where Y represents the year, M represents the Month, and D represents the Day. For example, enter 2025/01/05. |
repeat_option | No | String | The frequency for repeating the alarm. Valid
value:
|
ring_timeout | No | Integer | The amount of time in seconds that the alarm will ring before timeout. |
fail_dest_type | No | String | The failover destination type. Valid value:
|
fail_dest_data | No | Integer | The specific failover destination if
fail_dest_type is set to
ext or ringgroup .Note: You can query extension's ID using
Search Specific Extensions and query
ring group's ID using Get Menu Options. |
remark | No | String | Add additional information about the alarm. |
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 | Integer | The unique ID of the alarm. |
Examples
Request example
POST /openapi/v1.0/wakeupcall/create?access_token=ojPrvnfzPdwc8OCcRmhG16gEHuZcwFco HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"ext_id":3,
"alarm_time":"06:00",
"repeat_type":"never",
"number_of_snoozes":3,
"snooze_duration":5,
"alarm_prompt":"morning-call.wav",
"alarm_day": "2025/01/05",
"repeat_option": "never",
"ring_timeout": 4,
"fail_dest_type": "ext",
"fail_dest_data": 5
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"id": 12
}