[Asterisk-Users] Balancing traffic between two routes

Trevor G. Hammonds trevor at skyhost.net
Wed Aug 24 03:01:45 MST 2005


Sahil Gupta wrote on Tuesday, 23 August 2005 10:17 AM:

> We are currently running our own equipment to break calls out in a
> location  I need to balance the calls out between two sites so that
> one site doesn't keep getting hit again and again.  
> 
> So currently we have something like this:
> exten => _1.,1,Dial(IAX2/pop1/${EXTEN})
> exten => _1.,2,Dial(IAX2/pop2/${EXTEN})
> 
> But the above.. would hammer pop1 any tips ?

Try something like this:

exten => _1.,1,Random(50:3)
exten => _1.,2,Dial(IAX2/pop1/${EXTEN})
exten => _1.,3,Dial(IAX2/pop2/${EXTEN})

Or

exten => _1.,1,Random(50:4)
exten => _1.,2,Dial(IAX2/pop1/${EXTEN})
exten => _1.,3,Goto(whatever happens next)
exten => _1.,4,Dial(IAX2/pop2/${EXTEN})
exten => _1.,5,Goto(whatever happens next)

Hope this helps!

		Sincerely,
		Trevor Hammonds





More information about the asterisk-users mailing list