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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you use variables for a counter to be used by sevral vectors

Status
Not open for further replies.

ttcsbarry

Vendor
Joined
Sep 9, 2003
Messages
48
Location
US
How can you use a variable that can be used to store a counter value and be used by more than one vector. For example I want to repeat an announcement, collect digits and goto commands a 2 times before disconnectiong a caller. But, I want to be able to use this variable for multiple VDN/Vectors that could increment the counter at the same time. I did some testing with 2 VDN's/vectors and it seems like both vectors are incrementing the value of the counter! It seems silly to create a separate variable for each vector/counter situation. Example:

display variables Page 1 of 2

VARIABLES FOR VECTORS


Var Description Type Scope Length Start Assignment VAC

A SC Meeting collect G 5 1 1
B SC Bypass to T-2 collect G 5 1 91630
C Test Elk Grove collect G 12 1 91630623
D Counter collect G 1 1 0



display vector 251 Page 1 of 3
CALL VECTOR

Number: 251 Name: Collect test
Multimedia? n Attendant Vectoring? n Meet-me Conf? n Lock? n
Basic? y EAS? y G3V4 Enhanced? y ANI/II-Digits? y ASAI Routing? n
Prompting? y LAI? y G3V4 Adv Route? y CINFO? y BSR? y Holidays? y
Variables? y 3.0 Enhanced? y
01 wait-time 0 secs hearing silence
02 collect 1 digits after announcement 0827 for none
03 goto step 8 if digits = 1
04 goto step 10 if digits = 2
05 goto step 12 if D = 2
06 set D = D ADD 1
07 goto step 2 if unconditionally
08 announcement 0296
09 goto step 12 if unconditionally
10 wait-time 10 secs hearing music
11 goto step 12 if unconditionally
12 set D = none ADD 0
13 disconnect after announcement none
14 stop
15
16
17
18
19
20
21
22
 

Change the variable to (L)=local. This allows the variable to be used in individual vectors and not effected by what the variable is being used for in other vectors. It keeps the value "local" to the vector.


- Stinney

Favorite all too common vendor responses: "We've never seen this issue before." AND "No one's ever wanted to use it like that before.
 
Like Stinney said,, (L)ocal variables are local to the call (will maintain across vectors even)
(G)lobal variables are global to the PBX system..

I use L for "loop counter"is a Local variable,, I can have it counting in to vectors on 100 different calls simultaneously with no effect on other calls.

I also use a emergency variable that is Global to close the call center in an emergency, for weather, etc. (I also have a separate vector set to change that variable, so I can close the call center when I am away from the office)


so after you change D to scope (L)ocal
then change your vector to..

01 wait-time 0 secs hearing silence
02 set D = none ADD 0
03 collect 1 digits after announcement 0827 for none
04 goto step 9 if digits = 1
05 goto step 11 if digits = 2
06 goto step 13 if D = 2
07 set D = D ADD 1
08 goto step 3 if unconditionally
09 announcement 0296
10 goto step 13 if unconditionally
11 wait-time 10 secs hearing music
12 goto step 13 if unconditionally
13 disconnect after announcement none
 
Thanks for the help, Stinney and Zen216. I think the key to this is what Zen216 wrote and that was to set D to 0 before the collect digit statement (step 2). Because when I leave it at step 12 of my original vector with the variable as a Local (L), I got some funky results when multiple VDNs/Vectors use the variable at the same time.
 
Use the Local variable like everyone is saying but make a slight change to the vector:

01 collect 1 digits after annc 1234 for none
02 goto step 9 if digits = 1
03 got step 11 if digits = 2
04 goto step 1 if digits = ?
05 wait-time 5 seconds hearing silence
06 set D = D add 1
07 goto step 01 if D < 3 (repeat the announcement twice)
08 ...
09 ...

I use something similar for dozens of vectors that are constantly being used and it works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top