On my Samsung, I think Blocking Mode - Block Incoming Calls, then Allowed Contacts - All Contacts would do it. I would need to change the default night time period to anytime.
I also have a Moto G, but cannot find a similar setting there.
Outgoing calls I am struggling with.
If you can mention your device, someone can help more.