Robert Sinclair
Robert Sinclair

Reputation: 5416

The phone number in 'Dial' is not shown in output file

I have the following xml

<Dial timeout="10" action="file.php" method="POST">211</Dial>

which dials the hypothetical 211 to try and connect the caller with 211.

When I read what was sent via $_POST, there's no mention of 211.. Why is that?

Not using Twilio client.

Upvotes: 0

Views: 33

Answers (1)

philnash
philnash

Reputation: 73057

Twilio developer evangelist here.

I'm guessing you are returning that TwiML, the <Dial> (within a <Response> I hope) when someone calls your Twilio number and Twilio sends a webhook to your application.

I'm not sure where you are looking for the number, 211, in the $_POST object. If it is when Twilio sends the webhook to you then this is before you have told Twilio you want to dial 211 and so Twilio doesn't know anything about it yet. If you are looking for all the parameters that Twilio sends to you in that webhook, check out this article in the docs on Twilio's request to your application in a voice call.

Are there other POST requests that Twilio is making to your application where you are expecting to see this number?

Upvotes: 1

Related Questions