Open tbar0970 opened 5 years ago
Have thought about this a few times in the past, and it should be quite easy to do. I do suggest, however, that it would be good for us to create an abstract SMSPortal class, with implementations for different SMS providers. The ones I've looked at all have slightly different APIs. This way, we could do a lot better at success, failure and error conditions. We could also then have a way to see how many credits to send messages we have; at the moment you know you've run out of credits when the messages stop sending!
We could also include a GenericProvider implementation that works the way things currently do.
The providers I've looked at in the past do support callbacks, though, which would make this very feasible.
Scenario: A church is thinking of replacing the classic "communication cards" with an inbound SMS number. When a text is received at this number, the SMS gateway passes it on to Jethro. Jethro looks for a person whose mobile number matches the sender, and creates a note for that person with the message content, assigned to a pre-selected staff member. Edge case: If the sender does not match any known mobile number, I guess you'd need to create a new "unknown unknown" person to attach the note to.