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

What is the limit of Variables in CM 3.1.2? 3

Status
Not open for further replies.

ppenning

IS-IT--Management
Feb 16, 2005
127
US
Good day all,

I would like to set up a vector that would allow our locations to call and "Check In" or flip a switch so to speak to let us know they are "Open for Business" so we can transfer calls to them. The only way I can think of doing this is for them to call in to a vector and Press 1 for Check In and Press 2 for Check Out and write those values to a variable for the customer calls to validate against. However this would mean I need several hundred Variables since that is how many locations we have.

Am I truely stuck with only 26 variables?
Can anyone think of a different way of doing this?

I also tried the Agent Login approach but I don't have enough IP Agent licenses for each branch to show their presence by logging in to a queue... Can they remotely dial in and log in?

Thanks for any help!
Perry
 

Just a thought, not sure if this will work or not...

But each variable contains 16 digits at most. So let each digit position in a variable represent a location open for business. So effectively, you can have 26 * 16 = 416 locations.

For example, let's say you have 16 locations. So you only need a single variable to represent all 16 locations. A '1' can represent the location is open and a '0' can represent the location is closed. So if a variable, say 'X' contains:

X="0101010101010101", then every odd location (15,13,11,9,7,5,3,1) is open,

or
X="0000000011111111", then the first 8 locations (8,7,6,5,4,3,2,1) are open.

(note the least significant digit in variable X represents the first location, and the most significant digit represents the sixteenth location)

To check if a location is set use the wild cards '?' and/or '+' to check if a location is open to decide where to route. Like:

"goto .. if X = +1???????" - this checks if location 8 is open,

or

"goto .. if X = ?1?1?1?1?1?1?1?1" - this checks odd location numbers.

As far as setting the variable 'X', that will take some programming effort. I don't think the "collect" step alone will work. I believe you'd need to use CM3.x release. CM3.x has the capability to "set" variables. Based on the VDN or ANI, you can set the variable 'X' digit position accordingly.

VECTOR <TURN ON BRANCH>
collect .. <Enter your location number> for none
goto vector 1 .. if digits = 1
goto vector 2 .. if digits = 2
:
goto vector 16 .. if digits = 16
stop


VECTOR <1>

01 goto step 3 if X = +0 (means position 1 is not set so set it)
02 stop (otherwise stop)
03 set X = X ADD 1 (set the least sig digit to 1 - note using the arithmetic ADD operator will work for the least significant digits 1-10, but setting the 11th(?) or higher digit may require more sophisticated string manipulations with another variable, SEL, CATR and/or CATL. I'd need to think about this a bit more, but it should be possible.)
04 stop (quit)

VECTOR <2>
01 goto step 3 if X = +0?
02 stop
03 set X = X ADD 10
04 stop

:
VECTOR <16>
01 goto step 3 if X = 0+
02 stop
03 set digits = X SEL 15 (grab the lowest 15 digits of X and store in the "digits" buffer)
04 set X = digits CATL 1 (set the 16 digit to a 1)
05 stop

(note the digit positions 15-11 will be a little more challenging to set, but again I think it's possible)


Hopefully you get the idea?


If you want even more locations, I think you can squeeze 3 more locations out of each digit in a variable by converting a decimal representation to binary representation. That is,
-a decimal 7 represents 111 in binary, or 3 locations are turned on.
-a decimal 6 represents 110 in binary, or locations 3 and 2 are turned on, but location 1 is off
:
-a decimal 0 represents 000 in binary, or 3 locations are turned off

So now a single 16 digit variable can represent 16*3=48 locations. Or you can now get 26*16*3=1248 locations total.

Here's an example, let the variable X represent 48 locations open or closed
X = 0765432101234567

The binary representation of X is
X = 000 111 110 101 100 011 010 001 000 001 010 011 100 101 110 111

The 0's would represent the closed branches, and the 1's would represent the open branches. To check if a particular branch is open will require good binary skills. For example, to check if the 23rd location is open I would use the following conditional check..

goto .. if X = +2???????


I have a feeling I went through this whole exercise for nothing, but if it doesn't help you, it may help someone else.

-y



 
What a genius! I plan to give this a shot! I'm not good with Binary so I am going to keep it simple but it makes total sense! We have CM v3.0 right now but tomorrow night our core switch is being upgraded to 3.1.2 (Tonight all ESS and LSP's are getting the upgrade). As soon as I get in the office I am going to dig in to this one...

Thanks again!!!
Perry
 
yurichan,

i see i'm not the only one vector variable maniac. ;) that's a good one. have a star.
however i think in THIS case it would be better to use cti.
 
Hi,

I do exactly this and it works fine.

I have copied the vector that i have set up to do it is below.

The variables used are as follows.

E is a counter used to keep track of the posistion in the string. It is a collet local with lenght 3

V1 is set to the posistion in the string you want to modify

C is the variable with the string in it. It is a collect global with length 16

D is a collect local with lengh 1. It is used to retrive individual values from the string.

V2 is set to the new value you want the value you are changing to have.

Basically what it does is copy te vaules out one at time from the original string into digits, until it reaches the one to change, when it then substitutes its own value. It then contnues along the rest of the string copying the remaing values.



01 announcement 28316
02 wait-time 0 secs hearing music
03 set digits = none ADD none
04 set E = none ADD 1
05 goto step 11 if E = V1
06 set D = C SEL E
07 set digits = digits CATL D
08 set E = E ADD 1
09 goto step 13 if E = 17
10 goto step 5 if unconditionally
11 set digits = digits CATL V2
12 goto step 8 if unconditionally
13 set C = none CATR digits
14 goto step 16 if V2 = 0
15 disconnect after announcement 28314
16 disconnect after announcement 28315
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top