AvgJoe007
AvgJoe007

Reputation: 43

Twilio IVR query

We are building a little app that uses IVR and we want to use Twilio for this. The app deals with restaurant bookings. However, we're having issues with a specific user scenario:

  1. The user gets a phonecall from Twilio to confirm booking The user is prompted to press '1' to cancel the booking.
  2. This information is then sent back to our servers to action that booking.

Our issue is that we don't know which booking to update on the server end, as we're not sure how to embed some sort of uniqueID (like our transactionID) into the whole call setup.

Is this possible - we've looked through the docs but may be missing something obvious...

Thanks in advance

Upvotes: 0

Views: 123

Answers (1)

rubai
rubai

Reputation: 81

During creating the gather XML, you can add the uniqueID into the action url.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Gather action="/order_finalize.php?uniqueID=555" method="GET">
        <Say>Press 1 for confirm or press 2 for cancel the order.</Say>
    </Gather>
</Response>

So once user submitted his input this request will submitted something like this

http://yourserver.com/order_finalize.php?uniqueID=555&Digits=1

Upvotes: 1

Related Questions