webrtcgw: initial implementation of push notifications framework
It uses Firebase's Cloud Messaging API.
Each account will be associated with a number of device tokens, which are used by Firebase
in order to send push notifications. There are 2 ways to set the device token for a given
account:
- using the 'account-devicetoken' command
- using the admin API (see below)
An admin HTTP API is provided to externally manage device tokens and to trigger push
notifications:
GET /tokens/alice@atlanta.net -> returns the list of device tokens
POST /tokens/alice@atlanta.net/jf03jd3pojd -> stores the given token
DELETE /tokens/alice@atlanta.net/jf03jd3pojd -> removes the given token
The next 2 API endpoints, used to trigger push notifications, require a JSON payload
with 2 keys: 'originator' and 'destination', indicating who originated the call and
to whom it was directed:
POST /incomming_session -> sends an 'Incoming session from XXX' push notification
POST /missed_session -> sends an 'Missed session from XXX' push notification