GSM Code to interface with sensor

Hi, i been working on a project to send and receive SMS , objective is that once the sensor hit some value the GSM will send some messages and expecting a reply for the recipient . example reply like "please send 1 to turn on led", upon receiving the GSM suppose to send a signal to turn on a LED. I been able to send sms but cant receive. I am working on GSM SIM5320E with Arduino UNO Please guide me.. Thank you

I had attached my code

final_proj_anti_theft.ino (2.59 KB)

Have you not tried coding the recieve yet? I cant see a function for it.

I will leave it up to you to figure out what you want to do with the information but as a start you could try:

while(mysim.available()>0) 
  {
    Serial.write(mysim.read());//Forward what GSM received to Serial Port
    if (Serial.read() > 0){
      Serial.println(Serial.read());
}