how separate message numbers?

I am separating the numbers that are only 8 digits and they will always be that way, the code does not work nor does it tell me any error

void setup() {
}
void loop() {
mensaje_sms();
}

void mensaje_sms()
{
if (Serial.available() > 0) {

String Texto = String(Serial.read()); // introduced in the Monitor Series:
// 77889966Hello World: The numbers will always be 8 digits

String numero = Texto.substring(0, 7); // I'm separating the number
String mensaje = Texto.substring(8); // this message

SIM900.print("AT+CMGF=1\r");
delay(100);
SIM900.print("AT+CMGS="591");
SIM900.print(numero);
SIM900.println(""");
delay(100);
SIM900.println(mensaje);
delay(100);
SIM900.println((char)26);
delay(100);
SIM900.println();
delay(5000);
Serial.println("SMS sent successfully");

}
}

String Texto = String(Serial.read())

will just read the first char that's available...

Better way, drop String and use strings. See Robin2's Serial Input Basics tutorial.[/code]

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

...R