Send SMS on receive SMS in Python

OK, First, I’m new to Digi and am experimenting with X-Trak3. I checked the python sample to send sms messages, and to receive sms messages. individual examples work, but now I tried to send an sms on receiving one, a reply actually. This does not work.

def sms_callback(sms_obj):
    print ("Received message: %s from %s with timestamp %s" %
           (sms_obj.message, sms_obj.source_addr, sms_obj.timestamp))
    if sms_obj.message=="ID?":
        message="ID=%i" % ID
        message="Could not understand command"
    except Exception, e:
        return "Failure! %s" % e

The program returns the correct SMS, but exits immediately. Why? Seems to have something to do with the callback handle that is broken…?