Project

General

Profile

Load Balance out going connections

Added by Lindsay Mathieson 14 days ago

Hi, we have two sip trunks (one per ADSL2+ connection), soon going to add a third one. Is there a way to auto balance out going calls per trunk? ideally it would distribute calls by number of currently active, but a round robin would do as well.

Thanks.


Replies (1)

RE: Load Balance out going connections - Added by Wim De Vlaminck 1 day ago

There's nothing in Wazo for this afaik, but you can easily randomize the trunk order.

I've made this very basic dialplan at some point.
You can put this in a config file and add the proprocess subroutine on your outcall.
Keep in mind that the trunks or the trunk order in your outcall entry will not be used at all

I suppose after the first dial it would make sense to look at the dialstatus and only send it to the second trunk on certain states.

[randomize]
same = s,1,Set(EP_RAND=${RAND(1,2)})
same = n,Goto(its${EP_RAND})
same = n(its1),Dial(SIP/trunk-1/${EXTEN})
same = n,Dial(SIP/trunk-2/${EXTEN})
same = n,Goto(end)
same = n(its2),Dial(SIP/trunk-2/${EXTEN})
same = n,Dial(SIP/trunk-1/${EXTEN})
same = n(end),Hangup()
    (1-1/1)