New gateway module: Txtlocal

aspope - March 10, 2009 - 12:02
Project:SMS Framework
Version:6.x-1.0-beta1
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

Hey guys and gals. With reference to group post: http://groups.drupal.org/node/19818

I have just finished a gateway module for Txtlocal (http://www.txtlocal.com), and would like it make it available for inclusion in the SMS Framework package. The module was written for 6.x and supports inbound and outbound messaging with all of txtlocal's extended options (specify sender, delayed send, message reference, WAP PUSH).

The module will pass the receiver MSISDN in the $options array to sms_incoming(). I have created a patch request for this core functionality (http://drupal.org/node/397160). I have also written it to the phpdoc header of the module, as below:

* IMPORTANT FOR INCOMING MESSAGES: If you want to use the txtlocal receiver MSISDN
* (inNumber) then the sms_incoming() callback in sms.module must support an
* $options array as a third argument, and must pass this array on to the
* processors. The inNumber is the MSISDN number that received the SMS message.

Cheers all!

AttachmentSize
sms_txtlocal.zip3.76 KB

#1

aspope - March 12, 2009 - 14:40

Sorry guys, I just realised that the incoming URLs should be below /sms/.
Changed the inbound URLs to /sms/txtlocal/receiver and /sms/txtlocal/receipt

AttachmentSize
sms_txtlocal.zip 3.96 KB

#2

aspope - April 22, 2009 - 14:17
Priority:minor» normal

Oh no! Found a problem: Line 164 I had implemented hook_sms_send where I should have used hook_send. It caused messages to send regardless of whether this gateway was selected, so I was sending through multiple gateways by accident. Sorry about that.

Here is an amended version. I have also added a receipt receiver, for if the SMS Framework includes receipt functionality as my feature request (http://drupal.org/node/440384), although it is disabled.

Please review and let me know if you have any suggestions for improvement.

Thanks as always!

AttachmentSize
sms_txtlocal.zip 4.43 KB
 
 

Drupal is a registered trademark of Dries Buytaert.