on the WISM0228 which was the last GSM modem I used there is a command at+csq which gives signal quality
I seem to remember a value less than 9 was poor signal quality and the device would probably not work
looking at my code to initiailse the modem I sent
AT, AT_PSSTKI, AT_CSQ, AT_CNUM, AT_CMGF
to make sure all was OK then I would send a GSM text, a UDP datagram or make a TCP connection
I found it sometimes took several attempts to make a succesful connection in particular when using TCP/IP
In practice I attempted to transmit 10 times and if it failed then gave up and showed an error message