i already have code in production that implements incoming messages for an SMS email gateway. it's not using the SMS framework at this time, but after a discussion with Will we've decided that this code should live in the SMS Framework. i'll be taking this on in the next few weeks.

couple of things to know:

  1. code is currently 5.x, so it needs to be ported
  2. doesn't use the SMS framework at all yet, so it will need to be converted
  3. this is a real time gateway (unlike a cron-based mailhandler solution). this means that any messages that hit the gateway are instantly available to the drupal site.
  4. it requires access to the mail server to configure properly (a mail server guru might be able to figure out how to make this work in a user directory -- i'm all ears!)
  5. the gateway communicates with the drupal site via XML-RPC, which means that the mail server can be on a different server than the drupal site -- and if properly configured, can also support multiple drupal sites

Comments

mfb’s picture

Subscribing. FYI, a project I've been working on, Vozmob, has this working in d6 w/ smsframework already, using mailhandler and mailsave to support MMS as well (actual code here).

jordanmagnuson’s picture

Hi, I'm totally new to sms (though not to php, drupal), so please forgive my stupid questions. I'm wanting to set up a site that will process incoming sms messages, and then send dynamic replies back to the originating phone number... will this module you are working on allow me to do that?

I've been looking around for a while trying to figure this whole sms thing out, but it seems that there is currently no supported way to receive sms messages using a drupal site... is this true?

aspope’s picture

Hi David. Yes, SMS Framework is what you need for this.

SMS gateway providers often present HTTP(S) GET and/or POST methods of sending and receiving SMS messages. The SMS Framework provides an abstraction layer for you to interact with many gateways through a common interface, and also provides some gateway-specific translators (Clickatell, Txtlocal at present).

To send a message, you just invoke sms_send() with your fully-formatted mobile number, eg: 447788123123. Note that this must include the country code, and no special chars like "+" or spaces. SMS Framework will use your pre-configured default gateway if you do not specify one on send.

To receive a message, you implement hook_sms_incoming() which will provide you with the sender's mobile number, the message text and an array of extended message data like the number that received the message, a reference code, etc.

Let me know if you need any more assistance, but I'm sure you'll find it pretty straightforward.
~ap

jordanmagnuson’s picture

Thanks for the reply ap. The api does seem straightforward enough... but looking at the supported gateway list, I don't see any D6 supported gateways where incoming messages are supported... that's where I'm confused.

aspope’s picture

David, I see your point. There are two gateway modules that are being reviewed by the project group, that support incoming SMS. You can get them from the posts here:

I would recommend getting the ZIP from the most recent comment post of each.

Let me know if you have any further questions.
~ap

hunmonk’s picture

Status: Active » Fixed

my code for the incoming email gateway has been committed.

@mfb: i think it would be easy enough to also add your work to what i've done, so users would have the option of using either the real-time XML-RPC approach or the mailhandler approach.

this is as far as i'm able to take things at this time, and the functionality is tested and working, so i think we should take any enhancements up in their own issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jonmarkgo’s picture

I would love to see a working version of this, does anyone know if more progress has been made?

schock’s picture

Hey jonmarkgo, we have working incoming sms and mms at http://vozmob.net, using mfb's code: http://dev.vozmob.net/projects/vozmob/repository/entry/html/sites/all/mo...

vishun’s picture

Status: Closed (fixed) » Active

subscribing and also re-opening, it seems that this question still lingers and im also interested in helping try to figure out

Anonymous’s picture

following.

hunmonk’s picture

Status: Active » Fixed

not sure why this issue has been reopened. the code was committed to add the feature, and it works as advertised -- am i missing something?

Anonymous’s picture

Hi hunmonk - Thanks for the reply.

I had originally posted this issue - http://drupal.org/comment/reply/929350 - as a support/documentation request:

Hello! I'm looking for some help, or a how-to guide on getting started with incoming messages, particularly using the email gateway.

When I send messages using the email gateway, the reply-to number is something like 1 (410) 000-004. Sending a text reply to this number doesn't seem to go anywhere. I think I'm looking for a way to specify a different reply-to number (using email gateway), or perhaps another approach that allows me to receive replies to text messages generated by the email gateway.

Thanks! This is an *awesome* module!

vishun noticed the similarities between my post and this thread, so it got moved over here.

Should we pop back to the other issue thread? Or, would you be able to help us out with configuring text replies?

Thanks again for the quick reply!

vishun’s picture

Yes indeed, also I have not been able to figure out how to deal with incoming messages either. I have found this post http://drupal.org/node/363259 but I think part of the confusion, at least for me, is I was expecting to setup something similar to what was required for a Mailhandler / Mailsave setup (which i believe schock may have been trying to link to their integration between SMS framework and Mailhandler / Mailsave) but that link actually doesn't work. I was kinda expecting to fill in an email address, password, etc that it would check and that it could potentially send notifications from, but im also confused as to how it works by just specifying the domain.

hunmonk’s picture

this issue was for adding the feature -- if there's some confusion about how to implement the feature, i would either discuss it in the forums, or open a new support request and/or task in this issue regarding help/documentation. it gets to hard to follow issues when they morph from one need to another.

Anonymous’s picture

Thanks hunmonk - As you suggest, I've re-opened the support/documentation request. If you or anyone following this knows how to configure the reply-to address using email gateway, please let us know. Even a small nod in the right direction would be much appreciated. Thanks for your help!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.