Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vector programming.

Status
Not open for further replies.

chance428

Technical User
Oct 25, 2011
31
US
I have a question guys.
I hope I am asking this right.

I have programmed a vector that is a call menu:
When someone calls the VDN( which is a DID ).
It will collect collect a digit after an announcement, the announcement will give the caller,
lets say, 2 options. If the caller hits a 1 or 2, they are routed to another vector.
If the caller hits anything other than a 1 or 2 or doesn't hit anything at all, it will take the
caller back up to the top of the vector, where it asks the caller to pick from the options
again.

My question is:
If the caller hits nothing it will just go around and around in a loop.
Is there a way to keep track of, how many times a call loops around the vector when the caller hits
nothing. I would like it to be able to loop, say 3 times and then disconnects.

Is there a command that you can place, in the vector that can do this?

Thanks in advance for your help with this.
 
You can do 1 of 2 things: You can use variables to count the number of times or instead of using 'go to' to send them bach to the original starting point, just list the menu oupions again:

01 wait 2 seconds hearing ringback
02 collect 1 digit after annpouncement 1234
03 goto vector 123 if collected digits = 1
04 goto vector 124 if collected digits = 2
05 wait 2 seconds hearing ringback
06 collect 1 digit after announcement 1234
07 goto vector 123 if collected digits = 1
08 goto vector 124 if collected digits = 2
09 wait 2 seconds hearing ringback
10 collect 1 digit after announcement 1234
11 goto vector 123 if collected digits = 1
12 goto vector 124 if collected digits = 2
13 disconnect after announcement none
14 stop

Kevin
 
you can also use variables to count the number of time it loops

1_collect 1 digit after announcement 1234
2_goto step if digit = 1
3_goto step if digit = 2
4_set ZZ = ZZ add 1
5_goto step 7 if ZZ = 3
6_goto step 1 if unconditionnaly
7_disconnect after announcement 4321
 
Thanks MP and 4mer,
Thanks to your help I have it working.
Thanks you for your response.
 
Well guys I thought I had it working.
How do you set up a variable to count the times it loops?
 
just go to "change variable" choose one of the variable A for example, set it to local, set lenght to 1, start to 1 and type Collect and give a description.
Use the same variable in your vector
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top