Redis Notifications: C2D

Why Redis?

The Click2Dial and dialer uses Redis to send information back to the 3rd party application. In order to make a robust messaging system we make use of a Redis data/messaging structure to ensure critical information is sent correctly. We make use of Redis Lists for all our messaging between the Click2Dial and the 3rd party application.

Redis Lists are always populated using a push left pop right approach. Redis lists ensure the data stays persistent until it is pulled from the list. This means that the only way a message will not be delivered is if Redis DB crashes and a the record cannot be saved. In this case we have backup files which will push the message to Redis as soon as it is available again.

All data sent over Redis is JSON based

Port

Redis runs on port 6379, ideally this should be configurable

Notification Structure

Keys which are used to communicate information back to 3rd party applications.

 

Key Structure:

enigma:notifications[<:type>]

where items in “[]” are optional additions to the base key

  • brpop “enigma:notifications:cdr” will get all the List events for all the cdr's

 

 

Redis JSON Packet Structure
{type: <sub_type>, payload: {JSON payload}}
sub_typedepends on the type of the notification
inbound: sub_types

Receive a call

cdr: sub_types

cdr (end of call)