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 Variables - Call Counter

Status
Not open for further replies.

RVelle

Technical User
Feb 27, 2004
42
0
0
US
Just starting to delve into writing/understanding vector variables, have been writing regular vectors for quite awhile...

I need a Counter variable that will count all incoming callers into a particular vector each day, and in turn I will use that counter to shift some calls out of that primary vector into a 2nd vector (long story).

Percent allocation would be a nice option, but the IVR team (non conversant) is slammed, and I need to get something inplace to offload some volume (cant use BSR unfortunately, but will couple this counter with an expected wait check to try not to flood the 2nd smaller queue).

How should the variable be written in the PBX so you can identify where/when it stops counting upto and resets back to zero?

On the vector side I think I can figure out what I need to call the variable, but confused on the PBX side config... Global/Local,Scope, Length, Start Assignment....

Thanks in advance,

RVelle
 
Things get kind of hokey when you start trying to do counters and such. But you could tackle it like this:

Variable A (Global) 1 Digits (Value 0)
Variable B (Global) 1 Digits (Value 0)

Code:
01 set A = A ADD 1
02 goto step 10 if A < 8
03 route-to number 7654321 with cov n if unconditionally
04 goto step 6 if A = 9
05 stop
06 set A = B ADD none
07 route-to number 7654321 with cov n if unconditionally
08 stop
09
10 route-to number 1234567 with cov n if unconditionally
11 stop


This should send the first 7 (80% approx) calls to destination 1 (1234567). Then send calls 8 and 9 to destination 2 (7654321). While doing this it increments Variable A up to 9 .. then when it hits 9 it resets back to 0 (Variable B).


As I said it's kind of messy .. but it should work. You can play with the numbers a bit. The reason I would keep the digit length on the variables low (to 1) is so that you dont have larges periods of time where you send all of the calls to one destination or the other. This way it will only be 7 calls one way then 2 another .. then cycle again.



You could also simply increment the variable and use a goto statement for each of a few possible values. In this case 3 out of 20 calls would go to the second destination. You can play with this to configure as many or few calls to go to the second desitantion or even third as you want. you cna also use greater than / less than arguments to specify that same logic.

Code:
01 goto step 11 if A < 20
02 goto step 9 if A = 5
03 goto step 9 if A = 10
04 goto step 9 if A = 15
05 goto step 11 if A = 20
06 set A = A ADD 1
07 route-to number 7654321 with cov n if unconditionally
08 stop
09 route-to number 1234567 with cov n if unconditionally
10 stop
11 set A = B ADD none
12 route-to number 1234567 with cov n if unconditionally
13 stop


- Miguel

A very wise and well respected man once told me "Shut Up!".
 
Testing this out later today, thanks much for the info Simreal -- Messy is still better than not having an option for the functionality at times.

Really apprecaite the time you took to write that up/detail it out for me.

Thanks,

RVelle
 
Simreal - That worked perfectly, I really do appreciate the detail, never realized how much I was missing not getting into variables sooner.........
 
You are welcome. Glad I could help.


- Miguel

A very wise and well respected man once told me "Shut Up!".
 
You need to reverse steps 3 and 4 in the first example above, when you route the call to the alternate number is step 3 vector processing ends so you will never get to step 4.
 
Tolson - Thanks I was using Simreal's examples more to get a better understanding of how a variable could work this particular Clients needs, I really had no experience in the past using them, so needed some examples to visually figure it out.

Below is what I set it up for, a need where BSR would not work in an intrasite shared skill enviornment (long story), need was to split what was one skill, into two distinct skills & VDNs (75/25% split) while trying not overload the 25% one (and hopefully not needing someone to watch it 24/7 to adjust it), hence the kind of "poor mans BSR" listed below.

Every other call looks to the small skill, for EWT and if the criteria is met the call is pushed over, otherwise the call stays with the larger queue. In step 7 I used a greater than rather than equals just incase the counter ever got beyond two that it wouldnt get messed up...

I ended up doing the following:

Code:
    1  wait-time 2   secs hearing silence
    2  goto step   17   if time-of-day is all  8:00 PM to all  8:00 AM
    3  goto step   17   if time-of-day is fri  8:00 PM to mon  8:00 AM
    4  goto vector 1999 @step 1  if staffed-agents in skill 1999 >  0
    5  goto vector 1001 @step 1  if holiday in     table 1
    6  goto step   7    if unconditionally
    7  goto step   32   if A     >      2
    8  set  A      = A      add   1
    9  goto step   21   if A     =      2
   10  wait-time 0   secs hearing music
   11  queue-to skill 231  pri m
   12  wait-time 30  secs hearing music
   13  announcement 37700
   14  goto vector 1999 @step 1  if staffed-agents in skill 1999 >  0
   15  goto step   12   if unconditionally
   16  stop
   17  disconnect after announcement 31075
   18  stop
   19  route-to number 30132            with cov n if unconditionally
   20  stop
   21  goto step   19   if expected-wait for skill 234  pri m <  20
   22  goto step   11   if expected-wait for skill 231  pri m <  30
   23  goto step   19   if expected-wait for skill 234  pri m <  40
   24  goto step   11   if expected-wait for skill 231  pri m <  50
   25  goto step   19   if expected-wait for skill 234  pri m <  70
   26  goto step   11   if expected-wait for skill 231  pri m <  90
   27  goto step   19   if expected-wait for skill 234  pri m <  130           ^
   28  goto step   11   if expected-wait for skill 231  pri m <  160

   29  goto step   19   if expected-wait for skill 234  pri m <  210
   30  goto step   11   if unconditionally
   31  stop
   32  set  A      = B      add   none
   33  goto step   8    if unconditionally
   34  stop

Thanks,

RVelle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top