Sim barring is a simple tool to help you bar calls and messages without turning off your phone.
Here are some of the simple ways you can bar calls and messages from reaching you:
If you want to receive messages, perhaps you have the “I tried calling you” thing and want to get the message after someone called you when your phone was active on barred calls but still on.
Then for this option on your phone using a Safaricom line , dial *21# to activate and #21# to deactivate the service.
This option you will not receive any message at all. The sender will get a red exclamation mark to show message not sent.
A caller will be told your number is temporarily out of service. Dial *35*0000# to activate and #35*0000# to deactivate the service.
You can set this manually on your handset by going to Settings >> Call settings >> Call barring >> Activate.
Hoping this will totally help you.