官术网_书友最值得收藏!

Digging deeper – Twilio's requests

In the preceding example, you've seen that Twilio includes some helpful data in its request when it hits your server to fetch the TwiML it needs in order to handle an incoming call or message.

We pulled out the country where the caller is located, which is stored in the FromCountry parameter. We grabbed this in PHP using $_GET, but you can do the same in any web language.

Alongside the caller's location, Twilio includes a whole lot of useful information.

Here are the highlights:

This data, which Twilio provides, can help you implement a wide range of dynamic features into your TwiML, such as the following:

  • Changing how the call is handled depending on the number being called
  • Switching languages based on the location of the caller
  • Responding to what someone actually said in an SMS

Note

Further details are available in Twilio's comprehensive documentation at

https://www.twilio.com/docs/api/twiml/twilio_request

主站蜘蛛池模板: 四川省| 泰安市| 岳西县| 赤水市| 开化县| 福贡县| 漳浦县| 千阳县| 娄烦县| 武夷山市| 绵竹市| 加查县| 伊宁县| 固安县| 龙海市| 达州市| 天峻县| 游戏| 辽中县| 海林市| 长乐市| 高州市| 遂平县| 花垣县| 江永县| 牟定县| 慈利县| 望奎县| 台南县| 崇文区| 临洮县| 女性| 阳山县| 庆安县| 白水县| 钟山县| 邯郸市| 平原县| 苏尼特左旗| 龙岩市| 塘沽区|