balance call

All installation and configuration problems and questions

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

balance call

Postby davide.filippi » Sat Apr 08, 2017 9:13 am

Good evening,
i'm try to code a load balance of provider's server

DIGI1=sip/${EXTEN}@_SERVER_ADDRESS_1
DIGI2=sip/${EXTEN}@_SERVER_ADDRESS_2

exten => _X.,1,GotoIf($[${RoundCount}>=2]?skip2)
exten => _X.,n,GotoIf($[${RoundCount}<2]?skip1)
exten => _X.,n,SetGlobalVar(RoundCount=0)
exten => _X.,n,Wait(1)
exten => _X.,n(skip2),SetGlobalVar(RoundCount=0)
exten => _X.,n(skip1),SetGlobalVar(RoundCount=$[{${RoundCount}+1}])
exten => _X.,n,Dial($DIGI${RoundCount},,Tto)
exten => _X.,n,Hangup

How I have to write the Dial command to work right?

Thanks in advance
ViciBox.x86_64-4.0.1.iso from dvd | Vicidial VERSION: 2.8-403aBUILD: 130510-1350 | SVN Version: 1983 | Cluster: 4 web+dialer (2 Dell Poweredge 1950 - 1 Dell Poweredge 2950; 1 Dell Poweredge R610); 1 db on Dell Poweredge R710 | no extra hw/sw
davide.filippi
 
Posts: 85
Joined: Thu Nov 10, 2016 8:45 am

Re: balance call

Postby davide.filippi » Mon Apr 10, 2017 6:47 am

Problem solved.
Correct code is:

DIGI1=_SERVER_ADDRESS_1
DIGI2=_SERVER_ADDRESS_2

exten => _X.,1,GotoIf($[${RoundCount}>=2]?skip2)
exten => _X.,n,GotoIf($[${RoundCount}<2]?skip1)
exten => _X.,n,SetGlobalVar(RoundCount=0)
exten => _X.,n,Wait(1)
exten => _X.,n(skip2),SetGlobalVar(RoundCount=0)
exten => _X.,n(skip1),SetGlobalVar(RoundCount=$[{${RoundCount}+1}])
exten => _X.,n,Dial(sip/${EXTEN}@${DIGI${RoundCount}},,Tto)
exten => _X.,n,Hangup
ViciBox.x86_64-4.0.1.iso from dvd | Vicidial VERSION: 2.8-403aBUILD: 130510-1350 | SVN Version: 1983 | Cluster: 4 web+dialer (2 Dell Poweredge 1950 - 1 Dell Poweredge 2950; 1 Dell Poweredge R610); 1 db on Dell Poweredge R710 | no extra hw/sw
davide.filippi
 
Posts: 85
Joined: Thu Nov 10, 2016 8:45 am


Return to Support

Who is online

Users browsing this forum: No registered users and 142 guests