you will need number to receive sms
via smpp from service provider
via http from service provider
custom way(gsm gateway, or 3g modem and some custom development)
first 2 use cases is for jasminsms
third one is depends one your project
once you have jasmin in place, you can route incoming sms to your app(take a look a http api for jasmin)
once you processed input and have response, you can send it back via jasminsms http api,
and it will go to service provider and then to subscriber, or any other way that you used