<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>&lt;extension name="CompanyIn"&gt;<br>&nbsp;&nbsp; &lt;condition field="destination_number" expression="^(8203)$" continue="true"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- man strftime - M-F, 9AM to 5PM --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${strftime(%w)}" expression="^([1-2])$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;anti-action application="voicemail" data="default 10.11.12.25 10199"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="call_timeout=45"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="domain_name=10.11.12.25"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="continue_on_fail=true"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="hangup_after_bridge=true"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="bridge" data="group/company@${domain_name}"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="answer" data=""/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="sleep" data="1000"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="voicemail" data="default 10.11.12.25 10199"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;anti-action application="voicemail" data="default 10.11.12.25 10199"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&lt;/extension&gt;<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-&gt;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-&gt;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>&gt;&gt;&gt; Michael Collins <msc@freeswitch.org> 21-01-10 9:39 &gt;&gt;&gt;<br>
<br><br><div class="gmail_quote">On Wed, Jan 20, 2010 at 2:45 AM, mailinglist <span dir="ltr">&lt;<a href="mailto:mailinglist@fribert.dk">mailinglist@fribert.dk</a>&gt;</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>&gt;&gt;&gt; Michael Collins  20-01-10 1:53 &gt;&gt;&gt;<br>
<br><br><div class="gmail_quote">On Tue, Jan 19, 2010 at 9:02 AM, mailinglist <span dir="ltr">&lt;<a href="mailto:mailinglist@fribert.dk" target="_blank">mailinglist@fribert.dk</a>&gt;</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>&nbsp;</div>
<div>First step for me is just playing with the TOD example, I've gotten this far:</div>
<div>&nbsp;</div>
<div>&lt;extension name="CompanyTOD" continue="true"&gt;<br>&nbsp;&nbsp; &lt;condition field="destination_number" expression="^(8203)$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- man strftime - M-F, 9AM to 5PM --&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${strftime(%w)}" expression="^([1-5])$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="call_timeout=45"/&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="domain_name=10.11.12.25"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="continue_on_fail=true"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="hangup_after_bridge=true"/&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="bridge" data="<a href="mailto:group/company@$%7Bdomain_name%7D%22/" target="_blank">group/company@${domain_name}"/</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="answer" data=""/&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="sleep" data="1000"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="voicemail" data="default 10.11.12.25 10199"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;anti-action application="voicemail" data="default 10.11.12.25 10199"/&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&lt;/extension&gt;<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>&nbsp;</div>
<div>But it picks up the call, and then nothing...</div>
<div>&nbsp;</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>

&nbsp;&nbsp;&nbsp; &lt;!-- Example of doing things based on time of day. <br><br>&nbsp;&nbsp;&nbsp; &nbsp;year = 4 digit year. Example year="2009"<br>&nbsp;&nbsp;&nbsp; &nbsp;yday = 1-365<br>&nbsp;&nbsp;&nbsp; &nbsp;mon = 1-12<br>&nbsp;&nbsp;&nbsp; &nbsp;mday = 1-31<br>&nbsp;&nbsp;&nbsp; &nbsp;week = 1-52<br>&nbsp;&nbsp;&nbsp; &nbsp;mweek= 1-6<br>

&nbsp;&nbsp;&nbsp; &nbsp;wday = 1-7<br>&nbsp;&nbsp;&nbsp; &nbsp;hour = 0-23<br>&nbsp;&nbsp;&nbsp; &nbsp;minute = 0-59<br>&nbsp;&nbsp;&nbsp; &nbsp;minute-of-day = 1-1440<br>&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; &nbsp;Example:<br>&nbsp;&nbsp;&nbsp; &nbsp;&lt;condition minute-of-day="540-1080"&gt; (9am to 6pm EVERY day)<br>&nbsp;&nbsp;&nbsp; &nbsp;do something ...<br>

&nbsp;&nbsp;&nbsp; &nbsp;&lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;extension name="tod_example" continue="true"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition wday="2-6" hour="9-18"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="open=true"/&gt;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<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>