Usage
Getting Started
- Install the module (see Installation).
- Create a Teltonika Notification profile (Services > Alarming > Notification).
- Set the Host (with embedded port) and Username / Password.
- Optionally set the Modem — leave blank to auto-detect the primary modem in REST mode.
- Choose the API mode with the Legacy checkbox (off = REST, on = Legacy).
- Optionally set an Audit Profile.
- For acknowledgement, enable Two-Way Messaging and set a Callback Token (optionally set the Auto-configure Forwarding Base URL).
- Bind the profile in a Notification Block of an Alarm Pipeline.
Alarm Pipeline
Add a Notification Block using a Teltonika profile in your Alarm Pipeline.
Message Properties
| Property | Type | Description |
|---|---|---|
| Message | Expression | Content of the SMS for a single alarm event. |
| Throttled Message | Expression | Content used when multiple events are delivered together. |
Default Message:
At {eventTime|hh:mm:ss}, alarm "{name}" at "{displayPath}" transitioned to {eventState}.
Default Throttled Message:
{alarmEvents.Count} alarm events have occurred.
A per-alarm Custom Message (CustomTeltonikaMessage) overrides the Message template for that alarm (see Configuration).
Two-Way Messaging (SMS-Reply Acknowledgement)
When Two-Way Messaging is enabled, the delivered SMS is the evaluated message with an acknowledgement instruction appended:
<evaluated message> Send <code> to acknowledge
<code>is a random integer from0–99999(up to 5 digits).- The recipient acknowledges the alarm by texting the code back.
- The router forwards the reply to the gateway, which acknowledges the alarm on the notified user's behalf.
See Configuration → Two-Way Messaging for the Callback Token, forwarding auto-configuration, and the one-profile-per-gateway constraint.
Phone Number Handling
Phone numbers are normalized before sending:
| Input Format | Result |
|---|---|
+33612345678 | 0033612345678 (+CC… → 00CC…) |
0033612345678 | 0033612345678 (kept as-is) |
| Other | Passed through with a warning |
Only the first SMS contact on each user is used.
Store phone numbers in E.164 international format (+CC…) in user contacts to ensure correct normalization.
API Communication
All requests to the router are plain HTTP — see Installation → Network Requirements.
REST API Flow (Legacy = off)
1. POST http://<host>/api/login
Body: { "username": "...", "password": "..." }
→ data.token (cached ~299s)
2. POST http://<host>/api/messages/actions/send
Authorization: Bearer <token>
Body: { "data": { "number": "...", "message": "...", "modem": "..." } }
→ success: true
Modem = configured Modem, else auto-discovered via GET /api/modems/status.
Legacy API Flow (Legacy = on)
GET http://<host>/cgi-bin/sms_send?username=&password=&number=&text=
Legacy mode sends credentials as URL parameters over plain HTTP.
Audit Logging
When an audit profile is configured, the module records:
| Action | When |
|---|---|
| SMS Request | An SMS send is attempted. |
| SMS Acknowledgement | A recipient reply acknowledges an alarm. |
Each entry includes the recipient username (Actor), the alarm path with event ID (Target), and a timestamp.
Scripting
This module provides no scripting functions.
Troubleshooting
| Issue | Possible Cause | Solution |
|---|---|---|
| SMS not received | Invalid phone number | Verify the number format in the user's SMS contact. |
| SMS not received | Weak signal / SIM / network | Check the profile's health status (REST mode) and the router. |
| Authentication error (REST) | Wrong credentials or permissions | Verify the API user's username, password, and permissions. |
| Profile errors on startup | Password could not be resolved | Check the secret backing the Password field. |
| Replies not acknowledging alarms | Forwarding not configured | Verify the router forwards inbound SMS to /system/teltonika and the Callback Token matches. |
403 on callback | Callback Token mismatch | Ensure the router's forwarded token matches the profile's Callback Token. |
| Second two-way profile stops working | One-profile-per-gateway limit | Use a single two-way-messaging profile per gateway. |
| No SMS sent, warning about the trial | Trial expired | Activate a license — see Licensing. |
Best Practices
- Prefer REST mode - It supports token auth, modem auto-discovery, health monitoring, and forwarding auto-configuration.
- Embed the port in Host - The router URL is HTTP with the port taken from the Host field.
- Secure two-way messaging - Always set a Callback Token (note it travels in cleartext over HTTP).
- Enable auditing - Log SMS Requests and Acknowledgements for troubleshooting and compliance.
- Use international format - Store all phone numbers as
+CC…. - Keep messages short - Remember the appended acknowledgement instruction counts toward SMS length.