Sms_tropo is a project mainly written in PHP, it's free.
Plugin for SMS Framework for Drupal that allows Drupal to send and receive SMS, IM and voice.
Created by Mark Silverberg and maintained by Tropo.
You'll need the SMS Framework module and it's required modules (Token, Notifications, & Messaging Framework) installed. Create a Tropo account and application, and put the included Tropo code (tropo_scripting_app.php
) in your Tropo account. Install the sms_tropo module and then configure your Drupal messaging and notifications to send SMS using the module.
Sign up for a Tropo.com account (FREE) and create a new "Tropo Scripting" application.
tropo_scripting_app.php
in the same folder as sms_tropo.php
http://DRUPAL_INSTALLATION/?tropo-engine=php&q=sms/tropo/scripting_app.php
Install and enable the required modules:
You only need to download the modules which are linked to. The others are included within them.
Now install the sms_tropo plugin.
cd
to /modules/smsframework/modules/
and git clone git://github.com/marks/sms_tropo.git
Follow the Drupal admin navigation or browse directly to ?q=/admin/smsframework/gateways
One of the great advantages of the Tropo platform is that it makes it easy to send IMs and initiate phone calls in addition to sending off SMS messages.
However, there are a two code changes (required, list below) and several views changes (optional, listed further below) that you might want to make if you plan to take advantage of Tropo's non-SMS networks.
To be clear: You can use Tropo as just a SMS provider and not need to make any of the following changes.
Code changes to /modules/messaging/messaging_sms/messaging_sms.module
Find the following two functions and replace them with their new code:
function messaging_sms_user_destination($account, $message) {
// Check for active mobile information. Simply return it (number and gateway information)
// so that the send callback has a destination array
$destination = array();
if (!empty($account->sms_user) && $account->sms_user[0]['status'] == 2 && !empty($account->sms_user[0]['number'])) {
$destination['number'] = $account->sms_user[0]['number'];
if(!empty($account->sms_user[0]['gateway'])){
$destination['gateway'] = $account->sms_user[0]['gateway'];
}
return $destination;
}
}
function messaging_sms_send_msg($destination, $message, $params = array()) {
$text = messaging_text_build($message, ' ');
// Following line modified to handle array that is now returned by destination callback
return sms_send($destination['number'], $text, $destination['gateway']);
}
Codes change to /modules/smsframework/modules/sms_user/sms_user.module
(~Line 269):
'number' => sms_formatter($number),
--> 'number' => $number
Add the following code to the line directly after the following function declarations
function sms_user_settings_confirm_form(&$form_state, $account)
function sms_user_settings_reset_form(&$form_state, $account)
$gateway = sms_default_gateway();
if (function_exists($gateway['other form'])) {
$form['gateway']['#tree'] = TRUE;
$form['gateway'] = array_merge($gateway['other form']($account), $form['gateway']);
}
Non-functional changes (changes to wording of other modules' to make for a better user experience)
Look through the following files for mentions of: 'SMS', 'phone', and 'number' and change them to 'message', 'device', and 'number/address'
/modules/smsframework/modules/sms_user/sms_user.module
/modules/smsframework/modules/sms_actions/sms_actions.module
/modules/messaging/messaging_sms/messaging_sms.module