Twilio to post gather digits with other details

独自空忆成欢 提交于 2019-12-11 03:10:51

问题


Can I send additional data with the gather digits by twilio. I am trying to achieve is if someone sends a text saying HELP , we would call a support team and ask them that we have received the text message and if they want to talk to then press 1, and if they press 1 we will be able to call to the number from we have received the text message.

I was checking the twilio example and it sends the POST with the gather digits , can I post additional details , so a call will be made

<Response>
     <Gather numDigits="1" action="callback.php" method="POST">//I would like to send phone number to be called in this post request
        <Say>We have received a text for help ,to speak with the person  press 1. </Say>
    </Gather>
</Response> 

回答1:


Twilio evangelist here.

You can pass more data as querystring parameters in the action url:

<Response>
    <Gather numDigits="1" action="callback.php?phone=15555555555" method="POST">
        <Say>We have received a text for help ,to speak with the person  press 1.</Say>
    </Gather>
</Response> 

Hope that helps.



来源:https://stackoverflow.com/questions/42566096/twilio-to-post-gather-digits-with-other-details

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!