A Graphical User Interface (GUI) for sipgate.io as Node-RED moduleRead time 4 minutes
//a workshop focus
One of Automat Berlin’s focal points is developing open-source based graphical extensions of Communications Platform as a Service (CPaaS) Application Programming Interfaces (APIs) for faster use case prototyping. We briefly introduced the graphical wiring tool Node-RED already.
In the following, we explain our first open-source contribution in the area of simplified CPaaS consumption. We have developed a module for the wiring tool Node-RED as introduced in our previous post. It should help to create value-added services on top of sipgate.io - the Application Programming Interface (API) sipgate offers to all of their customers.
Node-RED for CPaaS development
Node-RED’s wiring capabilities are used to act as a graphical user interface (GUI) for the Automat adapter connecting to the sipgate.io API. The integration with sipgate is exemplary; the modular Automat adapter concept is aiming to support various CPaaS platforms and significant open-source communications stacks in the future.
sipgate is a Voice over IP (VoIP) provider in Germany and the UK. Their products focus on both consumers as well as business customers. While business customers have access to a tailored service portfolio on top of the sipgate core infrastructure, residential customers have only access to a very generic set of features.
The very basic features that sipgate provides are telephone numbers and the possibility to make and receive telephone calls. Their customers usually connect their Session Initiation Protocol (SIP) capable clients/servers to their infrastructure. Various value-added service features such as voicemail can be booked via the company’s feature store.
A hidden gem of the features one can add is access to an API product called sipgate.io, where customers can manipulate calls and account features, amongst others.
This API is easy to consume for knowledgable developers with experiences both server-side scripting and telecoms flows. It is, however, not very consumer-friendly.
We use Node-RED to create flows with Action attributes for inbound/outbound calls graphically and connect them to dynamically create XML that interacts with the sipgate API. Our contribution should make the API consumptions significantly easier for consumers and is explained in the following.
This integration has not been endorsed by sipgate or any of its affiliates. It serves as a reference project to Automat Berlin.
The initial focus has been given to implementing the Actions of the Push API, i.e., manipulating incoming or outgoing calls before they are connected to the respective party. Some Real-Time Call Manipulation (RTCM) API features have also been implemented (e.g., terminating an ongoing call), but not given preference.
Within the sipgate.io front-end, the Node-RED server and webhook endpoint from our module need to be specified. This enables the simple integration of Push API Actions into Node-RED for execution after receiving HTTP POST webhooks.
The following Action attributes are available as nodes:
DIAL: Send a call to a voicemail or external number
PLAY: Play a sound file
GATHER: Collect digits that a caller enters with the telephone keypad
REJECT: Reject a call or pretend to be busy
HANGUP: Hang up a call
Most of the nodes have configuration parameters. Some of them have flexible outputs depending on their configuration.
Besides singular nodes, some nesting for everyday use cases has been implemented (e.g., playing an audio file while gathering inputs). The sample RTCM method
hangup-call is made available also.
The source code is available on our Github page.
We begin with the sample use case of creating an Interactive Voice Response (IVR) service. It asks a caller for specifying which member of a family (that hosts their home phone number with sipgate) to call and route the call accordingly.
In the sipgate.io portal, the inbound URL for the respective number is set to the specified
baseUrl with the path of the
webhook node appended.
The flow consists of nodes from our module (
dial), as well as default Node-RED nodes (
input node is used to specify the path of the webhook URL that is configured with sipgate.io.
gather node is configured to play a voice prompt that has been created using Google Cloud Platform (GCP) APIs. The node is configured to collect a single digit within 20s.
The input of the calling party is passed to the
switch node. Depending on the value, the correct output is selected, and the respective family member is called.
dial node connects both parties.
It is planned to not only make direct API access available but also integrate the Automat adapters with service enablers. This module is going to be extended to contain Text-To-Speech (TTS) service integration so that voice prompts do not need to be created and hosted manually but as part of this implementation.
If you would like to contribute, you are more than welcome. Have a look at our contributing guidelines or get in touch.