I’m trying to use IVR Studio to create a simple application to retrieve a 4 digit pin number from the caller, and then have those digits sent to a web server, via an HTTP request. Thus far, I have entered the prompts, and collected a 4 digit pin using IVR Studio. After retrieving the pin number, I can set the Action to HTTP request, but I don’t know how to send the pin number within the query string to my web server script.
Is there a variable for the pin number that I can pass to my script?
First, the related to sample is 24-Hour Information Hotline. You can open the sample from the program main menu under library.
Second, please take a look at the description of this sample.
Take a look at the HTTP action of element labeled Information. Within that action, you can define the URL of the HTTP post target, and all the parameters for that post. In the sample we have a parameter “action”, and its value is “info24″. So all you need to do is to have an HTTP action defined, and set the value to the pin number you collected. (You can save the pin number in a variable, and use that variable as the value for the parameter)
Once I prompt the user to enter a pin number via touchtone, how do I capture
their input into a variable that I can pass in a POST request?
On the root element, create a new variable such as customer_pin.
You use a Digits Element to capture the pin, then set an action on its child element to save the last input. The action should be “Set Variable Value” type. From the Set Variable dialog window, select variable customer_pin. The value of the variable should be system variable “__VG__LAST__RESULT__”. This value can be selected on the dropdown box to the right of the Add Variable button.
You can then use the variable customer_pin in your POST action.