aboutsummaryrefslogtreecommitdiffstats
path: root/doc/sms-forward.md
diff options
context:
space:
mode:
authorGravatar Anatoly Bubenkov <bubenkoff@gmail.com>2022-11-03 23:43:08 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-01-10 08:58:33 +0100
commitea09a18d3f05b20ff7f1ec25aea74f32d68ca5e0 (patch)
treed873298ae7c1557552d6db38e75cbaf11764e4fb /doc/sms-forward.md
parent88b34cfb39775560654d60d91da33681b9899251 (diff)
sms-forward: support hookschange-86
Diffstat (limited to 'doc/sms-forward.md')
-rw-r--r--doc/sms-forward.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/sms-forward.md b/doc/sms-forward.md
index 3d9974d..73248eb 100644
--- a/doc/sms-forward.md
+++ b/doc/sms-forward.md
@@ -35,11 +35,39 @@ You have to enable receiving of SMS:
/tool/sms/set receive-enabled=yes;
+The configuration goes to `global-config-overlay`, this is the only parameter:
+
+* `SmsForwardHooks`: an array with pre-defined hooks, where each hook consists
+ of `match` (which is matched against the received message), `allowed-number`
+ (which is matched against the sending phone number or name) and `command`.
+ For `match` and `allowed-number` regular expressions are supported.
+
Notification settings are required for
[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
+Tips & Tricks
+-------------
+
+### Order new volume
+
+Most broadband providers include a volume limit for their data plans. The
+hook functionality can be used to order new volume automatically.
+
+Let's assume an imaginary provider **ABC** sends a message when the available
+volume is about to deplete. The message is sent from `ABC` and the text
+contains the string `80%`. New volume can be ordered by sending a SMS back to
+the phone number `1234` with the text `data-plan`.
+
+ :global SmsForwardHooks {
+ { match="80%";
+ allowed-number="ABC";
+ command="/tool/sms/send lte1 phone-number=1234 message=\"data-plan\";" };
+ };
+
+Adjust the values to your own needs.
+
See also
--------