Calling Home
"Calling home" registers the reflector with the XLX directory at
xlxapi.rlx.lu. Registered reflectors appear in the directory's reflector
list, which other dashboards (including the Reflectors
page) show, and in the host files that hotspot and repeater software
download to find reflectors by number.
XLX Observatory calls home on its own timer, every 10 minutes by default, whether or not anyone has the dashboard open. It is off until you turn it on.
Turning It On
In the [CallingHome] section of /etc/xlx-observatory/xlx-observatory.ini:
[CallingHome]
ENABLE=1
DASHBOARD_URL=https://xlx.example.org/
COUNTRY=United States
COMMENT=Questionable ARC: D-Star, DMR and YSF
Then restart:
systemctl restart xlx-observatory
The log confirms it:
$ journalctl -u xlx-observatory -n 5
calling home every 10m0s, directory hash /etc/xlx-observatory/callinghome.hash
The reflector shows as Up on the Reflectors page once the dashboard next downloads the directory's list, within 10 minutes by default.
Only one program should call home
If the PHP dashboard is still installed, turn its calling home off,
including any cron job that loads index.php?callhome=1. See
Moving from the PHP Dashboard.
What Is Sent
Each registration tells the directory:
| What | From |
|---|---|
Reflector name, such as XLX381 |
xlxd's status file |
| xlxd version | xlxd's status file |
| How long xlxd has been running | xlxd's PID file |
| Dashboard address | DASHBOARD_URL |
| Country | COUNTRY |
| Comment | COMMENT, cut to 100 characters |
| IP address to list | OVERRIDE_IP, or empty for the address the registration comes from |
| XLX peerings | xlxd.interlink. Only lines for XLX peers are sent; YSF, NXDN, M17, P25 and other peerings are left out. |
| The directory key | callinghome.hash |
Nothing is sent while xlxd isn't running, so the directory doesn't list a stopped reflector as up. Registration starts again by itself when xlxd comes back.
If DASHBOARD_URL is empty the log says so: the directory still lists the
reflector, but nobody can follow a link from it to your dashboard.
The Directory Key
The directory recognizes the reflector by a private key, a 16-character "hash". The first registration for a reflector number sets the key; after that, the directory refuses registrations for that number with a different key.
The key is in /etc/xlx-observatory/callinghome.hash. The package creates
it when it is installed:
- If the PHP dashboard's
/etc/xlxd/callinghome.phpexists (IMPORT_HASH_PATH), the key is copied from it, so the reflector keeps its existing registration. - Otherwise a new random key is made.
Either way it is in /etc, so back it up with the rest of /etc. A
rebuilt reflector with a different key can't register with the
directory.
Moving the Key from an Older Server
To keep a reflector number on a new server, copy the key file across before turning calling home on, and set its owner and mode:
cp callinghome.hash /etc/xlx-observatory/callinghome.hash
chgrp xlx-observatory /etc/xlx-observatory/callinghome.hash
chmod 0640 /etc/xlx-observatory/callinghome.hash
To import the key from a PHP dashboard's callinghome.php after the
package is already installed, see
Moving from the PHP Dashboard.
Making a Key by Hand
If the key file is missing, the service refuses to start with calling
home turned on, because it can't write to /etc. Create it as root:
xlx-observatory -init-hash
chgrp xlx-observatory /etc/xlx-observatory/callinghome.hash
chmod 0640 /etc/xlx-observatory/callinghome.hash
-init-hash imports the key from IMPORT_HASH_PATH if that file exists,
and makes a new one otherwise. If the key file already exists it is left
alone.
When It Fails
A failed registration is logged and retried every minute until it works:
calling home: http://xlxapi.rlx.lu/api.php: 503 Service Unavailable
calling home: working again
See Troubleshooting for other problems.