How to load balance inbound calls to multple Asterisk server

Discussions about new features or changes in existing features

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

How to load balance inbound calls to multple Asterisk server

Postby santhuarnold » Tue Aug 07, 2018 12:16 pm

Hi.

Cluster environment. 1 database server, 3 Asterisk servers and Single Sip line.
how to share or load balance the incoming calls to all 3 asterisk servers.



Vicibox-6.0.4: VERSION: 2.14-679a : BUILD: 180618-2300
santhuarnold
 
Posts: 76
Joined: Mon Sep 02, 2013 7:32 am

Re: How to load balance inbound calls to multple Asterisk se

Postby dgroth02 » Tue Aug 07, 2018 2:36 pm

To clarify - do you mean sort the load so that calls come in from the carrier and are spread across agents on different servers or just have the calls come in to different servers?

Typically inbound call routing by IP address is handled on the carrier side.
dgroth02
 
Posts: 35
Joined: Wed May 06, 2015 2:24 pm

Re: How to load balance inbound calls to multple Asterisk se

Postby mflorell » Tue Aug 07, 2018 4:25 pm

On our VICIhost platform we use OpenSIPs servers to do this, so we can distribute inbound calls to all available Asterisk servers on a specific client's cluster. We've also helped several premise clients set up systems like this.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: How to load balance inbound calls to multple Asterisk se

Postby santhuarnold » Thu Aug 09, 2018 6:08 am

without OpenSIPs cant we achieve this?
By selecting server Ip to all server(0.0.0.0) in carrier setting?
ViciBox v.7.0.1| Asterisk 11.21.0-vici | VERSION: 2.12-546a | BUILD: 160328-0316
santhuarnold
 
Posts: 76
Joined: Mon Sep 02, 2013 7:32 am

Re: How to load balance inbound calls to multple Asterisk se

Postby mflorell » Thu Aug 09, 2018 8:14 am

It depends on what your carrier is capable of. Most inbound carriers are not able to load balance like that, but some are able to.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: How to load balance inbound calls to multple Asterisk se

Postby santhuarnold » Fri Aug 10, 2018 5:13 am

only solution, need to use OpenSip kind of sip load balance? or anything in asterisk or vicidial level.
ViciBox v.7.0.1| Asterisk 11.21.0-vici | VERSION: 2.12-546a | BUILD: 160328-0316
santhuarnold
 
Posts: 76
Joined: Mon Sep 02, 2013 7:32 am

Re: How to load balance inbound calls to multple Asterisk se

Postby richmac2018 » Thu Aug 16, 2018 9:24 pm

You can use this code in your asterisk gateway and just add callerid variable on that code.

exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,2,NoOp(LB IS ${lb_trunk})
exten => _9X.,3,GotoIf($[${lb_trunk} != 0]?10)
exten => _9X.,4,Set(GLOBAL(lb_trunk)=1)
exten => _9X.,5,Dial(${trunk_1}/${EXTEN:1},,tTor)

exten => _9X.,10,GotoIf($[${lb_trunk} != 1]?20)
exten => _9X.,11,Set(GLOBAL(lb_trunk)=2)
exten => _9X.,12,Dial(${trunk_2}/${EXTEN:1},,tTor)

exten => _9X.,20,GotoIf($[${lb_trunk} != 2]?30)
exten => _9X.,21,Set(GLOBAL(lb_trunk)=3)
exten => _9X.,22,Dial(${trunk_3}/${EXTEN:1},,tTor)

exten => _9X.,30,Set(GLOBAL(lb_trunk)=0)
exten => _9X.,31,Goto(1)
richmac2018
 
Posts: 36
Joined: Wed Jan 17, 2018 10:47 am

Re: How to load balance inbound calls to multple Asterisk se

Postby Kumba » Tue Apr 02, 2019 11:16 am

That last line should be changed to:

exten => _9X.,31,Goto(2)


You've already logged the call in the AGI and re-doing that will not help in any way, just delay processing as the AGI is called twice in a row hitting the database twice and create unnecessary load.
Kumba
 
Posts: 939
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida


Return to Features

Who is online

Users browsing this forum: No registered users and 55 guests