Integration with Ministra (Stalker) Middleware
Ministra TV Platform (formerly Stalker Middleware) manages subscribers, set-top boxes and the channel list. Alta delivers the channels and the TV archive. Ministra talks to Alta the same way it talks to Flussonic: it adds a temporary token to every channel link, and Alta checks the token with Ministra before the playback starts.
This article shows how to connect Alta to Ministra step by step: live channels with temporary links, TV archive (catch-up) and timeshift.
How it works
Section titled “How it works”
- A subscriber opens a channel on the set-top box.
- Ministra creates a temporary token and returns the channel link with this token:
http://alta.example.com:8102/demo/index.m3u8?token=41771f02a48d1fef09eebe9f0efdaeb8 - The box requests the playlist from Alta.
- Alta sends the token to Ministra:
http://stalker.example.com/stalker_portal/server/api/chk_flussonic_tmp_link.php?token=... - Ministra answers
200 OKif the token is valid, or403 Forbiddenotherwise. - Alta returns the playlist and the stream to the box, or
403 Forbidden.
The token is checked once, when the playlist is requested. After that the box plays the stream within its Alta session. By default a live token lives 5 seconds: the box receives a new token every time it opens a channel. Tokens for the TV archive live 8 hours.
For the TV archive Ministra uses the Flussonic DVR link format. Alta supports it out of the box:
| Feature | Link created by Ministra |
|---|---|
| Live | http://<alta>:<port>/<path>/index.m3u8?token=... |
| Timeshift (from the start of the current hour) | http://<alta>:<port>/<path>/index-<start>-now.m3u8?token=... |
| Catch-up (program from the EPG) | http://<alta>:<port>/<path>/archive-<start>-<duration>.m3u8?token=... |
Read more about these links in URL Format for HLS Access.
Requirements
Section titled “Requirements”- Set-top boxes can reach the Alta OTT server port (
8102in this example). - Alta can reach Ministra over HTTP (port
80by default). - For the TV archive: a storage in Alta and an EPG for the channels in Ministra.
In this article:
| Address | |
|---|---|
| Alta OTT server | http://alta.example.com:8102 |
| Ministra | http://stalker.example.com/stalker_portal/ |
| Channel path in Alta | demo |
Step 1. Configure Alta
Section titled “Step 1. Configure Alta”Receiver
Section titled “Receiver”Go to Receivers → Create and add the source of the channel. Read more in Receivers.

Storage
Section titled “Storage”The storage is required for the TV archive and timeshift. Skip this step if you need live channels only.
Go to Settings → Storages → Create:
- Name:
archive - Duration: archive depth in hours, for example
24 - Location: directory for the archive, for example
/var/lib/alta/archive

Authorizer
Section titled “Authorizer”Go to Settings → Authorizers → Create:
- Name:
stalker - Default:
Deny - Backends → Add Backend:
http://stalker.example.com/stalker_portal/server/api/chk_flussonic_tmp_link.php

Channel
Section titled “Channel”Go to Channels → Create:
- Enable: on
- Path:
demo. The channel is available athttp://alta.example.com:8102/demo/index.m3u8 - Name:
Demo Channel - Variants → main: enable and select the receiver
- Authorizer:
stalker - Storage & Duration → Storage:
archive(for the TV archive)

Check that the channel is protected. Without a token Alta answers 403 Forbidden:
curl -I http://alta.example.com:8102/demo/index.m3u8HTTP/1.1 403 ForbiddenStep 2. Configure Ministra
Section titled “Step 2. Configure Ministra”Archive server
Section titled “Archive server”Skip this step if you need live channels only.
Go to Storage → Storage list → Add storage:
- Title:
alta - IP: address and OTT port of Alta, without
http://:alta.example.com:8102 - Apache port:
8102. The field is required, but it is not used for Flussonic DVR - Maximum of users: for example
1000. If the field is empty, set-top boxes get the errorlimitwhen they open the archive - Additional information → Allow TV recording:
Flussonic DVR

Channel
Section titled “Channel”Go to IPTV channels → Channels → Add a channel.
Basic:
- Channel number, Channel name, Genre
- Basic channel: turn it on if you do not use tariff plans. Otherwise add the channel to a service package, or subscribers will not see it
Streaming links → Add link:
- Channel URL:
ffmpeg http://alta.example.com:8102/demo/index.m3u8 - Temporary URL:
Flussonic

Click Save in the link dialog. The link appears in the Streaming links table with Temporary HTTP-link On:

TV archive:
- TV archive type:
Flussonic DVR - Archive servers:
alta - TV archive address: the channel address in Alta, without
ffmpeg:http://alta.example.com:8102/demo/index.m3u8. Ministra builds the archive links from it - TV archive length: archive depth in hours, the same as the storage duration in Alta, for example
24
EPG:
- XMLTV ID: channel ID in your XMLTV source. Catch-up works only for programs from the EPG

Click Save.
Subscriber
Section titled “Subscriber”Add a subscriber with the MAC address of the set-top box in Users → Users list → Add user, or use your existing subscribers.
Step 3. Check the integration
Section titled “Step 3. Check the integration”- Open the channel on a set-top box. The channel plays.
- In Alta open Sessions: the session of the box is in the list.
- Open the TV archive on the box and play a program from the past.
To check the connection between Alta and Ministra, run this command on the Alta server:
curl -I "http://stalker.example.com/stalker_portal/server/api/chk_flussonic_tmp_link.php?token=test"403 Forbidden means Ministra is reachable and rejects the unknown token, as expected.
Troubleshooting
Section titled “Troubleshooting”Every request gets 403 Forbidden
Section titled “Every request gets 403 Forbidden”- Check the backend address in the Alta authorizer with the
curlcommand above. - Check that Temporary URL of the channel link in Ministra is
Flussonic. Without it Ministra does not add the token. - The token lives 5 seconds. A player that opens the same link later gets
403. The time is set with thetv_tmp_link_ttloption in the Ministracustom.ini.
Alta writes denied requests to the log:
journalctl -u alta | grep "Authorization denied"The channel list on the set-top box is empty
Section titled “The channel list on the set-top box is empty”Turn on Basic channel for the channel or add it to a service package of the subscriber tariff plan.
The archive does not open: error limit
Section titled “The archive does not open: error limit”Set Maximum of users of the archive server in Ministra.
Archive programs are shifted in time
Section titled “Archive programs are shifted in time”Ministra uses the PHP time zone (default_timezone in custom.ini) and the MySQL time zone to calculate program times. If they differ, the archive links point to a wrong time range. Set the same time zone for PHP and MySQL.