Send AT commands using GSM library

HI

I'm having some problems with the arduino when establishing a connection. Where the arduino is placed there is bad roaming and sometimes there is and sometimes no.

When there is no coverage, the gsm library hangs it waiting for a connection...

What I'm thinking is to send AT commands manually and see the response and determine if the connection is established or not.

Anybody has did something like this?

I need some guidance

Thank you so much