I created all the events in the calendar, that works (a bug or two with the recurring field, but I navigated around them).
But I can’t seem to get FMFM to work. What should I be selecting in order to send calls to a Ring Group instead of ringing the extension? I fiddled, but in the end I fiddled so much, calls just stopped ringing and went straight to voicemail. I tried a few of the different ringing schemes and setting initial ring time to ‘0’ but no dice
Am I right that I need to reload asterisk config after every change? (I was doing that.)
well, if the way to do that is by using FMFM, I created all the events in the calendar, that works (a bug or two with the recurring field, but I navigated around them). But I can’t seem to get FMFM to work. At no point could I get calls to divert to another extension/destination based on the calendar.
OK…so it looks like toggling an extension’s DND with calendar was never implemented BUT using a time condition controlled by the calendar might work. I didn’t find that FMFM controlled by calendar could be made to work but maybe the same is not true of a time condition!
If it’s just your wife’s phone (this solution doesn’t scale) and only on Fridays, you could do something like this:
Instead of direct modifications to your blacklist (like the example), you could change CFW or FMFM the same way, then kick the job off from ‘crontab -e asterisk -u’. You can use the fwconsole command to check out the various database objects you can manhandle this way and make your changes at will.
The advantage - to turn it off early, you can just use the standard Asterisk Feature Codes to turn them on and off from her phone if desired.
I wouldn’t say “the best” because this process does not scale - there is no economy of processing to it and you need to remember who you did everything to.
A solution - yes. The code that Lorne posted in GitHub might be overkill for this, but you are getting the idea. One important foot stomp is to remember that the ASTDB is not multiuser - if you are going to modify it, you need to go through the Asterisk process (asterisk -rx ‘database set …’) or you risk hosing your database and rendering your phone system inop.
It is possibly overkill but it’s lean, neat and effective. I propose to use it with NodeRed. My Home Automation solution will tell NodeRed when to set the DND.
I’d be genuinely curious what’s a simpler option than setting the DND for an extension with a small script? Remember trying to use the calendar option didn’t work - for some reason FMFM didn’t “obey” the calendar.