Hi everybody I have a logic question that is confusing me. ifTime(00:00-12:00|*|*|*) { Playback(welcome-morning); } else { ifTime(12:00-18:00|*|*|*) { Playback(welcome-afternoon); } else { Playback(welcome-evening); } } Does that cover the entire day? The question arose because of the time as follows: ifTime(00:00-12:00|*|*|*) { ---- so midnight to noon fine--but should it be 11:59 or 12:00 and ifTime(12:00-18:00|*|*|*) { -- should it be from 12:01 However doing that I assume will miss a minute. Anybody know :) D -- _________________________________________ Mr. David Anthony O'Reilly, M.Sc, B.Sc Researcher @ MISL Group, University College Cork (Current) M.Sc MOB Postgraduate @ University College Cork - M.Sc (Mobile Networking and Computing) - 2009 Computer Science Graduate of The University of Dublin, Trinity College - B.Sc (Computer Science) 2008 Email: oreillda at tcd.ie / dor3 at student.cs.ucc.ie Tel: +353 (0) 86 030 60 32 _________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090813/7f9f8025/attachment.htm
My ?Assumption? would be that 00:00-12:00 actually covers midnight to 12:00:59. I would verify this by hitting this dialplan at 30 seconds after noon local time. Since I?m still on 1.4, this one is academic to me. _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of D?ibh?ad Antoine O'Reilligh Sent: Thursday, August 13, 2009 3:43 PM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Time of Day Routing Hi everybody I have a logic question that is confusing me. ifTime(00:00-12:00|*|*|*) { Playback(welcome-morning); } else { ifTime(12:00-18:00|*|*|*) { Playback(welcome-afternoon); } else { Playback(welcome-evening); } } Does that cover the entire day? The question arose because of the time as follows: ifTime(00:00-12:00|*|*|*) { ---- so midnight to noon fine--but should it be 11:59 or 12:00 and ifTime(12:00-18:00|*|*|*) { -- should it be from 12:01 However doing that I assume will miss a minute. Anybody know :) D -- _________________________________________ Mr. David Anthony O'Reilly, M.Sc, B.Sc Researcher @ MISL Group, University College Cork (Current) M.Sc MOB Postgraduate @ University College Cork - M.Sc (Mobile Networking and Computing) - 2009 Computer Science Graduate of The University of Dublin, Trinity College - B.Sc (Computer Science) 2008 Email: oreillda at tcd.ie / dor3 at student.cs.ucc.ie Tel: +353 (0) 86 030 60 32 _________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090813/df0f24f1/attachment.htm
D?ibh?ad Antoine O'Reilligh wrote:> I have a logic question that is confusing me. > > ifTime(00:00-12:00|*|*|*) { > > Playback(welcome-morning); > > } else { > ifTime(12:00-18:00|*|*|*) { > > Playback(welcome-afternoon); > > } else { > Playback(welcome-evening); > > } > } > > > Does that cover the entire day? The question arose because of the time > as follows: > > ifTime(00:00-12:00|*|*|*) { ---- so midnight to noon fine--but should > it be 11:59 or 12:00 > > and ifTime(12:00-18:00|*|*|*) { -- should it be from 12:01 > > However doing that I assume will miss a minute.according to the wiki pages: <minute> = a number, 0 to 59, inclusive so. look back at your logic, your welcome-morning message will be played before 12:01. and your welcome-afternoon message will be played on & after 12:01. -- Edwin Lam <edwin.lam at officegeneral.com> Systems Engineer, Office General, Inc. Ph: +1 415 439 4988 Fax: +1 415 283 3370 http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0xD6506D20
Hi David, With this: ifTime(00:00-12:00|*|*|*) Whatever time you specify at the end, I believe asterisk continues to evaluate this condition as true for 2 more minutes. So in this case, it will be valid for 00:00-12:02, even though you've specified 12:00 Cheers! Neeraj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090814/af4f9d91/attachment.htm
Asterisk version 1.4 ________________________________ From: Neeraj Chand Sent: Friday, 14 August 2009 8:17 PM To: 'asterisk-users at lists.digium.com' Subject: [asterisk-users] Time of Day Routing Hi David, With this: ifTime(00:00-12:00|*|*|*) Whatever time you specify at the end, I believe asterisk continues to evaluate this condition as true for 2 more minutes. So in this case, it will be valid for 00:00-12:02, even though you've specified 12:00 Cheers! Neeraj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090814/73bd3168/attachment.htm