sir we are doing a project based on microcontroller.we have a doubt that can we send a message from one microcontroller kit interfaced to gsm to another microcontroller kit interfaced to gsm kept at far distances
What?? Use GSM for data transfer??
No - I'm sure that's never been done before.
I'm sure that companies like Simcom, Telit, Sierra Wireless (Wavecom), Gemalto (Cinterion/Siemens) never had that in mind for any of the modules they produce.
It wouldn't even be worth googling to see if anyone has done this before.
Of course M2M isn't a real thing.
The subset of connectivity will be where both GSM modems are within the coverage area of the network operator.
If you have a dynamic IP, this may change from tower to tower, and you may go into and out of coverage areas.
... then you would be using (at least) GPRS - which wasn't mentioned in either repetition of the opening post.
Beware that GPRS subscriptions generally do not give you a Public ("routable") IP address - unless specifically requested (which is likely to be at an extra charge).
Strict GSM - i.e. GSM DATA - is a quite dead construct because of the significant cost of paying per minute instead of paying per MB or having a fixed transfer pot per month.
IP-based communication (GPRS, Edge, ...) would normally need a "man in the middle", i.e. a server and regular polls from each phone because of lack of fixed IP. The huge lack of IPv4 addresses requires extra charges for fixed IP numbers. And the move to IPv6 has been slow even if there are a few operators who demands IPv6 support when certifying support for phones/modules and sees IPv4 support as optional.