Alarmbridge
Download OpenAPI specification:Download
The Alarmbridge API exposes endpoints that allow alarm events using various IP based or analogue protocols to be sent by the platform.
It also provides functions that interact with ongoing alarm sessions such as properly clear and hang up an ongoing analogue alarm call.
The implicit_callbacks endpoint provides documentation of the various callbacks sent by the service, for example callback events triggered when an alarm event is received by the platform.
/{domain}/hangupalarmcall
Hang up an ongoing Alarmbridge call with normal disconnect reason.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
When an alarm device has a connected voice call with an alarm center it must be sent a protocol specific command before the call is hung up. If this is not sent the device will think the call was hung up due to failure and will re-dial.
Call this API endpoint to trigger such command to be sent to have the alarm call properly disconnected.
replyId | string Set this to the value of replyId received in the /newAlarmbridgeEvent callback request that started the call to be terminated. |
sessionId | string The id for the Alarmbridge session that executes the command. This session id was passed in the /newAlarmbridgeEvent callback request. |
Responses
Request samples
- Payload
{- "replyId": "string",
- "sessionId": "string"
}
Response samples
- 200
{- "success": true
}
/{domain}/devicecommand
Send commands within a voice session to an alarm device.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
This API endpoint will send send commands within a voice session that is established via Alarmbridge to the alarm device.
The Alarmbridge service destination must have the controlCommandsEnabled:true
configuration for this function to work.
replyId | string Set this to the value of replyId received in the /newAlarmbridgeEvent callback request that started the call to be terminated. | ||||
sessionId | string The id for the Alarmbridge session that executes the command. This session id was passed in the /newAlarmbridgeEvent callback request. | ||||
object Object to send command parameters. Currently only applicable for sendTones command. | |||||
| |||||
command | string Enum: "keepAlive" "listen" "releaseDoorLock1" "releaseDoorLock2" "releaseSafeLock" "resetSpeechSettings" "selectSpeaker1" "selectSpeaker2" "sendTones" "setVolumeLevel1" "setVolumeLevel2" "setVolumeLevel3" "speak" "switchToDuplex" "switchToSimplex" "volumeDown" "volumeUp" The command to be sent to the device |
Responses
Request samples
- Payload
{- "replyId": "string",
- "sessionId": "string",
- "parameters": {
- "duration": 0,
- "toneString": "string"
}, - "command": "keepAlive"
}
Response samples
- 200
{- "success": true
}
/{domain}/sendalarmevent
Trigger alarm event to be sent by the Alarmbridge function.
Authorizations:
path Parameters
domain required | string |
Request Body schema: application/jsonrequired
This API endpoint will send an IP based or analogue alarm event to the specified destination with the selected protocol and alarm parameters. If the eventReceiver property is used an alarmbridge eventreceiver will be matched to find a corresponding eventsender. In that case all parameters to send the actual alarm event is set by the eventsender in the alarmbridge configuration, for example protocol and destination address.
It is an asynchronous function so the API call will return immediately when alarm sending starts and subsequent callback requests will indicate if the alarm was sent successfully or if it failed.
The callback are documented in the implicit_calbacks section.
traceId | string If a traceId parameter is given then it is used instead of an internally generated UUID. The traceId will be present in all responses, messages, callbacks and alarms sent from the service. | ||||||||||||||||||||||||
sipFrom | string Value to be set the user part of the SIP from: URI, used to set calling party number. For example +46890510 | ||||||||||||||||||||||||
toneHandler | string Value: "transparent" Indicate what kind of transformation is done to the incoming DTMF tones sent from the ARC towards the device. | ||||||||||||||||||||||||
object Set properties how to send DTMF tones for Alarmbridge service destination. | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
object The protocolParameters property is an object used to pass on target protocol parameters that are specific for the event sent. | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
object This property is used to define the alarm event to be sent. It is a a format that is protocol independent and therefore possible to be mapped to the supported protocol specific events. | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
eventReceiver | string The eventReceiver string is matched to the value of the destinationMatch field of the eventReceiver provisioned earlier. | ||||||||||||||||||||||||
callbackSipFrom | string the SIP From header used for the voice call towards the device. | ||||||||||||||||||||||||
protocol | string Enum: "bs8521" "scaip" The alarm protocol to be used to send the event. | ||||||||||||||||||||||||
alarmVoiceCallbackDestination | string The destination address to do a voice callback to. Normally the alarm device. | ||||||||||||||||||||||||
password | string the password to use for SIP authentication. | ||||||||||||||||||||||||
destAddr | string The destination address for the alarmEvent, it must be a SIP URL of format sip:destination@domain. | ||||||||||||||||||||||||
username | string the username to use for SIP authentication. | ||||||||||||||||||||||||
defaultEmergencyDestination | string This parameter specifies the voice destination address in case of CRE61. Can be overriden when provisioning the alarmEventMapper. |
Responses
Request samples
- Payload
{- "traceId": "string",
- "sipFrom": "string",
- "toneHandler": "transparent",
- "toneSettings": {
- "calleeDtmfSendType": "2833",
- "callerDtmfSendType": "2833",
- "dtmfSendType": "2833"
}, - "protocolParameters": {
- "resendAlarmInterval": 0,
- "sendAlarmStringDelay": 0
}, - "alarmEvent": {
- "deviceType": "fixedTrigger",
- "controllerId": "string",
- "deviceComponent": "switch1",
- "systemConfig": "localUnitAndController",
- "location": "unknown",
- "callerId": "string",
- "eventType": "common",
- "audio": "none",
- "priority": 0,
- "deviceId": "string",
- "customerSiteId": "string",
- "statusCode": "normal"
}, - "eventReceiver": "string",
- "callbackSipFrom": "string",
- "protocol": "bs8521",
- "alarmVoiceCallbackDestination": "string",
- "password": "string",
- "destAddr": "string",
- "username": "string",
- "defaultEmergencyDestination": "string"
}
Response samples
- 200
{- "traceId": "string",
- "success": true,
- "sessionId": "string",
- "message": "string"
}
/alarmQueued
/alarmQueued callback is sent when an alarm event triggered by /sendalarmevent API where the sent event is acting as a group scheme. This will delay the /alarmSent calback until the subunit has been selected. The /alarmQueued callback is sent when the alarm event has been acked by the receiver.
Request Body schema: application/json
Callback sent by Alarmbridge service when a group scheme alarm event sent by calling the /sendalarmevent API have successfully been delivered and acknowledged by receiver and is waiting for a subunit to be selected.
sessionId | string The sessionId identifies the session |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
domain | string The customer domain handling the alarm event |
alarmString | string String representing the native event sent |
dialogId | string The dialogId for the underying media server session |
protocol | string Protocol used to sent alarm event |
callingParty | string The SIP user/phone number of the device sending the alarm event |
serviceProvider | string The SIP user/phone number of the target destination for the alarm event |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "ivrServer": "127.0.0.1",
- "domain": "customer.<region>.iotcomms.io",
- "alarmString": "A123456#",
- "dialogId": "06ae32d0-4b3a-11ee-8f58-c544331006b3",
- "protocol": "bs8521",
- "callingParty": "+46890510",
- "serviceProvider": "+46890511"
}
/alarmSent
/alarmSent callback is sent when an alarm event triggered by /sendalarmevent is acknowledged.
Request Body schema: application/json
Callback sent by Alarmbridge service when a alarm event sent by calling the /sendalarmevent API have successfully been delivered and acknowledged by receiver
sessionId | string The sessionId identifies the session |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
domain | string The customer domain handling the alarm event |
alarmString | string String representing the native event sent |
dialogId | string The dialogId for the underying media server session |
protocol | string Protocol used to sent alarm event |
callingParty | string The SIP user/phone number of the device sending the alarm event |
serviceProvider | string The SIP user/phone number of the target destination for the alarm event |
traceId | string The traceId is conveyed throughout the service and can be provided in the initial API-call. |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "ivrServer": "127.0.0.1",
- "domain": "customer.<region>.iotcomms.io",
- "alarmString": "A123456#",
- "dialogId": "06ae32d0-4b3a-11ee-8f58-c544331006b3",
- "protocol": "bs8521",
- "callingParty": "+46890510",
- "serviceProvider": "+46890511",
- "traceId": "9851cf70-1cc8-11ef-b3dd-9b598c1e38cf"
}
/alarmSendFailure
/alarmSendFailure callback is sent when an alarm event triggered by /sendalarmevent failed.
Request Body schema: application/json
Callback sent by Alarmbridge service in case it fail to deliver an alarm event that was sent by calling the /sendalarmevent
sessionId | string The sessionId identifies the session |
ivrServer | string The ivrServer is the IP address of the node that sends the command |
domain | string The customer domain handling the alarm event |
protocol | string Protocol used to sent alarm event |
warning | string Type of failure |
reason | string Indicates cause of failure |
callingParty | string The SIP user/phone number of the device sending the alarm event |
serviceProvider | string The SIP user/phone number of the target destination for the alarm event |
traceId | string The traceId is conveyed throughout the service and can be provided in the initial API-call. |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "ivrServer": "127.0.0.1",
- "domain": "customer.<region>.iotcomms.io",
- "protocol": "bs8521",
- "warning": "Failed to send alarm event",
- "reason": "noBS8521DataAckReceived",
- "callingParty": "+46890510",
- "serviceProvider": "+46890511",
- "traceId": "9851cf70-1cc8-11ef-b3dd-9b598c1e38cf"
}
/newAlarmbridgeEvent
/newAlarmbridgeEvent callback is sent when platform receives incoming alarm event.
Request Body schema: application/json
This callback is triggered when an alarm event is received from a remote device to an Alarmbridge service destination. It may either be an IP based protocol such as SCAIP or and analogue protocol such as BS8521.\n\nThe response to the callback request provides instruction to the Alarmbridge service how to further process the alarm session.\n\nThe object passed in the request body below is the default format. It is possible to customize the object properties and values sent per the information in the getting-started guide Alarmbridge custom event mappings.
sessionId | string The sessionId identifies the session | ||||||||||||||||||||
ivrServer | string The ivrServer is the IP address of the node that received the alarm event | ||||||||||||||||||||
customerSiteId | string If the Alarmbridge service destination is provisioned with customerSiteId property the it's value is copied to this property | ||||||||||||||||||||
domain | string The customer domain handling the alarm event | ||||||||||||||||||||
sourceAlarmProtocol | string Enum: "scaip" "bs8521" "tt92" "ttnew" "rb2000" The protocol that the incoming alarm event was decoded with sucessfully | ||||||||||||||||||||
targetAlarmProtocol | string Enum: "scaip" "bs8521" "tt92" "ttnew" "rb2000" The protocol that the alarmbridge service destination or device was provisioned to use for decoding of alarm event | ||||||||||||||||||||
sipFrom | string The user part from the SIP URI of the incoming alarm event, typically the calling party phone number for analogue alarm calls or the device SIP user for SCAIP events. | ||||||||||||||||||||
calledParty | string The user part from the request URI of the incoming alarm event, typically the called number for analogue alarm calls or the user part of SIP URI for SCAIP events. | ||||||||||||||||||||
object This property holds the alarm event that was received. It is a a format that is protocol independent and therefore possible to be mapped to the supported protocol specific events. | |||||||||||||||||||||
| |||||||||||||||||||||
sourceAlarmEvent | object JSON representation of the native event that triggered the event and which is converted into the common format. | ||||||||||||||||||||
replyId | string The replyId string is used in subsequent API call towards Alarmbridge service to identify the alarm handling session, for example when calling the /hangupalarmcall endpoint. |
Responses
Request samples
- Payload
{- "sessionId": "9bb07660-c747-11ea-afa0-bd07728b88b7",
- "ivrServer": "10.85.0.123",
- "customerSiteId": "site12",
- "domain": "customer.<region>.iotcomms.io",
- "sourceAlarmProtocol": "scaip",
- "targetAlarmProtocol": "scaip",
- "sipFrom": "+46890510",
- "calledParty": "alarm",
- "alarmEvent": {
- "eventType": "common",
- "deviceType": "activityDetector",
- "deviceComponent": "switch1",
- "statusCode": "absent",
- "location": "backDoor",
- "priority": 0,
- "controllerId": "string",
- "deviceId": "string",
- "audio": "none",
- "systemConfig": "localUnitAndController"
}, - "sourceAlarmEvent": { },
- "replyId": "string"
}
Response samples
- 200
{- "action": "drop"
}
/<domain_configured>
Request Body schema: application/json
Notifications sent by the Alarmbridge to indicate unexpected events.
type | string Enum: "alarmbridgeAuthError" "newAlarmbridgeEventError" "alarmbridgeCallFailure" The type of alarm event. The following types may be sent with the specified error types
|
domain | string The domain that triggered the alarm event |
sessionId | string The sessionId of the call that triggered the alarm event |
error | string Enum: "unprovisionedDevice" "unknownProtocol" "noEmergencyDestination" "invalidAction" "callSetupFailure" "unknown" The type of error that triggered the alarm event |
traceId | string The traceId is conveyed throughout the service and can be provided in the initial API-call. |
errorDetails | object Object with error specific details |
Responses
Request samples
- Payload
{- "type": "alarmbridgeAuthError",
- "domain": "customer.prod-eu-north-1.iotcomms.io",
- "sessionId": "8eaf1600-c20b-11eb-9fdb-f32f171bb218",
- "error": "unprovisionedDevice",
- "traceId": "9851cf70-1cc8-11ef-b3dd-9b598c1e38cf",
- "errorDetails": { }
}