You are here

function hook_sms_incoming in SMS Framework 7

Handle and process incoming SMS messages.

Parameters

string $op: Either 'pre process', 'process' or 'post process'.

string $number: The recipient phone number.

string $message: The incoming SMS message.

array $options: An array of options for the SMS message.

4 functions implement hook_sms_incoming()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

sms_actions_sms_incoming in modules/sms_actions/sms_actions.module
Implementation of hook_sms_incoming().
sms_test_gateway_sms_incoming in tests/sms_test_gateway/sms_test_gateway.module
Implements hook_sms_incoming().
sms_track_sms_incoming in modules/sms_track/sms_track.module
Implements hook_sms_incoming().
sms_user_sms_incoming in modules/sms_user/sms_user.module
Implements hook_sms_incoming().
1 invocation of hook_sms_incoming()
sms_incoming in ./sms.module
Handles incoming messages.

File

./sms.api.php, line 54
SMS Framework hooks.

Code

function hook_sms_incoming($op, $number, $message, array $options) {
  switch ($op) {
    case 'pre process':
      watchdog('sms', t('Incoming message received from @number', array(
        '@number' => $number,
      )));
      break;
    case 'post process':
      drupal_mail('sms', 'incoming', 'user@example.com', 'en', array());
      break;
  }
}