simontelephonics / smsconnector

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

Script on Receive? #53

Open fiveoaksmn opened 1 week ago

fiveoaksmn commented 1 week ago

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

billsimon commented 1 week 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.