Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-31 Thread Terry Wilson
This has been on my ToDo list far too long. I have a small call-center setup, with basic time of day/day of week validation before putting callers in the queues. Just thought I'd post here that this is one of the reasons I developed Calendaring for Asterisk. Basically, you can use

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-30 Thread Lenz Emilitri
I have a small script that I use to control queue access, it's an AGI script that lets you define on-off periods on a weekly basis plus holidays. I never get around to publishing it, though I find it quite useful - if anybody is interested, I'll clean it up and share it :-) l. 2008/12/23 Dan

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-29 Thread Tilghman Lesher
On Tuesday 23 December 2008 04:08:00 pm Daniel Hazelbaker wrote: We chose to use a mySQL database to store the holiday information. When a call is answered we query the database to see if there is a holiday greeting recorded, if so we play the indicated greeting, otherwise play the default

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-29 Thread Steve Murphy
On Tue, 2008-12-23 at 10:11 -0800, Dan Austin wrote: This has been on my ToDo list far too long. I have a small call-center setup, with basic time of day/day of week validation before putting callers in the queues. With the holidays upon us, I need to add check to see if 'today' is a

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-29 Thread Adam Moffett
I'm making extensive use of the MYSQL command.do you know if this behavior is considered a bug or not? This dialplan is illustrative of the particular problem of the MYSQL command in that no cleanup is performed if the dialplan terminates abnormally. If a device hangup occurs between

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-29 Thread Adam Moffett
Next question: When you say extra resources will be consumed until a restart is performed. Do you mean I have to restart asterisk to free up said resources? Will a reload do it also? This dialplan is illustrative of the particular problem of the MYSQL command in that no cleanup is

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-29 Thread Philipp Kempgen
Adam Moffett schrieb: I'm making extensive use of the MYSQL command.do you know if this behavior is considered a bug or not? This dialplan is illustrative of the particular problem of the MYSQL command in that no cleanup is performed if the dialplan terminates abnormally. If a device

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-29 Thread Tilghman Lesher
On Monday 29 December 2008 02:06:09 pm Adam Moffett wrote: This dialplan is illustrative of the particular problem of the MYSQL command in that no cleanup is performed if the dialplan terminates abnormally. If a device hangup occurs between the Connect and Disconnect, or worse, between

[asterisk-users] Dailplan code for holiday detection?

2008-12-23 Thread Dan Austin
This has been on my ToDo list far too long. I have a small call-center setup, with basic time of day/day of week validation before putting callers in the queues. With the holidays upon us, I need to add check to see if 'today' is a holiday so I do not put callers in unmanned queues. Due to how

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-23 Thread Tilghman Lesher
On Tuesday 23 December 2008 12:11:41 Dan Austin wrote: This has been on my ToDo list far too long. I have a small call-center setup, with basic time of day/day of week validation before putting callers in the queues. With the holidays upon us, I need to add check to see if 'today' is a

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-23 Thread Scott L. Lykens
Not the most elegant but since I have a generic context for my IVRs I simple check the date there. exten = s,n,GotoIfTime(*|*|1|jan?closed-holiday|1) exten = s,n,GotoIfTime(*|*|10|apr?closed-holiday|1) exten = s,n,GotoIfTime(*|*|25|may?closed-holiday|1) exten =

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-23 Thread Daniel Hazelbaker
We chose to use a mySQL database to store the holiday information. When a call is answered we query the database to see if there is a holiday greeting recorded, if so we play the indicated greeting, otherwise play the default menu greeting. (We do our dialplans in AEL) context

Re: [asterisk-users] Dailplan code for holiday detection?

2008-12-23 Thread Dan Austin
Tilghman wrote: Astdb is a nice idea. Something along the lines of: GotoIf(0${DB(holiday/${STRFTIME(,,%Y-%m-%d)})}?holiday,s,1) would work. Holidays are evaluated as 01, which is true. Anything not in the database would be evaluated as 0, which is false. This will work both for holidays