How to auto reconnect, if internet connection disconnect with sim800L

some body help me

  1. I need code auto reconnect, if internet connection disconnect or failed connect with sim800L.
  2. how to convert command at+csq to dbm

thank you