Re: Transfering calls - % values - secure to use txt file?
- From: Consolas <montedesucata@xxxxxxxxx>
- Date: Mon, 26 May 2008 07:51:34 -0700 (PDT)
On May 26, 3:18 pm, Uwe Klein <uwe_klein_habertw...@xxxxxxxxxxx>
wrote:
Consolas wrote:
Hello! thank you for your reply!
The "problem" is i have fixed % numbers regarding each number. I need
to transfer 20% to number 1, 30% to number 2 (etc).
Furthermore, these % values can be changed in a php page, thus the
idea of use .txt files.
In the txt i would not only save how many calls were made throughout
the day but i woul use that number as well to make the math around the
% value - 20% of 1000 is 200..etc.
So, random numbers would not help me at all...
Ricardo
My guess is that ralf had the following in mind:
set prob [ expr { int(rand() * 99.999) } ]
set distribution {A 20 B 30 C40 D 10}
set top 0
foreach {chan percent} $distribution {
incr top $percent
if {$prob < $top} {
divert_call $call $chan
break
}
if {$top > 100}
error "more than a shure thing"
}
}
# your calls will be "evenly" distributed
uwe
Ah ok! I think i've understood what you said.
The main thing is, i need to know how many calls i had during the
day..lets say i've had 1000 calls and now i changed the % values from
lets say 50 50 to 90 10.
Therefore the next 9 calls would be delivered to the 90% and the 10th
call would be delivered to the 10%.
So i always need to know how many calls were made during the day...
i guess!
.
- References:
- Re: Transfering calls - % values - secure to use txt file?
- From: Ralf Fassel
- Re: Transfering calls - % values - secure to use txt file?
- From: Consolas
- Re: Transfering calls - % values - secure to use txt file?
- From: Uwe Klein
- Re: Transfering calls - % values - secure to use txt file?
- Prev by Date: Re: better API for ttk::currentTheme?
- Next by Date: Help with TCOM syntax
- Previous by thread: Re: Transfering calls - % values - secure to use txt file?
- Next by thread: Re: Transfering calls - % values - secure to use txt file?
- Index(es):
Relevant Pages
|