<br><br><div class="gmail_quote">On Tue, Jan 19, 2010 at 9:02 AM, mailinglist <span dir="ltr"><<a href="mailto:mailinglist@fribert.dk">mailinglist@fribert.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="margin: 4px 4px 1px; font-family: Segoe UI; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div>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.</div>
<div> </div>
<div>First step for me is just playing with the TOD example, I've gotten this far:</div>
<div> </div>
<div><extension name="CompanyTOD" continue="true"><br> <condition field="destination_number" expression="^(8203)$"/><br> <!-- man strftime - M-F, 9AM to 5PM --><br>
<condition field="${strftime(%w)}" expression="^([1-5])$"/><br> <condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$"><br> <action application="set" data="call_timeout=45"/><br>
<action application="set" data="domain_name=10.11.12.25"/><br> <action application="set" data="continue_on_fail=true"/><br> <action application="set" data="hangup_after_bridge=true"/><br>
<action application="bridge" data="<a href="mailto:group/company@$%7Bdomain_name%7D%22/" target="_blank">group/company@${domain_name}"/</a>><br> <action application="answer" data=""/><br>
<action application="sleep" data="1000"/><br> <action application="voicemail" data="default 10.11.12.25 10199"/><br> <anti-action application="voicemail" data="default 10.11.12.25 10199"/><br>
</condition><br></extension><br></div>
<div>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.</div>
<div>I would of course like to have it not take messages outside work hours, but that's just refining :-)</div>
<div> </div>
<div>But it picks up the call, and then nothing...</div>
<div> </div></div></blockquote><div>We have a much cleaner way of doing TOD and DOW handling. You'll need to get to the latest FreeSWITCH version. Look in conf/dialplan/default.xml for this example:<br></div></div><br>
<!-- Example of doing things based on time of day. <br><br> year = 4 digit year. Example year="2009"<br> yday = 1-365<br> mon = 1-12<br> mday = 1-31<br> week = 1-52<br> mweek= 1-6<br>
wday = 1-7<br> hour = 0-23<br> minute = 0-59<br> minute-of-day = 1-1440<br> <br> Example:<br> <condition minute-of-day="540-1080"> (9am to 6pm EVERY day)<br> do something ...<br>
</condition><br> --><br> <extension name="tod_example" continue="true"><br> <condition wday="2-6" hour="9-18"><br> <action application="set" data="open=true"/><br>
</condition><br> </extension><br><br><br>Use that condition instead of the two conditions you're now using and see if you have better success.<br><br>-MC<br>