You are here

function sms_receipt in SMS Framework 7

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

Handles responses to message transactions.

Allows gateways modules to pass message receipts and other responses to messages 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 in this module.

The gateway status code and message should 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.

int $message_status: (optional) An SMS Framework message status code, per the defined constants. Defaults to SMS_GW_UNKNOWN_STATUS.

array $options: (optional) Extended options passed by the receipt receiver.

1 call to sms_receipt()
sms_devel_virtualgw_sendlogic in modules/sms_devel/sms_devel.virtualgw.inc
Invokes additional virtual gateway features eg: autoreplies, receipts.

File

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

Code

function sms_receipt($number, $reference, $message_status = SMS_GW_UNKNOWN_STATUS, array $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);
}