Here's a patch for FreeSWITCH to add a simple logging capability to mod_sms. Basic usage is:
<action application="log" data="${_body}"/>
which will log the body of the SMS message. Don't forget that this should be part of the chatplan:
<section name="chatplan" description="Regex/XML Chatplan">
<context name="default">
<extension name="public_dids">
<condition field="to" expression="^(.*)$">
<action application="log" data="SMS Body:[${_body}]"/>
</condition>
</extension>
</context>
</section>
http://anders.com/1offs/freeswitch-mod_sms-logging.diff