Introduction
Having decided to extend this extension i thought i would make changes early and create an entire new extension.
Driven by the recent discussions on 2FA i decided to extend the options we already have of email and SMS to include voice messages
So building on my former Twilio SMS extension i have also added voice to the component.
In addition to adding voice messages i have also improved the extensions to allow them to run correctly via localhost (bypassing certificate errors) and i have amended the Check status component to be compatible with both SMS and voice.
I will be withdrawing the former send SMS extension.
Installation
Install via the Wappler installer in the project settings
Be aware that there may be some issues with auto installing dependencies on the PHP platform (wappler issue) , if so run the following composer command IN THE WEB ROOT (i.e. cd www first)
composer require twilio/sdk
In such a case it will probably also be necessary to uplaod the "vendor" folder.
The Components
Three components are installed into the "Notification Modules" group.
Credentials need to be added to environment variables via the workflows setup screen
These settings are the account SID, Auth Token and optionally your Twilio outgoing number which can be found in your account settings:
The interface for the SMS and Voice messages are identical. I use sending a 2FA code in this example. It the outgoing number is omitted, then the extension will look for a number in teh ENV variables.
SMS example
Voice example
Delivery Checks
The status of the messages can be checked via the message Sid using the Get Message Status component. This component works for both SMS and Voice.
Status' can be found in the Twilio documentation.
I have also added a simple formatter called "Stuff String with Spaces" which can be found at the very end of the "text" group.
When sending a numeric code such as 1234 via voice, it is announced as "One Thousand three hundred and thirty four".
The function adds a space between each character i.e. "`1 2 3 4" so it is correctly announced.







