I’m excited to share with the community a module I have been working on over the past few weeks and ask for your collaboration to make it better: a generic, expandable connector for using third-party SMS providers with FreePBX’s SMS subsystem.
Right now I have it working with Telnyx and Flowroute, both SMS and MMS inbound and outbound and synchronized across UCP and the Sangoma softphones.
Collaborators are sought for testing, general module improvement, and addition of more providers. I added two that I use. This is the first module I have written so I admit that it is not well polished.
Wow! Bill, this is awesome! Question: we often have one phone number for a group of people (department). A ring group will call the different extensions (100, 101, 102, 103) of the group. Will your module allow my Twilio SMS enabled number (Main dept number 877.XXX.XXXX) to be connected to each extension via the Sangoma Connect iOS app?
Extensions 100, 101, 102, 103 all are connected to SMS 877.XXX.XXXX on Sangoma Connect?
That would be the holy grail, right? Maybe just point the module at the provider’s swagger docs to “figure out” the APIs and then it knows how to do SMS/MMS both inbound and outbound. It’s definitely beyond my abilities.
Since I don’t know how to make this truly generic, I opted for more of a plug-in approach where providers are coded in as we add them.
I think it’s actually a pretty small lift to do this, because the capability is part of the FreePBX SMS subsystem, but my use case was one-to-one so that’s what I did so far. As blazestudios pointed out, this is already under consideration as an improvement.
I would also suggest 10DLC logic for this because it’s going to be required. There’s going to need to be auto replies for things like #HELP or other triggers. There will need to be auto opt-in and more importantly, auto opt-out. If someone sends #STOP or #UNSUBSCRIBE, etc to one of your numbers belonging to a campaign, all DIDs associated that campaign must stop sending messages to the number that requested the stoppage.
That commercial module only works with SIPStation or VoIP Innovations. How will that work with the other providers? How will that allow for people to pull/listen for messages over Flowroute (example) and comply with 10DLC campaign requirements? Such as the opt-out or #HELP replies that need to be facilitated?
… or other adaptors that are connected in to the FreePBX SMS subsystem. The SMS Connector module presents itself like a SIPstation or VI “adaptor” (in FreePBX SMS module terms). We’re implementing (I assume) the same abstract classes they are. No guarantees but if SMS Plus works for them it should work for what this module does.
The SMS Plus does not work that way. It requires you to have a api with sangoma trunking and only works with their own Numbers. They went out of there way to make sure it would not work with anyone who sends messages into the sub system
@BlazeStudios I appreciate the feedback, and as mentioned, not sure how well it fits since this is meant to be a connector module and not really add any extra filtering or parsing logic. I can see how another open source module could do the job though, basically hooking into all SMS send/receive activities.
We have a module that already hooks into FreePBX for full SMS and MMS and allows a 1 to many and many to 1 mapping and does not require you to open your Web GUI of FreePBX to the outside world to receive the inbound messages
This is somewhat regrettable but unavoidable as this is how these providers work. With HTTPS and precise firewall rules restricted to only the IPs the providers use for their webhooks, it can be secure. I know Telnyx also has a way of sending an auth token with the webhooks so you can authenticate them. The only other way I know of to receive SMS* is by SIP methods which actually may be less secure if the trunk isn’t configured as TLS because the messages might cross the internet in plain text.