Community discussions

MUM Europe 2020
Topic Author
Posts: 30
Joined: Mon Dec 12, 2016 12:21 am

SMS responder

Mon Jan 30, 2017 12:03 pm

Is it possible to script receipt of a keyword in sms from list of allowed numbers, eg. sms "AG" from "+61411123456" and respond with the currently active gateway in a message?
eg. response would be:
active gateway is "pppoe-Fibre reachable"
and it would be sent back to the sender of the original message.

All the posts I've read on this seem to suggest that you need to schedule a recurring script to check the inbox for a matching message, then delete it and process it accordingly.
Is that the only way?
User avatar
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: SMS responder

Mon Jan 30, 2017 12:11 pm

With RouterOS alone, currently, sadly, yes.

If you have a separate device or a VM on the router, you can run an application that connects via the API. From the API connection, you can call "/tool/sms/inbox/print" with a "follow" argument. That way, the API application will get a reply upon every new message, and it can in turn call "/tool/sms/send".
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)

Who is online

Users browsing this forum: No registered users and 26 guests