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!
| Attachment | Size |
|---|---|
| sms_txtlocal.zip | 3.76 KB |

#1
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
#2
Oh no! Found a problem: Line 164 I had implemented
hook_sms_sendwhere I should have usedhook_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!