Page 1 of 1

LCR is Possible in Vici ?

PostPosted: Thu Jul 21, 2011 3:35 am
by gmcust3
LCR is Possible in Vici ?

PostPosted: Thu Jul 21, 2011 10:26 pm
by anandkumargupta
As per my knowledge the LCR is not any option but you can create your own route pattern on the basis of prefix in extension.conf or from interface too whcih will over write the extensions-vicidial.conf

PostPosted: Fri Jul 22, 2011 12:36 am
by viciflash
is it ok to create something like this:


Code: Select all
exten => _91XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXXX,2,Dial(SIP/${EXTEN:1}@CARRIER_01,,tTo)
exten => _91XXXXXXXXXX,3,Dial(SIP/${EXTEN:1}@CARRIER_02,,tTo)
exten => _91XXXXXXXXXX,4,Hangup


there is a max-limit call per carrier. if carrier 1 reaches the limit, calls will be made in carrier_02.

i personally haven't tried it w/ vici but no problems in an ordinary asterisk setup.

PostPosted: Sat Jul 23, 2011 2:21 pm
by anandkumargupta
You are doing fall back not LCR(Least cost routing)

Try like

exten => _91981XXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91981XXXXXXX,2,Dial(SIP/${EXTEN:1}@CARRIER_01,,tTo)
exten => _91981XXXXXXX,4,Hangup

exten => _91989XXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91989XXXXXXX,3,Dial(SIP/${EXTEN:1}@CARRIER_02,,tTo)
exten => _91989XXXXXXX,4,Hangup

Here 981 is say Airtel and CARRIER_1 cheaper for Airtel where CARRIER_2 is cheaper for IDEA which will handle starting from 989.

I was wrong. There is one LCR script in /var/lib/asterisk/agi-bin in Vicidial. Please search about that script. I think that will help you also for your problem.