Redirect calls from external to VM part2

Awesome! thanks @lgaetz I got it working with Time conditions now! Here itis if anyone is interested.

exten => _XXXX,1,Answer()
same => n,Set(CALLER_ACCOUNTCODE=${DB(AMPUSER/${EXTEN}/accountcode)})
same => n,Set(classroom_hours=${EXTENSION_STATE(*271@from-internal)})
same => n,Set(holiday=${EXTENSION_STATE(*273@from-internal)})
same => n,GotoIf($[“${REGEX(”@classroom" ${CALLER_ACCOUNTCODE})}" != “1”]]?SkipForwardVM)
same => n,GotoIf($[“${classroom_hours}” = “INUSE”]?SkipForwardVM)
same => n,GotoIf($[“${holiday}” = “NOT_INUSE”]?SkipForwardVM)
same => n(ForwardVM),Voicemail(${EXTEN},u)
same => n,Macro(hangupcall,)
same => n(SkipForwardVM),Goto(from-did-direct-continue,${EXTEN},1)
same => n,Hangup()

4 Likes