simontelephonics / smsconnector

SMS Connector module for FreePBX 16 and 17
https://simon.tel/open-source/
GNU General Public License v3.0
43 stars 16 forks source link

Script on Receive? #53

Closed fiveoaksmn closed 14 hours ago

fiveoaksmn commented 2 months ago

Is there a way to configure a script to be run when a SMS message is received?

billsimon commented 2 months ago

Yes, there are a few ways to go about it.

FreePBX has "SMS Webhook" built in which will let you post a webhook any time an SMS is received -- if the intention of your script is to make an HTTP call.

In SMS Connector, you can modify the provider file for the provider you are using to call out to a script or do some extra work when an SMS is received.

You can also run a server script that listens for Asterisk events and does something when it sees the SMS received UserEvent.