Load Balancing outgoing sip trunk

alfalfa82

Joined
Aug 20, 2009
Messages
19
Likes
0
Points
0
#1
Hi,

I found online a simple way of cascading trunks, the problem that i have is that this method is very simple, and because of this when a trunk is busy or not available it dose not proceed to the next trunk automatically and just reject the call:

from extensions_custom.conf

[route]
exten => _506.,1,GotoIf(${DB_EXISTS(provider/next)}?4)
exten => _506.,2,Set(DB(provider/next)=102)
exten => _506.,3,Goto(1)
exten => _506.,4,GoSub(${DB_RESULT},1)
exten => _506.,5,Dial(SIP/${DB_RESULT}/${EXTEN:3}

exten => 102,1,Set(DB(provider/next)=104)
exten => 102,n,Return

exten => 104,1,Set(DB(provider/next)=110)
exten => 104,n,Return

exten => 110,1,Set(DB(provider/next)=114)
exten => 110,n,Return

exten => 114,1,Set(DB(provider/next)=118)
exten => 114,n,Return

exten => 118,1,Set(DB(provider/next)=102)
exten => 118,n,Return

each trunk is one channel.

as you can see a very simple way of cascading trunks, it is working perfectly i just need to add to this, that if a trunk is not avaiable for any reason(it is occupied, not connected or not registered) try the next one, and the next one and the next one, try until you find one that is working. how do i do it?


Thanks
Alon
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,913
Messages
130,917
Members
17,589
Latest member
cristian.saiz
Top