function sms_txtlocal_receive_message in SMS Framework 6
Receive an SMS message and pass it into the SMS Framework
1 string reference to 'sms_txtlocal_receive_message'
- sms_txtlocal_menu in modules/
sms_txtlocal/ sms_txtlocal.module - Implement hook_menu()
File
- modules/
sms_txtlocal/ sms_txtlocal.module, line 350 - Txtlocal gateway module for Drupal SMS Framework. Outbound+Inbound
Code
function sms_txtlocal_receive_message() {
$number = $_REQUEST['sender'];
$message = $_REQUEST['content'];
$options = array();
// Define raw gateway response parameters
$options['gateway_params'] = array();
if (array_key_exists('inNumber', $_REQUEST) && !empty($_REQUEST['inNumber'])) {
$options['gateway_params']['inNumber'] = $_REQUEST['inNumber'];
}
// Define message receiver if possible
if (array_key_exists('inNumber', $_REQUEST) && !empty($_REQUEST['inNumber'])) {
$options['receiver'] = $_REQUEST['inNumber'];
}
sms_incoming($number, $message, $options);
}