[asterisk-users] queues load balancing

Danny Nicholas danny at debsinc.com
Mon Jul 20 08:02:57 CDT 2009


Here is a "brute force" solution:
[global]
CALLCOUNT=0
> exten =>  123,1,Ringing
> exten =>  123,2,Wait(1)
> exten =>  123,3,Answer
> exten =>  123,4,Set(CALLCOUNT)=${CALLCOUNT}+1)
> exten =>  123,5,Gotoif($["$(CALLCOUNT}" = "3"]?queue2)
> exten =>  123,6,Queue(queue_1)
> exten =>  123,7,Hangup
> exten =>  123,8(queue2),Set(CALLCOUNT=0)
> exten =>  123,9,Queue(queue_2)
> exten =>  123,10,Hangup

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Matt Riddell
Sent: Monday, July 20, 2009 7:37 AM
To: gomespereira at startel.pt; Asterisk Users Mailing List - Non-Commercial
Discussion
Subject: Re: [asterisk-users] queues load balancing

On 21/7/09 12:08 AM, Joao Gomes Pereira wrote:
> Thanks for the idea.
> I will try it this way:
>
> exten =>  123,1,Ringing
> exten =>  123,2,Wait(1)
> exten =>  123,3,Answer
> exten =>  123,4,Random(33:123,10)
> exten =>  123,5,Queue(queue_1)
> exten =>  123,6,Hangup
>
> exten =>  123,10,Queue(queue_2)
> exten =>  123,11,Hangup

Bear in mind that the Random application has been deprecated in favour 
of the RANDOM function:

asterisk -rx 'show application random'

   -= Info about application 'Random' =-

[Synopsis]
Conditionally branches, based upon a probability

[Description]
Random([probability]:[[context|]extension|]priority)
   probability := INTEGER in the range 1 to 100
DEPRECATED: Use GotoIf($[${RAND(1,100)} > <number>]?<label>)

-- 
Cheers,

Matt Riddell
Director
_______________________________________________

http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)
http://www.venturevoip.com/c3.php (ConduIT3 PABX Systems)

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list