SMS Autorespond plugin for playSMS


(Anton Raharja) #1

I would like to introduce you the new plugin I made for playSMS, SMS Autorespond.

This plugin will scan for each incoming SMS for a match with configured regular expression and reply automatically based on its setup.

The main difference with SMS Autoreply is the incoming SMS scanned based on patterns, not keyword and scenarios.

Please visit the URL for more information, install instructions and usage:

Lets discuss it here.

anton


(Steven Delport) #2

I like this as people always input the incorrect Keyword because its advertised please sms “HELLO” to 3743434
So some sms Keyword HELLO and some “HELLO” etc.
Will be be able to use -ELL- or %HELLO%


(Anton Raharja) #3

Hi,

Yup, thats the idea. You can match them using regular expression.

To simply match with any SMS containing HELLO you can use: /hello/i

/hello/i will match with Hello, HELLO, HHELLO, "HELLo", and also with Hello there or I said hello!

I’m using this to find a match:
http://php.net/manual/en/function.preg-match.php

Info on regex:
http://www.regular-expressions.info/

To test your regex:
https://regex101.com/

anton


(Steven Delport) #4

Thanks will patch and Test over the weekend and give feedback here :smile:


(Scott) #5

I have 2 modems and am trying to use autorespond to reply to incoming messages. However the autorespond does not always come from the proper modem, even if I have it set to Routed SMSC or Supplied SMSC.

Is there a way to make the autorespond come from the modem that received the SMS?


(Anton Raharja) #6

you should test only with Supplied SMSC

you should also check the result in Reports -> All sent messages, the SMSC for the reply message should be the SMSC used for incoming SMS

what gateway do you use ?

anton


(Scott) #7

That seems to work now… Thanks.


(Anton Raharja) #8

Version 2 has been released:
https://github.com/antonraharja/plugin-autorespond/archive/v2.tar.gz

Changelog:

  • change to hook recvsms_intercept_after() to fix missing feature and status
  • now SMS shown in feature messages
  • change name from sms_autorespond to autorespond

Installation and upgrades instruction available on the released package

anton


(Anton Raharja) #9

If you want to add something the current playSMS autorespond plugin, what are they ?

For example I might working on something like SMS custom, instead of just replying the message the plugin will also forward the message to a URL

anton


(Scott) #11

This is a great idea Anton. I think that being able to hook into a STOPLIST url would be a good use of the custom attribute.


(Erwan Setiadi) #12

I’m success to install and try but no reports ‘my feature messages’ in user and missing default message footer. Autorespond sent sms using footer @username


(cpservicespb) #14

So, I installed autorespond feature.
What is “Receiver number” for here ?
To redirect (forward message) to receiver different than sender one ?

But if I specify any receiver number, autoresponder doesn’ t work.
It is shown as incoming message at log, not as autorespond.


(Anton Raharja) #15

receiver number pushed by the gateway you used.

anton