Configuration
Alarm Notification Profile
After installing the module, create an Alarm Notification Profile of type Teltonika Notification.
Profile Settings
Gateway
| Parameter | Type | Required | Description |
|---|---|---|---|
| Host | Text | Yes | IP address (or hostname) and port of the Teltonika router. Used as http://<host>/..., so include a non-default port here (e.g. 192.168.1.1:80). |
Credentials
| Parameter | Type | Required | Description |
|---|---|---|---|
| Username | Text | Yes | Router authentication username. |
| Password | Secret | Yes | Router authentication password. Resolved at startup; the profile errors if retrieval fails. |
Two-Way Messaging
| Parameter | Type | Required | Description |
|---|---|---|---|
| Two-Way Messaging | Checkbox | No | Enables SMS-reply acknowledgement. |
| Callback Token | Secret | Conditional | Shared secret required by the /system/teltonika servlet as a token query parameter. A mismatch returns 403. Blank = the endpoint accepts unauthenticated callbacks (a warning is logged). Sent in cleartext over HTTP. |
| Auto-configure Forwarding Base URL | Text | No | Base gateway URL the router can reach (e.g. http://gateway-host:8088). When set in REST mode, the module PUTs the router's to_http SMS-forwarding rule on startup. Blank = configure forwarding manually. /system/teltonika is appended automatically if missing. |
| Auto-configure Forwarding Verify Certificate | Checkbox | No | Sets the router rule's verify_cert to verify/ignore. Leave off for plain HTTP or self-signed certificates. |
Advanced
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Modem | Text | No | (blank) | Name of the modem, e.g. 1-1. Leave blank to auto-detect the router's primary modem. Unused in Legacy mode. |
| Legacy | Checkbox | No | false | Use the legacy URL-authenticated API instead of the REST API. |
Unlike earlier documentation, the Modem field is not required. In REST mode, leaving it blank makes the module auto-discover the router's primary modem (falling back to the first modem) via GET /api/modems/status.
Auditing
| Parameter | Type | Required | Description |
|---|---|---|---|
| Audit Profile | Reference (ignition/audit-profile) | No | Optional audit profile for logging SMS activity. Delete-protected and rename-tracked. |
API Modes
The Legacy checkbox selects the communication mode. It is not auto-detected from firmware.
REST API Mode (Default, Legacy = off)
Modern RUTOS firmware uses a token-based REST API.
Flow:
POST http://<host>/api/loginwith body{username, password}→ returnsdata.token(cached ~299 s).POST http://<host>/api/messages/actions/sendwithAuthorization: Bearer <token>and body{"data":{number, message, modem}}. Success =success: true.- The modem is the configured Modem if set, otherwise auto-discovered from
GET /api/modems/status(primary, else first).
REST mode also enables SMS-channel health monitoring and optional forwarding auto-configuration.
Legacy API Mode (Legacy = on)
Older firmware uses URL-based authentication.
Flow:
GET http://<host>/cgi-bin/sms_send?username=&password=&number=&text=
Legacy mode does not use tokens, modem selection, health monitoring, or forwarding auto-configuration.
In Legacy mode the username and password are passed as URL query parameters over plain HTTP. Prefer REST mode where possible.
SMS-Channel Health Monitoring
In REST mode only, the module monitors the SMS channel: starting 15 s after startup, then every 60 s, it probes /api/login and /api/modems/status. Two consecutive DOWN probes are required before the channel is marked errored.
| Status | Meaning |
|---|---|
| OK | Channel healthy. |
| WEAK SIGNAL | RSSI ≤ -105 dBm or SINR < 0 dB. |
| SIM NOT READY | SIM not in a ready state. |
| NO NETWORK | Modem not registered on a network. |
| GATEWAY UNREACHABLE | Router could not be reached. |
| LOGIN FAILED | Authentication failed. |
| UNAUTHORIZED | Credentials/permissions rejected. |
| MODEM QUERY FAILED | Modem status query failed. |
Two-Way Messaging
When enabled, each SMS gets a reply code appended ( Send <code> to acknowledge). The recipient replies with the code; the router forwards the inbound SMS to the gateway servlet /system/teltonika, which acknowledges the alarm attributed to the notified user.
- Authentication: the servlet requires the Callback Token as a
tokenquery parameter (constant-time comparison; 403 on mismatch). A blank token means unauthenticated callbacks plus a warning. - Auto-configuration (REST only): setting Auto-configure Forwarding Base URL makes the module PUT the router's
to_httpforwarding rule on startup (PUT /api/sms_gateway/sms_forwarding/to_http/config/to_http), appending/system/teltonikato the URL if missing, and settingverify_certfrom the Verify Certificate checkbox.
The callback token and pending reply codes are gateway-wide state shared by a single /system/teltonika servlet. Only one two-way-messaging profile is supported per gateway — with more than one, the last profile to start or save wins and clobbers the others' token and pending codes.
User Contact Configuration
Users receive Teltonika SMS via their SMS contact info. The first SMS contact on the user is used.
- Navigate to Platform > Security > User Sources.
- Open the user source's ⋮ menu, choose Manage Users, and edit the user.
- In Contact Info, add a contact of type SMS.
- Enter the phone number in international format (e.g.
+33612345678).
Numbers are normalized before sending: +CC… becomes 00CC…; numbers already starting with 00 are kept; anything else is passed through with a warning.
Message Templates
The profile provides two expression templates:
| Property | Default |
|---|---|
| Message | At {eventTime|hh:mm:ss}, alarm "{name}" at "{displayPath}" transitioned to {eventState}. |
| Throttled Message | {alarmEvents.Count} alarm events have occurred. |
The Throttled Message is used when multiple alarm events are delivered together.
Per-Alarm Custom Message
You can override the message for a specific alarm via its extended configuration property CustomTeltonikaMessage:
- Open the alarm configuration in the Designer.
- Expand the Extended Config section.
- Set the Custom Message (
CustomTeltonikaMessage) property.
When set, it overrides the Message template for that alarm (the Throttled Message still applies to batched events).
Auditing
When an audit profile is configured, the module logs:
| Field | Description |
|---|---|
| Action | SMS Request (outbound sends) or SMS Acknowledgement (reply acks) |
| Actor | Username of the notification recipient |
| Target | Alarm path with event ID |
| Timestamp | Time of the event |