Twilio SMS
The Twilio SMS Integrated System enables PrismUI to communicate with mobile devices, applications, services, and systems using the Short Message Service (SMS).
Definitions
Short Message Service (SMS) — A text messaging service component used to exchange short text messages between devices.
Setup
See the Data Servers page for information on configuring driver communication.
Compatibility
The Twilio SMS integrated system is compatible with the cloud hosted API client.
Prerequisites
Software | Minimum Version |
---|---|
.NET Framework | 4.7.2 |
IPFusion — Twilio SMS | 1.3 |
When completing your setup, be sure to have the Twilio SMS documentation available for reference.
Ports
These ports must be open in your network firewall for the integration to work.
Purpose | Default Value | Configurable |
---|---|---|
Dataserver | 9622 | Yes |
Debug Tools | 9623 | No |
Twilio Account Type
Trial Account
- When you send an SMS from your free trial phone number, it will always begin with Sent from a Twilio trial account. The message is removed after you upgrade.
- One Twilio number is allowed per trial account.
- While in trial mode, you can only send messages to non-Twilio phone
numbers that you have verified with Twilio.
Note: You can still receive messages from unverified numbers.
- Twilio gives you a small preloaded balance to test out their functionality. You will not be charged for Twilio phone numbers or usage until you upgrade.
Full Account
Once a trial account is upgraded, the limitations of the trial account are removed.
Disable Automated SMS Responses
Active Numbers are configured to automatically reply to messages that are sent to the Active Number. To disable the automatic reply:
- Navigate to the Active Numbers page in your desired project.
- It should show the Number, Friendly Name, Capabilities, and Configuration for your number. The Configuration should show the messaging is configured to respond with https://demo.twilio.com/welcome/sms/reply/. This can be changed to respond with another message or disabled entirely. For our purposes we will disable it.
- Select the number to activate its properties.
- Navigate to Messaging. Here we see three fields: Configure With, A Message Comes In, and Primary Handler Fails. Notice that the A Message Comes In field is populated with the response described earlier.
- Change the field type from Webhook to TwiML Bin.
- Select the plug icon beside the empty field. This will allow you to customize the response.
- Add
<Response></Response>
to the body. - Add a friendly name such as No Response. Create the new TwiML Bin.
- Click Save.
Communication Configuration
Information about the SMS is required in order for a Workstation to connect to the Twilio services. In the Integrated System configuration panel enter the below Communication Settings:
Account Security Identifier | Acts as a username, learn more at Twilio Help Center. |
Authentication Token | Acts as a password, learn more at Twilio Help Center. |
Assets
Phone Asset
This asset represents the connection between a source phone number and the destination an SMS message is being sent to.
Required Property Grid Fields
External Phone Number | The phone number the SMS message is being sent to. |
Twilio Phone Number | The Twilio phone number the message is being sent from. |
Supported States
Normal | The asset is online and in its default state. |
Masked | The asset has been masked over its true state. |
Fault | An issue has been detected in a connected asset. |
Acknowledged | An asset alarm has been acknowledged. |
No Communication | Communication has been lost with the driver or asset. This status can
also occur if the communication configuration for the system or asset is
invalid. Note: This status is required in all status
tables.
|
See the Configure a Status Table page for more information on configuring status tables.
Supported Commands
Send Message | Sends a user-defined message from the Twilio number to the external phone number. |
Mask | Mask the asset's true state. |
Acknowledge | Acknowledge an asset alarm. |
Reset | Resets the asset to its true hardware state. |
Cancel | Deselects all selected assets. |
See the Command Tables page for more information on configuring command tables.
System Asset
This asset represents the connection state of the Twilio SMS system.
Supported States
Normal | The asset is online and in its default state. |
Masked | The asset has been masked over its true state. |
Fault | An issue has been detected in a connected asset. |
Acknowledged | An asset alarm has been acknowledged. |
No Communication | Communication has been lost with the driver or asset. This status can
also occur if the communication configuration for the system or asset is
invalid. Note: This status is required in all status
tables.
|
See the Configure a Status Table page for more information on configuring status tables.
Supported Commands
Mask | Mask the asset's true state. |
Acknowledge | Acknowledge an asset alarm. |
Reset | Resets the asset to its true hardware state. |
Cancel | Deselects all selected assets. |
See the Command Tables page for more information on configuring command tables.
Workflow Integration
System Commands
System commands are commands executed through Workflows at the system level. For more information about Workflows, see the Workflows section.
Send Message Command
The Send Message command is used to send text messages from a local phone number to an external phone number.
Message Content | The body of the message that is being sent. |
Destination Number | The phone number of the device that is receiving the message. |
Source Phone Number | The Twilio phone number that is sending the message. |
If a message fails to send, it will attempt to resend the message after five seconds. If the message fails to send for a second time, the command will terminate.
System Events
System events are events used to trigger Workflow actions at the system level. For more information about Workflows, see the Workflows section.
Message Received
The Message Received event is triggered when a message is received by Twilio.
Source Phone Number | The phone number Twilio received a message from. |
Destination Phone Number | The Twilio phone number which the message was sent to. |
Message Content | The body of the message that was sent. |
Received Timestamp | The time the message was received by Twilio. |
Asset Events
Asset events are events used to trigger Workflow actions at the asset level. For more information about Workflows, see the Workflows section.
Message Received from External Number
This event is triggered when a message is received by Twilio from the external number associated with the triggering phone asset.
Message Content | The body of the message that was sent. |
Received Timestamp | The time the message was received by Twilio. |
Troubleshooting
Logs from the driver and Runtime can be viewed in the Debug Tools client. These messages contain information which can provide further context for issues during initialization, or while actively running. This can help diagnose problems.