Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KZOO-46: Add Emergency Notification for E911 Compliance (#6443)
This PR adds new functionality to help facilitate compliance with Kari's Law and notification for when an emergency call is placed. An email contact list can now be set on a phone numbers emergency metadata. Notification can now be achieved one of several ways: * A new amqp event, `emergency_bridge` has been added to `kapi_notifications` to trigger a teletype notification email when an emergency call is placed. * A new dedicated emergency bridge webhook can be configured * Adds new text and html teletype templates * Adds new teletype module to render template * Template will distinguish between Emergency and test calls * Creates a new amqp definition ing `kapi_notifications` for usage when an emergency call is attempted. * Publish callback as been added to `cb_notifications` * Set emergency location data as well as user and device metadata * Publishes `emergency_bridge` message when stepswitch determines an emergency call is being attempted * Adds a new test rules object a resource to define test patterns for a resource to help differentiate between emergency and test calls.
- Loading branch information
1 parent
d73820e
commit 0e7e374
Showing
30 changed files
with
992 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
applications/crossbar/priv/couchdb/schemas/kapi.notifications.emergency_bridge.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "kapi.notifications.emergency_bridge", | ||
"description": "AMQP API for notifications.emergency_bridge", | ||
"properties": { | ||
"Account-DB": { | ||
"type": "string" | ||
}, | ||
"Account-ID": { | ||
"type": "string" | ||
}, | ||
"Account-Name": { | ||
"type": "string" | ||
}, | ||
"Attachment-URL": { | ||
"type": "string" | ||
}, | ||
"Authorizing-ID": { | ||
"type": "string" | ||
}, | ||
"Bcc": { | ||
"type": "string" | ||
}, | ||
"Call-ID": { | ||
"type": "string" | ||
}, | ||
"Cc": { | ||
"type": "string" | ||
}, | ||
"Device-ID": { | ||
"type": "string" | ||
}, | ||
"Device-Name": { | ||
"type": "string" | ||
}, | ||
"Device-Owner-ID": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-City": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-Latitude": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-Longitude": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-Postal-Code": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-Region": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-Street-1": { | ||
"type": "string" | ||
}, | ||
"Emergency-Address-Street-2": { | ||
"type": "string" | ||
}, | ||
"Emergency-Caller-ID-Name": { | ||
"type": "string" | ||
}, | ||
"Emergency-Caller-ID-Number": { | ||
"type": "string" | ||
}, | ||
"Emergency-Notfication-Contact-Emails": { | ||
"type": "string" | ||
}, | ||
"Emergency-Test-Call": { | ||
"type": "string" | ||
}, | ||
"Emergency-To-DID": { | ||
"type": "string" | ||
}, | ||
"Event-Category": { | ||
"enum": [ | ||
"notification" | ||
], | ||
"type": "string" | ||
}, | ||
"Event-Name": { | ||
"enum": [ | ||
"emergency_bridge" | ||
], | ||
"type": "string" | ||
}, | ||
"From": { | ||
"type": "string" | ||
}, | ||
"HTML": { | ||
"type": "string" | ||
}, | ||
"Outbound-Caller-ID-Name": { | ||
"type": "string" | ||
}, | ||
"Outbound-Caller-ID-Number": { | ||
"type": "string" | ||
}, | ||
"Owner-ID": { | ||
"type": "string" | ||
}, | ||
"Preview": { | ||
"type": "boolean" | ||
}, | ||
"Realm": { | ||
"type": "string" | ||
}, | ||
"Reply-To": { | ||
"type": "string" | ||
}, | ||
"Subject": { | ||
"type": "string" | ||
}, | ||
"Text": { | ||
"type": "string" | ||
}, | ||
"To": { | ||
"type": "string" | ||
}, | ||
"User-Email": { | ||
"type": "string" | ||
}, | ||
"User-First-Name": { | ||
"type": "string" | ||
}, | ||
"User-Last-Name": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Account-ID", | ||
"Call-ID" | ||
], | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.