Conditional routing based on DID

Is there a module or method to route calls based on DID after passing through the inbound routes?

The idea is that during the day, all calls come to the operator. When Night Mode has been toggled ON, calls to DID1 will dial a specific ring group, but calls to DID2 will go to a voicemail bin.

Yes, it is called time conditions and time groups. Read up on the Wiki about how to use it… I use it quite a bit, I even use it on my home machine to stop calls after a certain time at night, it restores the calls in the morning. Using inbound routes, I can pick important numbers I want to go around the night time restrictions.