<html><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><META name="Author" content="Novell GroupWise WebAccess"></head><body style='font-family: Tahoma, sans-serif; font-size: 13px; '>Ok, I set it up like this:<br><extension name="CompanyIn"><br> <condition field="destination_number" expression="^(8203)$" continue="true"/><br> <!-- man strftime - M-F, 9AM to 5PM --><br> <condition field="${strftime(%w)}" expression="^([1-2])$"/><br> <anti-action application="voicemail" data="default 10.11.12.25 10199"/><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="group/company@${domain_name}"/><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><br>But now it gives me:<br><br>2010-01-22 11:52:08.667564 [NOTICE] switch_channel.c:602 New Channel sofia/external/2680xxxx@87.54.25.116 [16baec2f-4407-df11-8fb3-000c29b7b4cb]<br>2010-01-22 11:52:08.800123 [INFO] mod_dialplan_xml.c:252 Processing 2680xxxx->4692xxxx in context public<br>2010-01-22 11:52:08.830071 [NOTICE] switch_ivr.c:1349 Transfer sofia/external/2680xxxx@87.54.25.116 to XML[8203@default]<br>2010-01-22 11:52:08.830071 [INFO] mod_dialplan_xml.c:252 Processing 2680xxxx->8203 in context default<br>2010-01-22 11:52:08.830071 [NOTICE] switch_ivr.c:1349 Transfer sofia/external/2680xxxx@87.54.25.116 to enum[8203@default]<br>2010-01-22 11:52:09.163439 [INFO] switch_core_state_machine.c:136 No Route, Aborting<br><br>huh<br><br><br>>>> Michael Collins <msc@freeswitch.org> 21-01-10 9:39 >>><br>
<br><br><div class="gmail_quote">On Wed, Jan 20, 2010 at 2:45 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="font-family: Tahoma,sans-serif; font-size: 13px;">Hi Michael<br><br>It's running on pfsense, so it's kinda locked to the version it currently is.<br>Looks very nice though.<br>Looking beyond that, is the action / anti-action list corrent?<br>
</div></blockquote><div><br>I would say that you need to add an anti-action under the day of week check and go to vm if it does not match. Right now if the DOW is 0 or 6 then the entire extension will "fail" and the dialplan will just move on. Remember that if any conditions fail then the entire thing extension "fails" unless you are doing interesting things with the break= parameter. See the dialplan page on the wiki for examples of how to use break in your conditions.<br>
-MC<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="font-family: Tahoma,sans-serif; font-size: 13px;"><br>Best regards<br>
Fribse<br><br><br>>>> Michael Collins 20-01-10 1:53 >>><br>
<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" target="_blank">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>
</div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</msc@freeswitch.org></body></html>