Create / publish a node via sms
Normally the SMS gateway will ping a URL on your site with the relevant details from the SMS, e.g appended as a GET querystring.

I've done this before with hook_menu and a custom callback to listen for the SMS details.

/**
 * Implements hook_menu
 */
function MYMODULE_menu(){
  $items = array();  
  $items['api/sms'] = array(
    'title' =&gt; 'SMS listener', 
    'page callback' =&gt; 'mymodule_sms_incoming_process', 
    'access arguments' =&gt; array('access content'), 
    'type' =&gt; MENU_CALLBACK,
  );

  return $items;

}

/**
 * SMS listener
 * Processing incoming SMS messages
 */
function mymodule_sms_incoming_process(){
  /* Do stuff with SMS parameters 
   * Make sure to sanitize any $_GET vars with filter_xss etc..
   */
  if (!isset($_GET['code']) { return FALSE }
}