Combining multiple similar flows

I found a way to “flip” multiple toggles through some dialplan code in /etc/extensions_custom.conf I add two custom contexts as in:
.
.
.
[set-call-flow-on]
exten => *285,1,Answer
exten => *285,2,Set(DB(DAYNIGHT/C0)=NIGHT)
exten => *285,3,Set(DB(DAYNIGHT/C1)=NIGHT)
exten => *285,4,Set(DB(DAYNIGHT/C2)=NIGHT)
exten => *285,5,Hangup

[set-call-flow-off]
exten => *286,1,Answer
exten => *286,2,Set(DB(DAYNIGHT/C0)=DAY)
exten => *286,3,Set(DB(DAYNIGHT/C1)=DAY)
exten => *286,4,Set(DB(DAYNIGHT/C2)=DAY)
exten => *286,5,Hangup

(remember to “include” these custom contexts!)

So, when I dial *285 it sets three Call Flows to “Night” (mine are numbered 280, 281 and 282 by default, but only the 0,1,2 matter) and when I dial *286 they go back to “Day”. I think with a little more work; using DBget and GotoIF these could probably be turned into a single toggle, but it is simpler than setting three Call Flows individually and of course by adding more “Set(DB(DAYNIGHT/Cn)=” you can increase the number of Call Flows toggled.