Holidays Management

Hello I need to know how to handle holidays in the current version of freepbx, since there is no module for it, nor time conditions with a holidays table…
How do you handle holidays (to divert calls, to give a closed message, to give a VM option…)

Is it a missing feature that is being worked on to implement in the freepbx or I have to do 5000 time conditions to support it? (think of easter wich is different every year, summer vacations…)

Thanks ALL !

I have 3 time conditions setup

Holiday
Daytime
Nighttime

All inbound calls run through holiday

And I change the date from one holiday to the next

so if holiday play closed holiday
if not goto Daytime
if working hours play working message if not goto nighttime

And when one holiday has passed I set it for the next one

u go setup it each time there is a holiday, ok but I’d like to do something to setup it for like next year or ten years and forget it :smiley:

Yep but to be honest its not too much of a problem…

But if a better way exists then I would be interested :smiley:

I’ve found some sorta of management on a german site, but it’s not freepbx, just code for the asterisk conf files.

Here is a sneak

[code:1]
[from-extern]
include => feiertage-brd
include => feiertage-brd-2006
include => feiertage-rheinland-pfalz

[normal]
; Normal Actions

[ausser-geschaeftszeiten]
; Holyday Actions

[feiertage-brd]
include => ausser-geschaeftszeiten|||1|jan ; Neujahrstag
include => ausser-geschaeftszeiten|||1|may ; Tag der Arbeit
include => ausser-geschaeftszeiten|||3|oct ; Tag der Deutschen Einheit
include => ausser-geschaeftszeiten|||25|dec ; 1. Weihnachtstag
include => ausser-geschaeftszeiten|||26|dec ; 2. Weihnachtstag

[feiertage-brd-2006]
include => ausser-geschaeftszeiten|||4|apr ; Karfreitag
include => ausser-geschaeftszeiten|||17|apr ; Ostermontag
include => ausser-geschaeftszeiten|||25|may ; Christi Himmelfahrt
include => ausser-geschaeftszeiten|||5|jun ; Pfingstmontag
include => ausser-geschaeftszeiten|||15|jun ; Fronleichnam

[feiertage-brd-2007]
include => ausser-geschaeftszeiten|||6|apr ; Karfreitag
include => ausser-geschaeftszeiten|||9|apr ; Ostermontag
include => ausser-geschaeftszeiten|||17|may ; Christi Himmelfahrt
include => ausser-geschaeftszeiten|||28|may ; Pfingstmontag
include => ausser-geschaeftszeiten|||7|jun ; Fronleichnam

[feiertage-brd-…]

[feiertage-rheinland-pfalz]
include => ausser-geschaeftszeiten|||1|nov ; Allerheiligen
[/code:1]

I assume they pass the year with a variable or just change it every year…

You dont need to pass the year.

Here’s how my IVR’s look - I just dont use TimeConditions as yet (the
module) for much the same reason… Doing it ‘my way’ means I just add a
’closed’ day as neccesary just making sure its ABOVE the final 'open’
line. do construct the IVR’s though using the Digital Receptionist and
then lookup what the IVR-# is and then use that as the context to include.

Thusly, one of the incoming companies IVR’s here look like the
following, which makes it closed on the specific days mentioned
(generally weekdays that the latter rule would otherwise match in the’
business hours’ section) and then otherwise it must pretty much well
match the Business Hours section.

This means I never edit business hours, I just tack on extra ‘closed’ lines.
The big thing that took me time to ‘wrap my head around’ that made me go
’ahhh… well derrr’ is that the hours field need not be contigous…
Asterisk is smart enough to work out when it traverses Midnight within
the include… hence… the ‘inversed’ closed statements (20:00-07:59).

(Excerpt from extensions_custom.conf)

[lei-ivr-custom]
; Closed times
include => ivr-3|||25|Dec
include => ivr-3|||26|Dec
include => ivr-3|||27|Dec
include => ivr-3|||1|Jan
include => ivr-3|||2|Jan
include => ivr-3|||26|Jan
include => ivr-3|||20|Mar
include => ivr-3|||14|Apr
include => ivr-3|||17|Apr
include => ivr-3|||25|Apr
include => ivr-3|||12|Jun
include => ivr-3|20:00-07:59|mon-fri||
include => ivr-3|13:00-08:59|sat||
include => ivr-3||sun||*

; Business hours
include => ivr-2|08:00-20:00|mon-fri||
include => ivr-2|09:00-13:00|sat||

zUlisse wrote:

[quote] I’ve found some sorta of management on a german site, but it’s not freepbx, just code for the asterisk conf files.

Here is a sneak

[from-extern]
include => feiertage-brd
include => feiertage-brd-2006
include => feiertage-rheinland-pfalz

[normal]
; Normal Actions

[ausser-geschaeftszeiten]
; Holyday Actions

[feiertage-brd]
include => ausser-geschaeftszeiten|||1|jan  ; Neujahrstag
include => ausser-geschaeftszeiten|||1|may  ; Tag der Arbeit
include => ausser-geschaeftszeiten|||3|oct  ; Tag der Deutschen Einheit
include => ausser-geschaeftszeiten|||25|dec ; 1. Weihnachtstag
include => ausser-geschaeftszeiten|||26|dec ; 2. Weihnachtstag

[feiertage-brd-2006]
include => ausser-geschaeftszeiten|||4|apr  ; Karfreitag
include => ausser-geschaeftszeiten|||17|apr ; Ostermontag
include => ausser-geschaeftszeiten|||25|may ; Christi Himmelfahrt
include => ausser-geschaeftszeiten|||5|jun  ; Pfingstmontag
include => ausser-geschaeftszeiten|||15|jun ; Fronleichnam

[feiertage-brd-2007]
include => ausser-geschaeftszeiten|||6|apr  ; Karfreitag
include => ausser-geschaeftszeiten|||9|apr  ; Ostermontag
include => ausser-geschaeftszeiten|||17|may ; Christi Himmelfahrt
include => ausser-geschaeftszeiten|||28|may ; Pfingstmontag
include => ausser-geschaeftszeiten|||7|jun  ; Fronleichnam

[feiertage-brd-…]

[feiertage-rheinland-pfalz]
include => ausser-geschaeftszeiten|||1|nov  ; Allerheiligen

I assume they pass the year with a variable or just change it every year…


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

[/quote]


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

[quote=“adrian at lei.net.au”]You dont need to pass the year.
[/quote]
They pass the year because there are holidays or vacations wich are year related, eg. the easter is not the same day in years, the summer vacations may vary, and other german festivity in the example i brought.

works for the next 365 days only in the US, since gototoif time doesn’t know about years.

for use with the timeconditions module. works by adding some ‘goto the false condition on the holiday’ lines in front of the previous generated code. Forces you to make the matching condition the true or open for business case, but i think that’s pretty standard.

directions: for use with the timeconditions module. paste this to a holiday.patch file
then patch var/www/html/admin/modules/timeconditions/functions.inc.php holiday.patch

then generate new code with freepbx (submit something, red bar, etc.)

for anything other than the latest, greatest timeconditions you should check to see that these lines get added at the //add dialplan point in the function.

32a33,40
>                                       // jms hack in of major US holidays here
>                                       $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime('*|*|22-23|nov',$item['falsegoto']));
>                                       $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime('*|*|25|dec',$item['falsegoto']));
>                                       $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime('*|*|18|feb',$item['falsegoto']));
>                                       $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime('*|*|25|may',$item['falsegoto']));
>                                       $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime('*|*|1|sep',$item['falsegoto']));
>                                       $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime('*|*|1|jan',$item['falsegoto']));
>