SendAlarmNotification command
The SendAlarmNotification command sends an alarm message to a specified number through VoIP call. This command can be used for sending an alarm message in case of fire or emergency and you can also easily customize the command by setting up the following parameters.Request parameters
Parameter name | Example value | Description | Mandatory |
AccountNumber | 1234 | Account number, which contains 4 digits. | yes |
ApiExtension | 1000 | API Extension from where the call will be initiated, it must be a configured API extension. It can be omitted if sent in a response to a call notification. | no |
EventCode | 401 | The event code, which contains maximum 3 digits. | yes |
EventQualifier | NewEvent | This parameter gives specific information about the current event code. | no |
PartitionNumber | 1 | The group or partition number, which contains 2 digits maximum. | yes |
Phone number | 1000 | The phone number to where the alarm notification is sent. | yes |
ResultUrl | http://yourapp.com/alarmnotification.php | The PBX will send a request to this URL, when the alarm notification sent successfully or failed. | no |
ZoneNumber | 10 | Zone number, which contains 3 digits maximum. | yes |
Response parameters
Parameter name | Example value | Description | Mandatory |
Code | 200 | Returns the status code of the response. | yes |
Message | Command successfully executed | Returns th description of the response code. | yes |
NotificationName | CallConnected | Name of the notification request type. | no |
OzML example
This simple example demonstrates how the SendAlarmNotification works by sending a fire alarm to the phone number 101.
<Response> <SendAlarmNotification PhoneNumber='101' AccountNumber='1234' EventCode='110' PartitionNumber='1' ZoneNumber='10' ResultUrl='http://yourapp.com/alarmnotification.php'/> </Response>
Example request and response
URL request
http://127.0.0.1:9509/api?command=SendAlarmNotification&PhoneNumber=101&AccountNumber=1234&EventCode=110&PartitionNumber=1
&ZoneNumber=10&ResultUrl=http://yourapp.com/alarmnotification.php&Username=HTTP_User_1&Password=qwe123
Response
<?xml version="1.0"?> <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Code>200</Code> <Message>Command successfully executed</Message> </Response>
More information
- AttendedTransfer command
- BlindTransfer command
- Call command
- ForwardCall command
- ListCallHistory command
- Hangup command
- Hold command
- ListActiveCalls command
- ListExtensions command
- ListExtensionTypes command
- Play command
- Record command
- Request command
- SendDTMF command
- Speak
- Unhold command
- ReceiveMessage command
- SendEmail command
- SendMessage command
- SendSMS command
- Array command
- Beep command
- Delay command
- DeleteFile command
- ForEach command
- GoTo command
- MoveFile command
- Reject command
- Route command
- SendAlarmNotification command
- SendMsg command
- UserInput command
- Var command
- WaitForMsg command
- CallSetup command
- Exit command
- ListAddressbokkContacts
- ListAddressbookNames command
- ReceiveAlarmNotification