function sms_devel_virtualgw_receiver in SMS Framework 6.2
Same name and namespace in other branches
- 6 modules/sms_devel/sms_devel.virtualgw.inc \sms_devel_virtualgw_receiver()
- 7 modules/sms_devel/sms_devel.virtualgw.inc \sms_devel_virtualgw_receiver()
1 call to sms_devel_virtualgw_receiver()
- sms_devel_virtualgw_sendlogic in modules/
sms_devel/ sms_devel.virtualgw.inc
1 string reference to 'sms_devel_virtualgw_receiver'
- sms_devel_menu in modules/
sms_devel/ sms_devel.module - Implement hook_menu()
File
- modules/
sms_devel/ sms_devel.virtualgw.inc, line 65 - Virtual Gateway for the sms_devel module of the SMS Framework.
Code
function sms_devel_virtualgw_receiver($number = NULL, $message = NULL, $options = array()) {
// Handle HTTP requests rather than direct function calls
if ($number === NULL) {
$number = $_REQUEST['number'];
$message = array_key_exists('message', $_REQUEST) ? $_REQUEST['message'] : 'NO_MESSAGE';
$options['gw_number'] = array_key_exists('gw_number', $_REQUEST) ? $_REQUEST['gw_number'] : 'NO_GW_NUMBER';
$options['reference'] = array_key_exists('reference', $_REQUEST) ? $_REQUEST['reference'] : 'NO_REFERENCE';
}
// Write log record for incoming message
sms_devel_virtualgw_log_insert(SMS_DEVEL_VIRTUALGW_TYPE_IN, $number, $message, $options);
// Call SMS Framework incoming message handler
sms_incoming($number, $message, $options);
}