Message server with asterisk?

Is it possible to program Asterisk to respond to SMS over SIP or SIMPLE and/or to do some database actions in responce?

Thnks.

Maybe with GSM gateway with SIP protocol support. Easygate from 2N has an option.

I is interesting not to pay GSM provider, only for internet.
I have heard, that SIP provides something named “MESSAGE” field or header, which allows transferring of text messages.

Does Asterisk can receive such a header and store it in the database?

Asterisk has option Send Text. And I successful sent text to phone which can accept text messages. I suppose Asterisk can send text to other Asterisk server also, or can accept text message from sip client.