Concept, check an Microsoft Exchange server for freebusy information against a calendar. This could be used for both user calendars – to send straight to voicemail (auto do-not-disturb) or for resource scheduling – such as maintaining a calendar for the offices opening and closing times – which can then be set from an Outlook client.
The file is opensource – and developed by Nick Knight from Omniis (www.omniis.com).
The dial-plan
Example dial plan.
exten => 151,1,AGI(freebusy.php|myexchangeserver|bob|bobspassword|[email protected])
exten => 151,2,GotoIf($[[${FREEBUSY} = 0]?3:4)
exten => 151,3,Dial(Sip/nick)
exten => 151,4,Hangup()
the freebusy.php script needs installing into the agi-bin and you are away.