Is there a way to accept inbound SMS from contacts not in your database?
Jaap Jansma at CiviCoop has developed two extensions that do this for us. It is connected to a Norwegian sms provider, but the code is available on github.

He used a trick... To automatically create a contact with no name, but only email(as Civi requirements for creating a contact). A contact with cell phone number 123456789 would then get an email like this: 123456789@mobile.sms

This is again easy to search for or make a report for back office staff to go through. (Email adresses containing @mobile.sms)

Norwegian sms provider PSWincom

Sms autoreply