-
-
Notifications
You must be signed in to change notification settings - Fork 10
Twilio Integration
Stephen Yeargin edited this page Oct 2, 2022
·
2 revisions
Requires the TWILIO_DSN
environment variable to be set.
TWILIO_DSN=twilio://SID:TOKEN@default?from=FROM
After ensuring that outbound texts are ready, you will want to register an incoming Message handler. You can get the authenticated URL via the app:sms:webhook
console command.
$ bin/console app:sms:webhook
[INFO] Your SMS webhook token is:
123abcdeadbeef
Your webhook URL is:
https://member-directory.wip/webhook/sms-service?token=123abcdeadbeef
Note: If you update your TWILIO_DSN
, you must also update the webhook token.
If you want the application to handle voicemail for your Twilio phone number, configure the phone service webhook. You can get the authenticated URL via the app:phone:webhook
console command.
$ bin/console app:phone:webhook
[INFO] Your Phone webhook token is:
123abcdeadbeef
Your webhook URL is:
https://member-directory.wip/webhook/phone-service?token=123abcdeadbeef
Note: If you update your TWILIO_DSN
, you must also update the webhook token.
There are three additional environment variables for customizing the voice message. The APP_VOICEMAIL_MESSAGE
is the text-to-speech that is read when the call is answered.
APP_VOICEMAIL_MESSAGE="Thank you for calling. At the tone, please leave a message."
APP_VOICEMAIL_VOICE=male
APP_VOICEMAIL_LANGUAGE=en