NOTE:
這範例尚未驗證過,可能需要再修改。
extensions.ael:
// File extensions.ael
context roundrobin {
_X. => {
Set(max=10);
Set(n=0);
repeat:
Set(n=${n}+1);
Set(last=$[(${DB(rr/last)} + 1) % ${max}]);
Set( DB(rr/last) = ${last} );
Dial(${DB(rr/trunk${last})}/${EXTEN},30,g);
if ( ${DIALSTATUS} != "ANSWERED" ) {
if ( ${n} < ${max} ) {
// Repeat cycle
goto repeat;
};
};
Hangup;
};
};
TIPs:
Set(last=$[(${DB(rr/last)} + 1) % ${max}]); 這行是用來確保 last 是小於 ${max} 的整數。
其他步驟
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |