Using Twilio for Alarm Notifications

As an alternative to voice modems, VTScada supports the Twilio messaging system, enabling you to send spoken alarm notifications to operator's phones. At least one of your VTScada servers must have an Internet connection. VTScada supports signature validation of incoming HTTP requests from Twilio as described in Twilio.com's documentation.

VTScada must be able to receive status notifications directly from Twilio using the HTTPS protocol. Therefore, Twilio is an option only for sites that are able to allow Twilio to post HTTPS requests to the VTScada Thin Client Server with a fixed IP address or domain. (Connections are made in both directions.)

If the only outside connection to your server is via a VPN, then you cannot use Twilio to send alarm notifications.
Learn more about configuring your Thin Client Server in the topic, Thin Clients: Mobile and Internet

Microsoft does not permit Windows services to access SAPI (the built in Windows text-to-speech engine). This means that if you are using the VTScada Alarm Notification System and you configure your application to run as a Windows service, then outgoing alarm calls via voice modem are silent. VOIP and Twilio calls may work, but Microsoft is inconsistent with which versions of Windows will allow services to access SAPI. We cannot guarantee operation of VOIP when running VTScada as a service.

The current Alarm Notification server must be accessible from the Internet at the IP or domain specified in the Twilio settings. In a fully redundant system, this means that the Twilio settings must be workstation specific. Use the workstation selection tool in the Twilio Account Settings to choose the workstation you are configuring.

There is no requirement that the specified IP address be the current VTScada Thin Client Server or that the Alarm Server be on the Thin Client Server List.

The voice to be used by Twilio can be configured on a language-by-language basis using the #TwilioVoice setting in each languages *.csv file. The default is:

#TwilioVoice,alice

 

You will require a Twilio account. Obtain one from Twilio at https://www.twilio.com/try-twilio. Add the SID and the Auth Token for this account to the configuration of your application.

Enable Twilio

Select before proceeding with the following configuration options.

Workstation

Use when configuring systems that have multiple callback domains or Twilio accounts.
When using multiple alarm notification servers, with Twilio for voice alarm notification, each server requires its own fixed IP address or FQDN on the public Internet.

Twilio account SID

Your Twilio account identifier

Twilio auth token

Your authentication token, provided by Twilio.

Domain for Twilio verification

The domain, at which Twilio can reach your VTScada server. In most cases, this will be a direct connection to your secured server and will take the form "trihedral.com" for a domain of "https://www.trihedral.com".

Some sites make use of a secured proxy device that forwards connections to the VTScada server (secured or unsecured). In this case, the domain should be specified in the form "https://ProxyServer.com:123".

Twilio requires an HTTPS POST verification exchange with your site (either directly to the server or via a proxy). Your server must be visible to the Twilio server without the use of a VPN.

Realm for Twilio verification

The corresponding realm that you created for your application.

Do not use a realm defined for Realm Filtering.

If running multiple applications (for example, hosted systems) then you cannot share modems, SMS devices, or Twilio accounts between applications. You must have independent modems or Twilio accounts for each application.

To connect, send a message, and disconnect, VTScada must be able to receive status notifications from Twilio. These are sent via HTTPS, therefore you must configure a VTScada Thin Client Server and a Realm and secure that using an X.509 certificate. See: Configure a VTScada Thin Client Server and Configure a Realm.

Do not use a realm defined for Realm Filtering or a security account limited to such a realm.

Note that if an operator hangs up within one second of pressing 1 in the menu system, data related to the call progress that would normally be logged can be lost. There is no significant harm to this, because the end-of-call status can be inferred.

Multiple Twilio Numbers / Multiple Applications

You can register multiple numbers with one Twilio account to send texts and calls. But in order for a VTScada application to be able to receive incoming texts and calls from Twilio, it must provision a specific number. VTScada's ability to select which number to provision changed with release 12.1.40

Prior to 12.1.40, applications were provisioning with all available Twilio numbers but only using the first one in the list to call and text. That meant that if you had more than one Twilio number, any number after the first one was not used for outbound calls/texts. The result was that customers would need one Twilio account per VTScada application even if you had multiple registered numbers on that account.

Since 12.1.40, you can select which number you would like to use for both inbound and outbound texts/calls, leaving the other numbers available for other applications. This means that you can use a single Twilio account with multiple registered numbers on multiple applications if you have configured a unique number with each. The 'Registered Number' droplist in the Twilio Account Settings will be populated after valid credentials are provided and will be cleared if the credentials are no longer valid. A dialog will inform you if bad credentials are provided.

For backward compatibility, applications that are being updated from an older version will still provision with all Twilio numbers. Also, if a specific number is not selected, the application will provision with all numbers.

Troubleshooting

If operators have trouble verifying their ID with Twilio, use the following to diagnose the problem:

  • Ensure that the option, Speak digit after phone key press, is selected in the Alarm tab of the Application Configuration dialog. This provides an audible confirmation so that operators can know that each digit was indeed pressed.
  • For security purposes, key presses are masked in the Twilio logs unless the property TwilioShowCredentials is set to 1 (one) in the application. Set that property to 1 only while debugging a problem.
  • The Twilio logs are written once per day or after 1000 entries, whichever comes first. While troubleshooting, you can increase the frequency of logging intervals in order to check for problems more often. Refer to the properties, TwilioTraceInterval and TwilioTraceMax.