Posts tagged with "sms framework"
Demo of Two Way SMS Gateway on a USB Stick with Drupal Integration
New Open Source Tools Will Make Decentralized Data Collection More Effective
The release of the SMS Framework 1.0, along with the road map for a 1.1 version, is making Drupal a more attractive platform for organizations that need powerful, decentralized data collection tools. This recent work shows that using Drupal can give you a serious foundation to integrate sms applications and tools with a website. I want to expand on Will’s recent post about building a two way SMS Gateway on a USB drive and show how Drupal can act as a data hub for collecting data and messaging via sms.
We are interested in this because tools that can integrate with sms like this will be especially helpful for international development agencies with on the ground operations. For example, this functionality could allow an election monitoring organization to use sms to track reports from observers at polling stations or help a public heath organization to monitor when patients take medicine via sms messages sent from personal or public cell phones. It could even assist a disaster response organization to track the status of its team on the ground team through their handsets.
Proof of concept:
Let’s look at the election monitoring example to put this in more concrete terms. Will pulled together a screencast to accompany this post that shows how it all works, riffing specifically on how an integrated solution could help field workers like election monitors.
Setting Up a Two-Way SMS Gateway with Gnokii and Drupal
Gnokii Sends and Receives SMS Text Messages Using USB or Bluetooth
In addition to all of the work being done on the SMS Framework, we have also started researching how to quickly create our own two-way SMS gateway for sending and receiving SMS messages. It is a proof of concept based on needs we are hearing from development agencies. Our solution is based around gnokii, an open source project that can be used to control the various functions of any mobile phone it supports. gnokii sends and receives SMS text messages over a USB or Bluetooth connection with the phone.
In our setup we’re using a Nokia 6102i mobile phone, gnokii 0.6.8 (installed using Macports) and a MacBook Pro with Bluetooth.
A daemon, written in Python, manages the process of sending and receiving messages and a Drupal module acts as the end point on the Drupal side. The daemon periodically checks the phone for incoming messages and the server for outgoing messages. If a message is found it is processed and passed to the other side.
An outgoing message that originated from a Drupal module will be stored in a queue temporarily. The daemon checks the queue using an HTTP request. When it finds the queued message it connects the phone, sends the message, and clears the item from the queue. Incoming messages are handled in a similar fashion. When a message is first received it is queued on the mobile phone temporarily. When daemon finds the message waiting on the phone, it passes it to the server using an HTTP request and deletes the entry from the phone.
We are making the daemon open source so check out the code in the Drupal CVS repository and let me know if you want to talk about this.
SMS Framework 1.0 released + 1.1 Roadmap on Drupal Groups
Drupal and SMS Integration, Ready To Go
The 1.0 release of the SMS Framework is now available for download from Drupal.org. The project has come a long way since it’s initial development release last summer and is now ready for use. Numerous fixes and functionality improvements have turned the SMS Framework into a robust tool for integrating SMS and Drupal.
This release introduces a rewritten SMS user module, which allows your users to provide and confirm their mobile information. Thanks to Tylor from Raincity Studios an SMS receive module and a gateway module for Mobile Muse are included in version 1.0. Expect to see more gateway modules with receiving support in future releases.
We’re already looking ahead to work on version 1.1, which will focus on improving international support, expanding documentation, and upgrading to Drupal 6. Please review and edit the latest roadmap on the wiki and submit feature requests to the project’s issue tracker.
Roadmap for 1.1
- Improve international support
- Standardized phone number format
- Drupal 6 release
- Write more API documentation
- Improve the SMS Blast module
- Ability to make double opt in optional
- More gateway modules that support receiving
- Improve sms_receive module
- Remove behavior mapping
I go into more details on these points here.
Improving SMS Double Opt-In Process with SMS Framework
Usability, Customization Options, and Data Storage Improvements have been Committed
We’ve been improving the usability, customization options, and data storage architecture of the “SMS User module,” (which is included as part of the SMS Framework). The module allows your Drupal site to store mobile information for users that can then be used by other modules. To ensure that a user actually owns a number we use a double opt-in process where a confirmation message is sent to the handset with a four digit code. The user is then asked to enter this code to confirm ownership. Here is a screencast showing how this works.
As you can see, site administrators can now customize the text of the confirmation message using the token module. So if Obama was using Drupal to run his awesome SMS campaign, he could now have a confirmation message look like “Together we can bring change. Confirm your number at [mobile-url] with the code [confirm-code] to get locally targeted messages.”
Here are the two options hooks into the token module:
- [confirm-code] The mobile confirmation code for the user.
- [mobile-url] The URL for the user’s mobile settings page.
Here is a screenshot showing each step so you can see the new work done.
SMS Framework + Notifications and Messaging Modules = Wicked Simple SMS Notifications in Drupal
New Notification Feature for the SMS Framework
The SMS Framework project has gathered a great amount of support from the developer community. Tylor at Raincity Studios has been doing some great work with fixing up the SMS Framework project, so I thought it would be good to return to my roots to upgrade the framework and contribute an important feature. We're moving toward a 1.0 release for 5.x and ultimately upgrading to Drupal 6, so stay tuned for that.
As I've been moving down the issue queue reviewing and applying patches, one feature stood out to me - the need to store users' mobile numbers in a separate table, instead of in $user->data. This will allow Drupal to identify the author of incoming SMS messages. With this feature, your visitors will be able to get updates about various events that occur on your site. For example, they can be alerted when new comments are made on their posts or when a 'event' node type is created. The patch includes a restructured interface for adding and confirming your mobile number. It's very similar to Twitter and Brightkite :) The Messaging Framework makes use of the API to support SMS as a send method. Add Notifications and you'll be able to alert users about updated content via SMS. I wanted to quickly show everyone how easy this is to set up.
1. Download the SMS Framework, the Messaging Framework, and the Notifications module and place them in your modules directory. (Also get Token as Notifications depends on it.)
2. Turn on the following modules:
- Messaging Framework
- SMS Messaging
- Content Notifications
- Notifications
- Notifications UI
- Token
- Email Gateway (We'll be using this for the example, but any gateway module should work.)
- SMS Framework
- SMS User
3. Go to admin/smsframework/gateways and select and configure your default gateway
4. Go to admin/notifications/settings and check 'Notify poster of own posts' for testing purposes
5. Go to admin/notifications/settings/ui and enable the desired subscription types
6. Go to user/1/notifications/nodetype and subscribe to the desired node type
7. Go to user/1/edit or user/1/mobile (depending on your SMS Framework build) and follow the steps to set up and confirm your mobile number
8. Post a node of that type and wait for your SMS message!
The SMS Framework module is still under development and is not recommended for production use.



