How to block all phone calls, but only allow SMS and networking? It's kinda disturbing when people keep calling me during work or meetings, but to me it's okay if I receive short messages or Whatsapp message because I can reply them few minutes later in a short break. I'm new Android user and wonder if my phone could do that for me.
You can use the tried and tested Call Barring method


Go to Settings
Select Call Settings
Look for Call barring
Now select All Incoming
Enter your default PIN (1234)


There, all incoming calls will be blocked. You may still be able to place calls unless you barred that too.

This feature is carrier network dependent and it already exists in the dumbphone era. Still useful though.