[Freeswitch-users] Combining AND and ELSE in freeswitch conditions

Alex Lake alex at digitalmail.com
Tue Jul 26 15:50:20 MSD 2011


Hello all, I'm a Freeswitch newbie struggling to get my head around the 
best way to do some TOD/BH routing.
I've got a LUA script that will work out whether or not we're in a bank 
holiday, but I wanted to do the combinatorial logic within Freeswitch 
dial plan.

Something like:

if (Weekday AND (NOT BankHoliday) AND InWorkingHours) {
     Transfer to mainIVR
} else {
     Transfer to voicemail
}

What is the most elegant way to achieve this?
The Wiki pages don't appear to explain how one can do ANDs with ELSE, as 
the anti-action will only get executed if it's only the last condition 
that fails.

Thanks!






More information about the FreeSWITCH-users mailing list