How can I use starting and ending numbers to loop through fields saving the input to an array in VXML with or without PHP?
Psuedo code would be something like:
get startNo from caller
get endNo from caller
loop i from startNo to endNo
audio prompt 'prompt' + i + '.wav'
save input to results[i]
end loop
save results to database at end of loop or upon hangup
I know how to get the starting and ending numbers and how to save to the database, it is the loop that I'm not sure on.
Requirements / other notes:
- A mix of VXML and PHP is fine, but I would prefer to keep most VXML in .VXML files to keep code completion in my editor
- There could be up to 50 prompts (as required by business, don't ask me to redesign that)
- The solution has to support the hangup event so if the connection is lost mid-way we can save the results that were gathered
- Vendor-independent, VoiceXML 2.1 compliant