TwiML Message verb on incoming phone call

Does the Message verb not work for an incoming phone call? I have valid TwiML setup using the given template in the help text to the right of the screen. No matter what the message is never sent but when I add a Say verb it works just fine.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Message to="+15026090694"> Call from {{From}} </Message> </Response>
Best Answer
-
It does not work like that, no. There used to be an
<Sms>
verb for voice calls, but that was deprecated a long time ago. If you want to send a message during a voice call, you will need to do so using the REST API.
Answers
-
Thanks - I figured either Message only worked for SMS channels or had been deprecated. I settled for a basic Say verb instead. Was just hoping to get an automated SMS when a call was received since we rarely expected anyone to call so it would have been nice to get an alert. I'm sure a function or tapping into the REST API is the better solution. Thanks again!
-
Hey @kylegrussell, you could absolutely make this happen using the REST API in a Twilio Function. Let me know if you have a go at that and if I can be of any help at all?
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups