Issue
Currently, I making a call using Twilio with their REST API using the Twilio php helper library, I'm dialing the a Twilio number which have a Voice URL setup, in this case, I need to send some parameters to that URL from the REST API call which I can't for the moment, because the URL is set on the Twilio console and I need to sent some user data based on the call, but I haven't seen anything that allows me to do that, in the documentation it's not saying anything about that, it's possible to achieve that?
Thank you beforehand
Solution
Twilio developer evangelist here.
You can set parameters in the Voice URL in the Twilio dashboard using URL parameters. For example, if you set the URL to be http://example.com/voice?foo=bar then you should be able to extract bar
with $_REQUEST['foo']
.
Twilio also sends a number of parameters to your URL with an incoming call, including the number that was dialled (useful if you have multiple incoming numbers), the number dialled from and many more. You should be able to use the information in the request from Twilio to choose where to dial your call onto. For example, if you are expecting a call from a particular number and you know you want to forward that call onto a different number, you can setup a conditional based on the From
parameter.
Let me know if that helps at all.
Answered By - philnash Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.