you have mixed two things.

call barring is a network service, that you can activate or deactivate, and it is used to block outgoing calls, incoming calls or both.
to get around this: disable call barring from the menu. if you don't know the code - ask your operator to reset it.

barring (or blacklisting) happens when the phone is reported lost or stolen to the operator. when you report a phone stolen the operator will block the imei, and you will not be able to make calls or recieve calls with the blacklisted phone.
to get around this: change the imei.

changing the imei for dct4 models like 5100 is not simple. it requires soldering, changing chips, and programming using flash boxes which are very expensive. buying a new phone will be cheaper than doing this.

flashing the phone will not help you, if the condition is one of the above.