how do I store the no1 in permeant memory

think it be overly complicated storing 10 digits in 5 bytes, well for now anyway

fixed the issue on first number not storing I think, well it tested out okay more than once.

so full code currently:-

#include <SoftwareSerial.h>
#include <EEPROM.h>
SoftwareSerial mySerial(7, 8);
String no1s;
String no1;
String no2;
String SMS1;
String ATD1= "ATD" + no1+";";

String Message2="Alarm";
String Siteid="Home\r";
String Message;
String Message1="Arm";

const int EEPROM_MIN_ADDR = 0;
const int EEPROM_MAX_ADDR = 1023;
boolean eeprom_is_addr_ok(int addr) {
return ((addr >= EEPROM_MIN_ADDR) && (addr <= EEPROM_MAX_ADDR));
}
boolean eeprom_write_bytes(int startAddr, const byte* array, int numBytes) {
// counter
int i;
if (!eeprom_is_addr_ok(startAddr) || !eeprom_is_addr_ok(startAddr + numBytes)) {
return false;
}
for (i = 0; i < numBytes; i++) {
EEPROM.update(startAddr + i, array[i]);
}
return true;
}
boolean eeprom_write_string(int addr, const char* string) {
int numBytes; // actual number of bytes to be written
//write the string contents plus the string terminator byte (0x00)
numBytes = strlen(string) + 1;
return eeprom_write_bytes(addr, (const byte*)string, numBytes);
}
boolean eeprom_read_string(int addr, char* buffer, int bufSize) {
byte ch; // byte read from eeprom
int bytesRead; // number of bytes read so far
if (!eeprom_is_addr_ok(addr)) { // check start address
return false;
}

if (bufSize == 0) { // how can we store bytes in an empty buffer ?
return false;
}

// is there is room for the string terminator only, no reason to go further
if (bufSize == 1) {
buffer[0] = 0;
return true;
}

bytesRead = 0; // initialize byte counter
ch = EEPROM.read(addr + bytesRead); // read next byte from eeprom
buffer[bytesRead] = ch; // store it into the user buffer
bytesRead++; // increment byte counter

while ( (ch != 0x00) && (bytesRead < bufSize) && ((addr + bytesRead) <= EEPROM_MAX_ADDR) ) {
// if no stop condition is met, read the next byte from eeprom
ch = EEPROM.read(addr + bytesRead);
buffer[bytesRead] = ch; // store it into the user buffer
bytesRead++; // increment byte counter
}
if ((ch != 0x00) && (bytesRead >= 1)) {
buffer[bytesRead - 1] = 0;
}
return true;
}
const int BUFSIZE = 12;
char buf[BUFSIZE];
String myString; 
char myStringChar[BUFSIZE];

///
void setup()

{

 mySerial.begin(9600);   // Setting the baud rate of GSM Module 
 Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
 delay(100);

}

void loop()

{
 if (Serial.available()>0)
  switch(Serial.read())
 
 {  
   case '1':
   
    Message = Siteid+Message1;
    SendMessage();
    break;

    case '2':
    Message = Siteid+Message2;
    SendMessage();
    break;
  
    case'd':
    DialCall();
    break;

    case 'm':
    Number();
    break;

    case 'n':
    Current();
    break;
case 't':
  TestLoop();
  break;
  default:
     RecieveMessage();
     break;
     }

if (mySerial.available()>0)
  Serial.write(mySerial.read());
 
}

void SendMessage()
{ 
 eeprom_read_string(0, buf, BUFSIZE);
 Serial.println(buf);
 no1 =buf;
 mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
 delay(1000);  // Delay of 1000 milli seconds or 1 second
 SMS1 ="AT+CMGS=\"" + no1 + "\"\n\r";
 mySerial.println(SMS1); // Replace x with mobile number mySerial.println("AT+CMGS=\"xxxxxxxxxx\"\n\r");
 delay(1000);
 mySerial.println(Message);// The SMS text you want to send
 delay(100);
 mySerial.println((char)26);// ASCII code of CTRL+Z
 delay(1000);

}

void RecieveMessage()

{ mySerial.println("AT+CMGL=\"ALL\"\r");
 mySerial.println("AT+CNMI=2,2,0,0,0\r"); // AT Command to recieve a live SMS
  delay(1000);
}

void DialCall()
{
 
 mySerial.println(ATD1); // ATDxxxxxxxxxx; -- watch out here for semicolon at the end!!"ATD07815698180;"
 delay(30000);
 mySerial.println("ATH");
 delay(10000);
 mySerial.println("ATDL");
}

void Number()
{ Serial.println("Enter Mobile Number:");// prompt user input
while(Serial.available()==0){}//wait for user input
no1 = Serial.readString(); //read input
//Serial.println(no1);
if(no1.startsWith("SMS1",0)){
Serial.println("Saving variable string to address 0");
no1s = no1.substring(4);
myString=no1s;
myString.toCharArray(myStringChar, BUFSIZE); //convert string to char array
strcpy(buf, myStringChar);
eeprom_write_string(0, buf); 
Serial.print("Reading string from address 0: ");
eeprom_read_string(0, buf, BUFSIZE);
Serial.println(buf);}
else{
if(no1.startsWith("SMS2",0)){
Serial.println("Saving variable string to address 11:");
no1s = no1.substring(4);
myString=no1s;
myString.toCharArray(myStringChar, BUFSIZE); //convert string to char array
strcpy(buf, myStringChar);
eeprom_write_string(11, buf); 
Serial.print("Reading string from address 11: ");
eeprom_read_string(11, buf, BUFSIZE);
Serial.println(buf);
}
}}
void Current()
{
 /*Serial.println("Current Mobile No:");
}
eeprom_read_string(0, buf, BUFSIZE);
Serial.println(buf);
Serial.println("Current Mobile No 2:");
eeprom_read_string(11, buf, BUFSIZE);
Serial.println(buf);*/
//
int i;
 for (i = 0; i < 3; i++) {
 Serial.print("Current Mobile No:");
 Serial.println(i+1);
eeprom_read_string((i*11), buf, BUFSIZE);
Serial.println(buf);
}
}

void TestLoop()
{
 int i;
 for (i = 0; i < 3; i++) {
   Serial.print("Input Mobile Number: ");
   Serial.println(i+1);
 Serial.println("Awaiting Input"+i);
   while(Serial.available()==0){}//wait for user input
   
   no1 = Serial.readString(); //read input
   //Serial.println(i+1);
   Serial.println(no1);
   if(no1.startsWith("SMS",0)){  
   Serial.println(i+1);
  
   Serial.print("Saving variable string to address: ");
   Serial.println(i*11);
   no1s = no1.substring(4);
   myString=no1s;
  
   myString.toCharArray(myStringChar, BUFSIZE); //convert string to char array
   strcpy(buf, myStringChar);

   eeprom_write_string((i*11), buf); 

   Serial.print("Reading string from address : ");
   Serial.println(i*11);
   eeprom_read_string((i*11), buf, BUFSIZE);
   Serial.println(buf);
 
 
   }
   
   
   
 }

}