You are here

function sms_receipt in SMS Framework 6

Same name and namespace in other branches
  1. 6.2 sms.module \sms_receipt()
  2. 7 sms.module \sms_receipt()

Callback for incoming message receipts. Allows gateways modules to pass message receipts in a standard format for processing, and provides a basic set of status codes for common code handling.

Allowed message status codes are defined as constants at the top of this module.

The gateway code and string will often be provided in the $options array as 'gateway_message_status' and 'gateway_message_status_text'.

Parameters

string $number: The sender's mobile number.

string $reference: Unique message reference code, as provided when message is sent.

string $message_status: An SMS Framework message status code, as per the defined constants.

array $options: Extended options passed by the receipt receiver.

3 calls to sms_receipt()
sms_clickatell_receive_receipt in modules/sms_clickatell/sms_clickatell.module
Receive a message receipt from Clickatell
sms_devel_virtualgw_sendlogic in modules/sms_devel/sms_devel.virtualgw.inc
sms_txtlocal_receive_receipt in modules/sms_txtlocal/sms_txtlocal.module
Receive a message send receipt from txtlocal

File

./sms.module, line 121
The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.

Code

function sms_receipt($number, $reference, $message_status = SMS_GW_UNKNOWN_STATUS, $options = array()) {

  // Execute three phases
  module_invoke_all('sms_receipt', 'pre process', $number, $reference, $message_status, $options);
  module_invoke_all('sms_receipt', 'process', $number, $reference, $message_status, $options);
  module_invoke_all('sms_receipt', 'post process', $number, $reference, $message_status, $options);
}