Multi IVR input into 1 single string

I have a IVR i’m creating that i’d like to collect several inputs into (up to 10) a single string. I’m stuck on how to attempt this. I think I can use the array command but I’m not sure exactly how to write it out.

Basically the user would get a prompt that says something like "please enter your numbers"
They enter 01
it accepts it and says please enter your next number
they enter 02
etc… up to 10 #'s

They can end the entry any time by pressing *

The end result would be a single string of characters that say something like 01@02@03 etc…

Oh and they cant enter duplicates…

I’m thinking I’m going to have to do this in two macros of sorts… the 1st one collects the digit and then calls out to another macro to check and see if it’s already been entered…

I would assume I can use astdb to store the data as I’m building it?

I really dont want to use an agi script because I’m trying to keep as much of this inside asterisk as possible (for saving of resources…)

Any ideas?

An idea could be: use the application Read, store the input in different variables if you prompt different audios. If not in once. When the * is pressed set one variable with all previous values.

You don’t even need to use any fancy variable handling for this.

If you graphically write up your IVR in a flowchart graph you will see that it looks like a tree. And a path to every branch is determined by a pre-defined path. So for every place in the “tree”, you know which way you took to get there. So just take some time, think it over, and assign a fixed variable that represent the caller location to every IVR that you have on the list.