The issue is not the phone being locked--if it were locked you would not be able to use it at all so it must be something else.
Here is the problem: there are many different things that would explain the problem you are having.
However, a hardware fault is not typically the most likely especially with a new phone.
It is much more likely that it is a network-related or a software issue on the phone. However, if there is no authorized Apple service provider for Sri Lanka it is not easy to determine whether there is a compatibility issue or not.
The easiest way to rule out network-related issues is to see if others who are using phones purchased in Sri Lanka with the same carrier as you do not have problems in places you do. If others do not, then the problem is on your phone.
Unfortunately, there is no easy way to know whether it is a software or a hardware problem without access to an authorized service provider.