Additional providers for SMS/MMS messaging?

bfbmellc

New Member
Oct 22, 2020
4
0
1
49
Hello, I'm running FS PBX and am very happy with it. I was on the fence until I saw Ward Mundy blog about it a few weeks ago, then I decided to go ahead and move everything over from Fusion to FS.

I'd like to add BulkVS as a provider for incoming/outgoing SMS messages, which I was able to do with FusionPBX. However, I don't think that the optional Messages and Providers modules for Fusion will work under FS. I haven't tried it, but looking at the code, it seems that Messaging was significantly reworked.

So I'm going to attempt to cobble together an additional SMS provider beyond the three that are in the current version.

I'm also going to check out documentation for the three providers that are currently supported in FS (ThinQ, Sinch, and Bandwidth) and probably adapt my code to whichever of those three seems most similar to BulkVS's API.

Has anyone successfully done this (for any provider, not specific to BulkVS)? If so, I'd love to look at the code if you have it public/available.

If I get it working to sufficient stability, I'll make it available to anyone and/or the FS developer for possible inclusion in the project.
 
Hi @bfbmellc, I'm glad to hear you are enjoying the system.
You are correct, the SMS messaging was redone entirely from scratch to utilize a proper queuing system. Many background processes are running on queues to free up vital resources for phone calls. I'm happy to help you navigate getting this done for another provider. Contributions are very welcome.

Your first file you want to look at for inbound SMS is

Code:
config/webhook-client.php

There, you need to add a new configuration for this provider.
You will see a few classes for each provider that need to be programmed. You can compare the existing ones and choose the best one. In my opinion, Bandwidth, being the last one, is the most optimized and well-written.
These classes are chained, so they execute one after another. At the end, the message is getting sent to a queue.
 
  • Like
Reactions: bfbmellc
Hi @bfbmellc, I'm glad to hear you are enjoying the system.
You are correct, the SMS messaging was redone entirely from scratch to utilize a proper queuing system. Many background processes are running on queues to free up vital resources for phone calls. I'm happy to help you navigate getting this done for another provider. Contributions are very welcome.

Your first file you want to look at for inbound SMS is

Code:
config/webhook-client.php

There, you need to add a new configuration for this provider.
You will see a few classes for each provider that need to be programmed. You can compare the existing ones and choose the best one. In my opinion, Bandwidth, being the last one, is the most optimized and well-written.
These classes are chained, so they execute one after another. At the end, the message is getting sent to a queue.

Thanks so much for this info - extremely helpful! I am on a trip right now, but took a quick look at the file referenced above and am very impressed with your code and approach to implementing webhooks with such flexibility! So many of the open source PBX's have been layer on top of layer of old code, mostly working, but you can be afraid to touch anything as it might break something else.

On the other hand, your new code appears to be fresh and well-thought-out. When I return, I'm going to do my best to get this working for BulkVS and will share my code with you.
 
@bfbmellc enjoy your trip! Thank you for your kind words. We strive to make the code clean and modern. Feel free to ask anything you need to complete the task.