Add an Alarm

Add an alarm for an extension user.

Note:
  • Only one alarm can be added at a time. If multiple alarms are added at a time, only the first alarm added will take effect.
  • The same alarm can be added to multiple extensions. You should separate the extension number with comma ,, For example:

    {"extid":"1000,1001","wakeup":[{"time":"00:45","type":"onetime","repeats":"3","repeatinterval":"5"}]}.

Endpoint

POST /api/v1.1.0/wakeupcall/create?token={token}

Request Parameters

Name Importance Type Description
extid Required Int The extension number.
wakeup Required Object Object.
time Required String Alarm time.
type Required String Alarm type.
  • onetime
  • everyday
  • custom
Note: If the type is set to yes, PBX will delete the alarm after the alarm has been repeated for the designated repeat times.
weekdays Optional String The options available when the type is set to custom.
repeats Optional String How many times will the alarm be repeated.
Repeatinterval Optional String The interval in minutes between each repeat.
Prompt Optional String The file name of the custom prompt. Without the parameter, the default prompt "macroform-cold_day" will be played.

Examples

Request Example
POST /api/v1.1.0/wakeupcall/create?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
    "extid": "1000",
    "wakeup": [
        {
            "time": "00:45",
            "type": "onetime",
            "repeats": "3",
            "repeatinterval": "5"
        }
    ]
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success"
}