SIM900 didnt respond incoming SMS command

Hello, I have a program to make a communication between phone and arduino uno. I tried to make and send input command using serial monitor. It works, the LED is on, and it sent me an SMS like I set to do.

      #include <SoftwareSerial.h>
      #define CH1 2  
      #define CH2 3 
      #define CH3 4 
      #define CH4 5
      SoftwareSerial mySerial(7, 8);

      void setup()
      {
       mySerial.begin(9600);   // Setting the baud rate of GSM Module  
       Serial.begin(9600);
       delay(1000);
       SendMessageSiap();
       delay(5000);
       pinMode(CH1, OUTPUT);
       pinMode(CH2, OUTPUT);
       pinMode(CH3, OUTPUT);
       pinMode(CH4, OUTPUT);
       digitalWrite(CH1,HIGH);
       digitalWrite(CH2,HIGH);
       digitalWrite(CH3,HIGH);
       digitalWrite(CH4,HIGH);  // Setting the baud rate of Serial Monitor   (Arduino)
       delay(100);
       }


      void loop()
      {
       if (Serial.available()>0)
       switch(Serial.read())
      {
    
       case 'A':   
         onPin1();
       SendMessageA();   
       break;
   
       case 'B':   
         onPin2();
      SendMessageB();     
         break;
   
   
       case'C':   
         onPin3();
         SendMessageC();
         break;       
   
       case 'D':   
         onPin4();
     SendMessageD();     
     break;   
           
     case 'a':
     offPin1();
     SendMessagea();     
     break;
     
     case 'b':   
     offPin2(); 
     SendMessageb();    
     break;
     
     case 'c':   
     offPin3(); 
     SendMessagec();    
     break;
     
     case 'd':   
     offPin4();
     SendMessaged();     
     break;
     
     case 'f':   
     allOff(); 
      SendMessagef();    
     break;
     
     case 'n':   
     allOn(); 
     SendMessageN();    
     break;
       }

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


       void SendMessageA()
     {
       mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
       delay(1000);  // Delay of 1000 milli seconds or 1 second
       mySerial.println("AT+CMGS=\"+6285726576677\"\r"); // Replace x with mobile number
       delay(1000);
       mySerial.println("Lampu 1 Nyala");// The SMS text you want to send
       delay(100);
       mySerial.println((char)26);// ASCII code of CTRL+Z
       delay(1000);
     }

      void SendMessageSiap()
     {
      mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
      delay(1000);  // Delay of 1000 milli seconds or 1 second
      mySerial.println("AT+CMGS=\"+6285726576677\"\r"); // Replace x with mobile      number
      delay(1000);
      mySerial.println("Sistem Siap");// The SMS text you want to send
      delay(100);
       mySerial.println((char)26);// ASCII code of CTRL+Z
       delay(1000);
     }

    void SendMessageB()
    {
       mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
       delay(1000);  // Delay of 1000 milli seconds or 1 second
         mySerial.println("AT+CMGS=\"+6285726576677\"\r"); // Replace x with mobile number
       delay(1000);
      mySerial.println("Lampu 2 Nyala");// The SMS text you want to send
      delay(100);
        mySerial.println((char)26);// ASCII code of CTRL+Z
      delay(1000);
      }

      void SendMessageC()
    {
      mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
     delay(1000);  // Delay of 1000 milli seconds or 1 second
      mySerial.println("AT+CMGS=\"+6285726576677\"\r"); // Replace x with mobile number
      delay(1000);
       mySerial.println("Lampu 3 Nyala");// 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+CNMI=2,2,0,0,0"); // AT Command to receive a live SMS
    delay(1000);
    }
 
   
    void allOn(){
    digitalWrite(CH1, LOW);
    digitalWrite(CH2, LOW);
    digitalWrite(CH3, LOW);
    digitalWrite(CH4, LOW);
     }

Now, I got issues to make the command is present from phone, how to change the serial monitor to phone as input command?

I tried this method :

    #include <SIM900.h>
    #include <sms.h>
    #include <SoftwareSerial.h>

    SMSGSM sms;
    boolean started=false;
    char smsbuffer[160];
    char n[20];

    int relay1=2;
    int relay2=3;
    int relay3=4;
    int relay4=5;

    void setup(){
    pinMode(relay1,OUTPUT);
    pinMode(relay2,OUTPUT);
    pinMode(relay3,OUTPUT);
    pinMode(relay4,OUTPUT);
    if(gsm.begin(9600)){
    started=true;
    
    }
  
    if(started){
    delsms(); 
    }
    delay(1000);
    sms.SendSMS("+6285726576677","4 Saklar SMS Menyala");
    }

    void loop(){
 
    if(gsm.begin(9600)){
    started=true;
    } 
    int pos=0;
    if(started){
    pos=sms.IsSMSPresent(SMS_ALL);
    if(pos){
    sms.GetSMS(pos,n,smsbuffer,100);
    
    if(!strcmp(smsbuffer,"relay1on")){
      
      digitalWrite(relay1,HIGH);
      sms.SendSMS(n,"Relay 1 Telah Aktif");
    }
    if(!strcmp(smsbuffer,"relay2on")){
      
      digitalWrite(relay2,HIGH);
      sms.SendSMS(n,"Relay 2 Telah Aktif");
    }
    if(!strcmp(smsbuffer,"relay3on")){
      
      digitalWrite(relay3,HIGH);
      sms.SendSMS(n,"Relay 3 Telah Aktif");
    }
    
    if(!strcmp(smsbuffer,"relay4on")){
      
      digitalWrite(relay4,HIGH);
      sms.SendSMS(n,"Relay 4 Telah Aktif");
    }
    
    
    
    
    if(!strcmp(smsbuffer,"relay1off")){
      
      digitalWrite(relay1,LOW);
      sms.SendSMS(n,"Relay 1 Telah di Nonaktifkan");
    }
    if(!strcmp(smsbuffer,"relay2off")){
      
      digitalWrite(relay2,LOW);
      sms.SendSMS(n,"Relay 2 Telah di Nonaktifkan");
      
    }
    if(!strcmp(smsbuffer,"relay3off")){
      
      digitalWrite(relay3,LOW);
      sms.SendSMS(n,"Relay 3 Telah di Nonaktifkan");
    }
    
    if(!strcmp(smsbuffer,"relay4off")){
      
      digitalWrite(relay4,LOW);
      sms.SendSMS(n,"Relay 4 Telah di Nonaktifkan");
    }
    
    
    
    if(!strcmp(smsbuffer,"semuaon")){
      digitalWrite(relay4,HIGH);
      digitalWrite(relay3,HIGH);
      digitalWrite(relay2,HIGH);
      digitalWrite(relay1,HIGH);
      sms.SendSMS(n,"Semua Relay Telah Aktif");
    }
    
    if(!strcmp(smsbuffer,"semuaoff")){
      digitalWrite(relay4,LOW);
      digitalWrite(relay3,LOW);
      digitalWrite(relay2,LOW);
      digitalWrite(relay1,LOW);
      sms.SendSMS(n,"Semua Relay Telah di Nonaktifkan");
    }
   
    delsms();
    }
    }
    delay(100);
    }



    void delsms()
    {
    for (int i=0; i<10; i++)
    {  
      int pos=sms.IsSMSPresent(SMS_ALL);
      if (pos!=0)
      {
        if (sms.DeleteSMS(pos)==1){}else{}
      }
    }
    }

No error, but the arduino didnt respond my sms command.

I need help to convert the getSMS command to the first sketch or fix the 2nd sketch. Thankyou for your help!