IBM i Signal Messenger Integration

Signal Messenger is very popular these days as more and more users are switching to the most secure mobile communication apps as noted by security experts.  So it is a great moment to write about our generic modular signaling service within Green Screens Terminal Service v5 which allows integration with various mobile messenger apps allowing easy B2B or B2C integrations.

Having an easy way to send mobile messages directly from your bellowed IBM i to mobile phones without need to install anything on IBM i itself is what makes a big advantage to our Green Screens Terminal Services.

Mobile messaging features itself open all new kinds of possibilities as for example, mobile notification messages to your customers directly from IBM i or to field workers. Only limit to how this feature can be used is your imagination.

Great advantage of Signal Messenger except being completely open-sourced, it's API for messaging is free. Does not require complex registration procedures and it is not limited to send messages only, but to receive also which adds another level of integration and automation possibilities.

Green Screens Messaging module is a generic framework embedded into Green Screens Terminal Service through JMX channels which allows using multiple different providers which are self-discoverable as soon as a new module is installed into Green Screens Terminal service.

As Signal Messenger popularity exploded in the last few weeks, we decided to create a free Signal Messenger Module as part of an extra pack for our latest Green Screens Terminal Services Release v5 (2021).

Base version allows interactive integration from web based terminal session, but not limited to. For security reasons, web based pure API is disabled, however it can be customized to client needs. When a standard web-based REST API is enabled,  it is possible to send mobile messages from IBM i batch process also.

For the end, let us show you simple code examples to integrate mobile notifications.

Examples CL/RPG

To send mobile messages to the user, it is enough to use STRPCCMD directly from the command line or from the CL program as shown in example below.

PGM
MONMSG CPF0000
STRPCO
STRPCCMD PCCMD('sgnl:+3859....@helloworld') PAUSE(*NO)
ENDPGM

Examples (WEB)

Simple web terminal scripts that can be used to integrate highly customizable 5250 web terminal to mobile notifications.

// Create instance of registered account (mobile phone number)
var account = Tn5250.Messenger('+38591.....');

// do something with received mobile message
account.on('message', (o) => {
   let msg = `Message from :${o.name || o.sender} <br>=> ${o.message}`;
   Tn5250.Dialogs.notify(msg);
});

// send message to registered group
account.send('GSTS.0.DEMO', 'Hello from terminal!', (o) => {console.log(o)});

// watch for messages arriving to registered group
account.watch('GSTS.0.DEMO', (o) => {console.log(o)});

// send self note message to other linked devices
account.send('self', 'Hello from terminal!', (o) => {console.log(o)});

// watch for messages arriving from self (other linked devices)
account.watch('self', (o) => {console.log(o)});

// send message to one of contacts
account.send('+385....', 'Hello from terminal!', (o) => {console.log(o)});

// watch for messages arriving from selected contact
account.watch('+385....', (o) => {console.log(o)});