Ultrasonic sensor with GSM board - calling within a distance

It does not really matter from the aspect of the solution I think

It matters greatly if the sonar pings on the rising edge of the trigger pulse.

What do the debug prints show?