Twilio¶
The Twilio modules allow you to watch, create, update, list, and/or delete messages, recordings, notifications, and phone numbers in your Twilio account.
Prerequisites
-
Account SID and Auth Token
-
Upgraded Twilio account
-
Twilio phone number
In order to use Twilio with Ibexa Connect, it is necessary to have a Twilio account. If you do not have one, you can create a Twilio account at https://www.twilio.com/try-twilio.
Note
The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!
Connecting Twilio to Ibexa Connect¶
To connect your Twilio account to Ibexa Connect, you need to obtain your SID and Auth Token.
-
Log into your Twilio Account.
-
On the Dashboard page, you can find ACCOUNT SID and AUTH TOKEN.
-
Go to Ibexa Connect and open the Twilio module's Create a connection dialog.
-
Enter the SID and Auth Token provided in step 2 to respective fields.
-
Click the Continue button.
The connection has been established.
Messages¶
Watch Messages¶
Retrieves message details when a new message is created.
To phone number | Enter the phone number to Filter messages sent to the specified number. |
From phone number | Enter the phone number or sender ID to filter messages received from the specified number. |
Limit | Set the maximum number of messages Ibexa Connect will return during one execution cycle. |
Create a Message¶
Sends a new outgoing message.
Send a Message From |
Enter a Twilio phone number in E.164 format, an alphanumeric sender ID, messaging service or a Channel Endpoint address that is enabled for the type of message you want to send. Phone numbers or short codes purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using |
Phone Number/Message service/Channel |
Enter or select phone number, message service, or channel you want to associate the sent message to. |
To |
Enter the destination phone number in E.164 format for SMS/MMS or Channel user address for other 3rd-party channels. |
Body |
Enter the text of the message you want to send. Max. 1,600 characters. |
Media URL |
The URL of the media to send with the message. The media can be of type You can include up to 10 media URLs. You can send images in an SMS message only in the US and Canada. |
Smart Encoded |
Select the Yes option to detect and replace Unicode characters that have a similar GSM-7 character. |
Validity Period |
Set how long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. |
Status Callback |
Insert the URL from the New Message Status Event instant trigger module to send status information to the module. If specified, we POST these message status changes to the URL: |
Application |
Select the application that should receive message status. We POST a |
Max Price |
The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds |
Provide Feedback |
Whether to confirm delivery of the message. Select |
List Messages¶
Retrieves a list of messages associated with your account.
To phone number | Enter the phone number to Filter messages sent to the specified number. |
From phone number | Enter the phone number or sender ID to filter messages received from the specified number. |
Limit | Set the maximum number of messages Ibexa Connect will return during one execution cycle. |
Get a Message¶
Retrieves message details.
Message ID | Enter (map) the ID of the message you want to retrieve details about. |
Delete a Message¶
Deletes a message.
Message ID | Enter (map) the ID of the message you want to delete. |
List Message Media¶
If media exists on a specified message, you can retrieve information about images and other media.
Message ID | Enter (map) the ID of the message you want to retrieve media from. |
Calls¶
Watch Calls¶
Retrieves call details when a new call is created.
To phone number | Enter the phone number to filter calls made to this phone number, SIP address, Client identifier or SIM SID. |
From phone number | Enter the phone number, SIP address, Client identifier or SIM SID to filter calls by. |
Parent Call SID | Enter the SID to filter calls by. |
Status | Select the status to filter calls by. |
Limit | Set the maximum number of calls Ibexa Connect will return during one execution cycle. |
Create a Call¶
Makes a new call to a phone number, SIP address, or client identifier.
Make a Call From |
The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified outgoing caller id for your account. If the |
Phone Number/Outgoing Caller |
Enter or select the phone number, or outgoing caller you want to associate the call to. |
To |
Enter the phone number, SIP address, or client identifier to call. |
Set Instructions From |
Select the source of instructions for the call. |
URL |
|
Twiml |
Enter TwiML (Twilio Markup Language) instructions for the call Twilio will use without fetching Twiml from url parameter. For more information about TwiML please refer to the Twilio documentation. |
Application |
The SID of the Application resource that will handle the call. |
BYOC |
Enter the SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that |
Send Digits |
A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit ( |
Timeout |
The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is |
Trim |
Select whether to trim any leading and trailing silence from the recording. |
Caller ID |
Enter the phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as |
SIP Call Authentication |
|
Recording |
Select whether to record the call. Can be
|
Enable Machine Detection |
Select whether to detect if a human, answering machine, or fax has picked up the call.
|
Answering Machine Detection |
Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed.
|
List Calls¶
Retrieves a list of calls associated with your account.
To phone number | Enter the phone number, SIP address, Client identifier or SIM SID to filter results by. |
From phone number | Enter the phone number or Sender ID to filter calls from the specified number. |
Parent Call SID | Filter calls spawned by calls with this SID. |
Status | Select the status of the call to filter results by. |
Limit | Set the maximum number of calls Ibexa Connect will return during one execution cycle. |
Get a Call¶
Retrieves call details.
Call ID (SID) | Enter (map) the ID of the call you want to retrieve details about. |
Delete a Call¶
Deletes a call.
Call ID (SID) | Enter (map) the ID of the call you want to delete. |
Recordings¶
Watch Recordings¶
Returns recording details when a new recording is created.
Call ID (SID) | Enter (map) the ID of the call you want to filter retrieved recordings from. |
Conference ID | Enter (map) the ID of the conference you want to filter retrieved recordings from. |
Limit | Set the maximum number of recordings Ibexa Connect will return during one execution cycle. |
Download a Recording Media¶
Downloads a recording media file in wav or mp3 format.
Recording ID |
Enter (map) the ID of the recording you want to download. |
Format |
Select the format of the media file you want to download.
|
List Recording Transcriptions¶
Retrieves transcriptions generated from the recording (if any). The transcription text itself is the result of converting an audio recording to readable text.
Recording ID | Enter (map) the ID of the recording you want to retrieve the transcription for. |
Limit | Set the maximum number of transcriptions Ibexa Connect will return during one execution cycle. |
Transcriptions¶
Watch Transcriptions¶
Retrieves a transcription when a new transcription is created in your account.
Limit | Set the maximum number of transcriptions Ibexa Connect will return during one execution cycle. |
Notifications¶
Watch Alerts¶
Returns an alert when a new alert is generated for an account.
Log Level |
Filter the monitored alerts by the log level. |
||
Start Date |
Filter alerts that occurred on or after this date and time. Specify the date and time in GMT and format as | Queries for alerts older than 30 days are not supported. |
End Date
Filter alerts that occurred on or before this date and time. Specify the date and time in GMT and format as YYYY-MM-DD
or YYYY-MM-DDThh:mm:ssZ
.
Note
Queries for alerts older than 30 days are not supported.
Limit
Set the maximum number of alerts Ibexa Connect will return during one execution cycle.
Callback Webhooks¶
New Message Status Event¶
Triggers when a message status is changed to: queued
, failed
, sent
, delivered
, or undelivered
.
-
Add the module to the scenario.
-
Copy the provided webhook URL.
-
Insert the copied URL to the Status Callback field in the Create a Message module.
Make an API Call¶
Allows you to perform a custom API call.
URL |
Enter a path relative to For the list of available endpoints, refer to the Twilio API Documentation. |
Method |
Select the HTTP method you want to use: GET to retrieve information for an entry. POST to create a new entry. PUT to update/replace an existing entry. PATCH to make a partial entry update. DELETE to delete an entry. |
Headers |
Enter the desired request headers. You don't have to add authorization headers; we already did that for you. |
Query String |
Enter the request query string. |
Body |
Enter the body content for your API call. |
Example of Use - List Messages¶
The following API call returns the SMS messages from your Twilio account:
URL:
2010-04-01/Accounts/{{accountSid}}/Messages.json
accountSid | The SID of the account that created the Message resources to read. |
Method:
GET
Matches of the search can be found in the module's Output under Bundle > Body > messages.
In our example, 2 messages were returned: