Problem with passing AT commands to SIM 900

Hi guys!
Im trying to make a POST request and I have problems when I want to execute AT commands from a program. I already encounter a problem when I want to establish connection with this function:

void establishConnection()
{
  String MY_APN="internet";
  
  GPRS.println("AT+SAPBR=3,1,\"Contype\",\"GPRS\"");
  delay(500);
  GPRS.print("AT+SAPBR=3,1,\"APN\",\"");
  GPRS.print(MY_APN);
  GPRS.println("\"");
  delay(500);
  
  GPRS.println("AT+SAPBR=1,1");
  //delay(100);
  GPRS.println("AT+SAPBR=2,1");
  delay(1000);
}

I get this:

AT+SAPBR=3,1,"Contype","GPRS"

OK
AT+SAPBR=3,1,"APN","intern

I guess the problem is with delays and with buffering when writing to gsm module. Ive seen a function:
confirmATcommand(); which I think could be a solution but I couldnt find with which library it comes. Would that be a solution? Any help is welcome

I had the same thing. I'm guessing it's the same reason for you and that is the power supplied to your module is not adequate. How are you powering the module? Can it deliver a 2A spike in current? If you're just powering it through the arduino 5V pin then you'll need to add an external power supply. I use to Li Ion batterys with a voltage regulator to bring it down to 5V