Re: [asterisk-users] Simple Time of Day Branching problem
Yes but I also have different hours for tue,thu and wed,fri. In the o'reilly book I have, it shows examples of using to group them, but I am getting the error. Sent from my iPhone On Sep 14, 2009, at 11:25 PM, Paul Hales pdha...@optusnet.com.au wrote: It's easier to work with the closed hours then - use a goto just for Sunday/Monday PaulH James Hankins wrote: Greetings folks, new to this, trying to get the syntax correct for a day of week routing. exten = 345,1,Answer() exten = 345,n,GotoIfTime(10:00-17:00|tuethusat|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|wedfri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() I'll get an error stating incorrect day of week tuethursat, assuming none What is the correct syntax for this? We have longer hours on Wednesday and Fridays and we're closed Sunday/Monday Just trying to automate the time of day greeting etc. Thanks ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
On Tue, Sep 15, 2009 at 1:28 PM, Jim Hankins j...@allpointsmediaworks.com wrote: Yes but I also have different hours for tue,thu and wed,fri. In the o'reilly book I have, it shows examples of using to group them, but I am getting the error. Not sure about the (what version?) but you can easily just put in one line per day and be done with it. /r ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
Jim Hankins wrote: exten = 345,1,Answer() exten = 345,n,GotoIfTime(10:00-17:00|tuethusat|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|wedfri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() exten = 345,1,Answer() ; *** ; * 10am to 5pm schedule ; exten = 345,n,GotoIfTime(10:00-17:00|tue|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-17:00|thu|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-17:00|sat|*|*?open,345,1) ; *** ; * 10am to 7pm schedule ; exten = 345,n,GotoIfTime(10:00-19:00|wed|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|fri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() Or you could make a database entry via a cron job and check for that entry to see if it's after hours. Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
Thanks Doug, Very helpful. That was going to be my next attempt. I'm wondering if the is not supported in 1.4.2 dunno. But this will work, thanks for the assist! Jim On Sep 15, 2009, at 8:25 AM, Doug Lytle wrote: Jim Hankins wrote: exten = 345,1,Answer() exten = 345,n,GotoIfTime(10:00-17:00|tuethusat|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|wedfri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() exten = 345,1,Answer() ; *** ; * 10am to 5pm schedule ; exten = 345,n,GotoIfTime(10:00-17:00|tue|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-17:00|thu|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-17:00|sat|*|*?open,345,1) ; *** ; * 10am to 7pm schedule ; exten = 345,n,GotoIfTime(10:00-19:00|wed|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|fri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() Or you could make a database entry via a cron job and check for that entry to see if it's after hours. Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
On Tuesday 15 September 2009 06:28:07 Jim Hankins wrote: Yes but I also have different hours for tue,thu and wed,fri. In the o'reilly book That was my fault. My apologies, but this has been added in 1.6.2. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com www.asterisk.org ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
On Tue, Sep 15, 2009 at 3:35 PM, Tilghman Lesher tles...@digium.com wrote: That was my fault. My apologies, but this has been added in 1.6.2. I suspected as much, since I couldn't find a single example searching on the web. /r ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
I haven't used GotoIfTime with a list of days, but a couple things come to mind. The list syntax wasn't in earlier versions (earlier than what, I'm not sure). The error would suggest that the version you're using doesn't recognize lists at all. Then I'm wondering about a logic issue. Your hours are the same for Tuesday, Thursday and Saturday, so you've included tuethusat. However, if the ampersand () in this case is an and operator, it would mean that it currently must be Tuesday and Thursday and Saturday--an impossibility. You would want to say tue|thu|sat so this branch will be taken if it's Tuesday, or it's Thursday, or it's Saturday. So, either the book is wrong or Asterisk has been coded to use something that looks like and to mean or. --Don Don Kelly PCF Corp People Come First 651 842-1000 888 Don Kell(y) 651 842-1001 fax -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jim Hankins Sent: Tuesday, September 15, 2009 6:28 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Simple Time of Day Branching problem Yes but I also have different hours for tue,thu and wed,fri. In the o'reilly book I have, it shows examples of using to group them, but I am getting the error. Sent from my iPhone On Sep 14, 2009, at 11:25 PM, Paul Hales pdha...@optusnet.com.au wrote: It's easier to work with the closed hours then - use a goto just for Sunday/Monday PaulH James Hankins wrote: Greetings folks, new to this, trying to get the syntax correct for a day of week routing. exten = 345,1,Answer() exten = 345,n,GotoIfTime(10:00-17:00|tuethusat|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|wedfri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() I'll get an error stating incorrect day of week tuethursat, assuming none What is the correct syntax for this? We have longer hours on Wednesday and Fridays and we're closed Sunday/Monday Just trying to automate the time of day greeting etc. Thanks ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
On Tue, 2009-09-15 at 12:39 -0500, Don Kelly wrote: So, either the book is wrong or Asterisk has been coded to use something that looks like and to mean or. The book is indeed wrong. (And yes, I wrote the section that is wrong!) Until Asterisk 1.6.3 comes out, you'll need a separate GotoIfTime stanza for each day you want to match on (Tuesday, Thursday), etc. unless they're in a range (tue-thu, for example). -- Jared Smith Training Manager Digium, Inc. ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Simple Time of Day Branching problem
Greetings folks, new to this, trying to get the syntax correct for a day of week routing. exten = 345,1,Answer() exten = 345,n,GotoIfTime(10:00-17:00|tuethusat|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|wedfri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() I'll get an error stating incorrect day of week tuethursat, assuming none What is the correct syntax for this? We have longer hours on Wednesday and Fridays and we're closed Sunday/Monday Just trying to automate the time of day greeting etc. Thanks ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Simple Time of Day Branching problem
It's easier to work with the closed hours then - use a goto just for Sunday/Monday PaulH James Hankins wrote: Greetings folks, new to this, trying to get the syntax correct for a day of week routing. exten = 345,1,Answer() exten = 345,n,GotoIfTime(10:00-17:00|tuethusat|*|*?open,345,1) exten = 345,n,GotoIfTime(10:00-19:00|wedfri|*|*?open,345,1) exten = 345,n,Playback(afterhours) exten = 345,n,Hangup() I'll get an error stating incorrect day of week tuethursat, assuming none What is the correct syntax for this? We have longer hours on Wednesday and Fridays and we're closed Sunday/Monday Just trying to automate the time of day greeting etc. Thanks ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users