I have a very small one man constultancy company that has the occasional call, unfortunately we are getting more spam calls after hours than real calls during work hours, so I would like to set up a TOD system.
First step for me is just playing with the TOD example, I've gotten this far:
<extension name="CompanyTOD" continue="true">
<condition field="destination_number" expression="^(8203)$"/>
<!-- man strftime - M-F, 9AM to 5PM -->
<condition field="${strftime(%w)}" expression="^([1-5])$"/>
<condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$">
<action application="set" data="call_timeout=45"/>
<action application="set" data="domain_name=10.11.12.25"/>
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="bridge" data="
group/company@${domain_name}"/>
<action application="answer" data=""/>
<action application="sleep" data="1000"/>
<action application="voicemail" data="default 10.11.12.25 10199"/>
<anti-action application="voicemail" data="default 10.11.12.25 10199"/>
</condition>
</extension>
My idea with this, was that in the time 9-17 mon-fri, it rings, the rest of the time it's sent directly to the voicemail.
I would of course like to have it not take messages outside work hours, but that's just refining :-)
But it picks up the call, and then nothing...