With reference to group post http://groups.drupal.org/node/19818

Request a change for sms_incoming() to be able to pass extended attributes for incoming SMS messages. For example, the receiver MSISDN is important where users are integrating multiple receiver numbers and/or gateways and must differentiate messages based on this attribute.

The received attribute can be part of an $options array.

The sms_send() function already supports $options, so I think that it would be good to include this as a change to sms_incoming(). Diff below:

46c46
< function sms_incoming($number, $message) {
---
> function sms_incoming($number, $message, $options = array()) {
48,50c48,50
<   module_invoke_all('sms_incoming', 'pre process', $number, $message);
<   module_invoke_all('sms_incoming', 'process', $number, $message);
<   module_invoke_all('sms_incoming', 'post process', $number, $message);
---
>   module_invoke_all('sms_incoming', 'pre process', $number, $message, $options);
>   module_invoke_all('sms_incoming', 'process', $number, $message, $options);
>   module_invoke_all('sms_incoming', 'post process', $number, $message, $options);

Cheers all.

Comments

Will White’s picture

Status: Needs review » Fixed

Committed. Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 990dcd4 on 6.x-2.x, 8.x-1.x by Will White:
    #397160 by aspope: Added  parameter to sms_incomming().