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>


Tagged:

Best Answer

  • pnash
    pnash mod
    Accepted 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?

If this is an emergency, please contact Twilio Support. This is not an official Support channel. https://support.twilio.com/
Have an urgent question?
Please contact Twilio Support. This is not an official Support channel.
Contact Support