Ultrasonic sensor with GSM board - calling within a distance

Please someone give a little help.

Some intelligent arrangement of code might be useful.

  // Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);

  // Clears the trigPin
digitalWrite(trigPin, LOW);
delay(500);

// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delay(1000);
digitalWrite(trigPin, LOW);

// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);

// Calculating the distance
distance= duration/58.2;

Why the hell would you print some bogus value, label it distance, and THEN measure the distance?

 delay(10000);  // wait for 30 seconds...

Stupid comment. That is NOT what the code does.

What pins is the call library expecting to use? Are they actually available?

I'd ask you what distance you actually measure, but it is obvious that you haven't a clue, so I won't bother.