How to send SMS using api

We have a web app that we currently use for almost everything in our business. We currently send sms messages to our clients via twilio but after implementing freepbx, have investigated the option of sending sms through freepbx using the phone numbers of our employees so it is more personalized and uses the phone number of the employee instead of a random number from twilio. We have found some dirty and not so dependable ways of sending sms but are wondering if there is a more reliable and clean way of integrating with freepbx? Maybe using an api or something of the sort? Or maybe someone has done this before?

Thank you in advance for any help that can be provided.

New open source SMS Connector module - FreePBX / Development - FreePBX Community Forums


I could be very wrong but it seems this is for connecting sms providers to freepbx? What we are needing to do is send sms messages from our web app and have them go through freepbx almost like ucp does. It appears that the api is more of read only access to sms parts of freepbx. So that is why I ask about being able to send sms from a third party web app. It is totally possible that I am missing something though. I appreciate your help!

I guess I am not understanding your request. FreePBX does not have the ability to send SMS messages natively. SMS would come out from a 3rd party always.

Are you saying you have a web app that sends SMS, and you want to integrate that webpage into Freepbx UCP?

Maybe you can share your desired workflow (user logs into X goes to y to z…) to help better frame your request.

I apologize… We currently have our freepbx server setup to use sangoma soft phone to send sms using sipstation. We have quite a few DIDs registered with sipstation and each user has sms turned on to be able to send sms and have the sangoma soft phone installed on their computers. Enter our web app that our developers built for the many functions of our business and one of those currently is to send sms from the web app using twilio. What we are hoping we can do is have our web app send sms messages as if it were one of our freepbx users or in other words send through sipstation in such a way that all messages that send and receive through our web app also show up in freepbx and sangoma soft phone and send from the particular user in freepbx that we are wanting to send from or on behalf of.

What we have been able to discover is if we send the user session credentials along with the message we want to send via curl, it allows us to send a sms as any of the users which made us think that maybe it was possible to have our web app interact with freepbx in a similar way.

Hopefully this explains what we are trying to do.

The obvious API for that is the SIP protocol.

1 Like

UCP is open source. You can examine the code to see how it interacts with FreePBX’s SMS subsystem and do similarly, either by writing a “bff”-type API that runs on your PBX or directly writing PHP code that calls the FreePBX SMS functions.

1 Like

Bill you sure on that open source part. Last time I checked the SMS ability inside UCP was provided by a non open source SMS module.

Not sure, I could be wrong about it. I forgot ucp is modular like that

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.