stefano scotti
2013-May-27 17:17 UTC
[asterisk-users] ChanIsAvail function is breaking the round robin strategy
Hello everybody, i have two gsm line (extra channels) and i'd like to schedule the outgoing calls with a round-robin strategy. If all the gsm lines are busy, the call must be sent to the pri lines with a linear strategy. here is the dialplan: exten => gsm,ChanIsAvail(EXTRA/r2&DAHDI/g1) same => n,GotoIf($["${AVAILORIGCHAN}" = ""]?unavail,1) same => n,Dial(${AVAILORIGCHAN}/${CALLEDNUMBER}) The problem is that the ChanIsAvail function is breaking the round robin strategy. When this function is executed i can see in the console this message: Hungup 'EXTRA/3-1' and when the Dial function is executed only the EXTRA/1 channel is selected, never the EXTRA/3 one. that happen because ChanIsAvail affect the round-robin selection marking a channel as just used when it has only been checked. Anyone can see a solution to that problem? Thank you very much, im using asterisk 1.6.2 and dahdi 2.2.1 on a debian squeeze station.