Night and day automatic service?

Good morning and sorry for my english, i write from Italy
actually for enable or disable the night service i press *280 when i come in my office.
Is possible to enable in automatic for example at 09.00 in the morning and disable at 21:00?
If yes, i can do it?
Can you help me?
Thank you

You can use time conditions and time groups to achieve this.

To overide any time conditions or out of sync *280’s add to your cron

00 09 * * 1,2,3,4,5 /usr/sbin/rasterisk -x "database put daynight C0 DAY"
00 21 * * 1,2,3,4,5 /usr/sbin/rasterisk -x “database put daynight C0 NIGHT”

C1 for *281 etc.

hi, ok i did it, but i have the last question.

If for example i have from monday to sathurday from 9 to 21 but for example 1 of this day is public holiday (example 31 dicember, christmas, or other “red day on calendar”), how i can disable this temporal condition?
I can’t with *280, or not?
Thank you


00 09 25 12 * sleep 3;/usr/sbin/rasterisk -x "database put daynight C0 NIGHT"
00 09 31 12 * sleep 3;/usr/sbin/rasterisk -x “database put daynight C0 NIGHT”

*280 still works all the time.

this on crontab file or you say i have to add this in a new time condition in freepbx?

these are crontab entreis. you can do it in time conditions and time groups but it is a different way of looking at the same solution, using inbound routing and time condition overides instead of *280, whatever floats your boat here.