Example of how to use SMS custom, a feature of playSMS provided by plugin SMS custom for accessing external script on remote URL to get proper SMS response.
Visit here to view example and discuss it: Auto collect sender mobile number
Another post worth to read: Manage custom keyword help – first time.
Try it on your own playSMS server, or use playSMS demo and menu Settings -> Simulate incoming SMS to simulate incoming SMS and the result.
Enjoy learning.