Trying to get gprs shield to return sms response to originated number

Can someone help me. i'm trying to set up my gsm shield to respond to a sms by sending a value back to the number of origin

What code have you got so far?

I'm using AT commands. I can send a character to the device and it will reply back the value, but only to a predefined number. Is there a caller id command or something to capture the senders number and reply to it?
thanks,

Assuming that you save the message, when you retrieve it with AT+CMGR then the originating number will be returned as part of the data. See the AT documentation for your particular modem for further details.