Hi help needed on GSM

My serial Monitor say that the number was called but i did not receive that call to my phone. i have test it alone without combining with other programming and it work.

maxmix.ino (2.08 KB)

#include <GSM.h> //library for GSM
GSM gsmAccess; // include a ‘true’ parameter for debug enabled
GSM_SMS sms;

int X=0;
int Y=0;
int SEND=0;
int PIRVal=0;
int Signal=0;
int PasTime=0;
int LastVal=0;
int PresenTime=0;
int WorkingState=0;
int CurrentState=0;
int PreviouState=0;
const int gsm=9;
const int PIR=10;
const int LED=11;
const int LED1=4;
const int LED2=5;
const int infrared=12;

void setup() {
Serial.begin(9600);
pinMode(PIR,INPUT);
pinMode(gsm,OUTPUT);
pinMode(LED,OUTPUT);
pinMode(infrared,OUTPUT);
pinMode(LED1,INPUT);
pinMode(LED2,OUTPUT);

digitalWrite(gsm,HIGH);
delay(1000);
digitalWrite(gsm,LOW);
delay(10000);
delay(5000);
}

void loop() {
X=digitalRead(infrared);
if (X==HIGH){
digitalWrite(LED,HIGH);
CurrentState=1;
}
else{
digitalWrite(LED,LOW);
CurrentState=0;
}
if (CurrentState !=PreviouState){
if (CurrentState==1){
WorkingState=WorkingState+1;
}
}
PreviouState=CurrentState;
delay(1000);
if(WorkingState==2){
delay(1000);
WorkingState=0;
}{
Serial.println(CurrentState);
Serial.println(WorkingState);
}

Y=digitalRead(PIR);
if (WorkingState==1 && Y==HIGH){
PresenTime=1;
}
else{
PresenTime=0;
}
if (PresenTime !=PasTime){
if (PresenTime==1){
LastVal=LastVal+1;
}
else{ //else (PresenTime==0);
PIRVal=PIRVal+1;
}
}
PasTime=PresenTime;
delay(1000);

if(LastVal==PIRVal){
Signal=5;
digitalWrite(LED2,LOW);
}
else { //(LastVal != PIRVal);
digitalWrite(LED2,HIGH);
Signal=3;
delay(6000);
}
{Serial.println(LastVal);
Serial.println(PIRVal);
Serial.println(Signal);}

if(Signal==3)
{

Serial.print(“ATD82840307;\r”); // Number to call
delay(5000);
while(!digitalRead(Signal));
}

else
{
Serial.print(“NO”);
delay(1000);
}

}