- Twilio Best Practices
- Tim Rogers
- 153字
- 2021-08-05 16:54:30
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
推薦閱讀