Messaging Sync Subscription Manager Setup¶
This guide explains how to set up the Acrobits Subscription Manager as a systemd service on your local infrastructure.
Purpose¶
To enable message history synchronization from NetSapiens to Acrobits Linkup Messaging, the script creates and maintains SIP domain-level event subscriptions.
- Security: By running this locally, your NetSapiens super-user credentials never leave your premises.
- Transparency: You have full visibility into the code running on your infrastructure. You also maintain complete control over which domains are monitored and which are excluded using the domain filtering configuration.
- Reliability: While running the script once establishes subscriptions, using the system service approach ensures that broken subscriptions are repaired and new domains are automatically added to the sync every hour.
- Troubleshooting: The script automatically generates a health report regarding your current subscriptions and sends it to Acrobits. This gives the Acrobits team the visibility they need to assist you quickly if synchronization issues arise.
Prerequisites¶
Before you begin, ensure you have the following credentials and information available:
- NetSapiens API host: The base URL of your NetSapiens API (e.g.,
https://api.yourdomain.com). - NetSapiens Super-User Credentials: A username and password with super-user level access to your NetSapiens instance.
- NetSapiens Client ID: The API Client ID configured in your NetSapiens portal.
- NetSapiens Client Secret: The corresponding API Client Secret for your Client ID.
- Acrobits Callback Password: A unique password provided by your Acrobits representative to authorize the reporting and synchronization requests.
- Cloud ID: Your Cloud ID identifier, provided by your Acrobits representative.
Step 1: Directory & Script Preparation¶
We recommend using the /opt/ directory for self-contained scripts.
-
Create the application directory:
-
Install the script: Contact your Acrobits representative to obtain the latest version of
subscription_manager.py. Place it into/opt/acrobits-sync/. -
Set permissions:
Step 2: Configure Environment Variables¶
Create a file named config.env in the same directory to store your credentials.
-
Create the file:
-
Paste and update the following template:
# NetSapiens API base URL (with scheme, e.g., https://my-api.ns.net) NS_API_HOST=your_api_host # NetSapiens Client API secrets NS_CLIENT_ID=your_client_id NS_CLIENT_SECRET=your_client_secret # NetSapiens Super-User Credentials NS_USERNAME=your_username NS_PASSWORD=your_password # Acrobits Messaging Endpoint CALLBACK_HOST=https://api-us.messaging.acrobits.cz # Provided by your Acrobits representative CALLBACK_PASSWORD=your_callback_password # Cloud ID identifier CLOUD_ID=your_cloud_id # --- Editable Testing Domain --- # Use this to select precisely which domain should be subscribed for # testing with the editable version of your Cloud ID. EDITABLE_VERSION_DOMAIN= # --- Domain Filtering --- # Use these to select precisely which domains should be subscribed. # Note: ALLOWED_DOMAINS and DISALLOWED_DOMAINS cannot be used at the same time. # Comma-separated list (e.g., "domain1.com,domain2.com") ALLOWED_DOMAINS="" DISALLOWED_DOMAINS="" -
Secure the configuration:
Step 3: Create the systemd Service¶
This unit defines the execution logic for the script.
-
Create the file:
-
Content:
Step 4: Create the systemd Timer¶
This unit handles the hourly schedule.
-
Create the file:
-
Content:
Step 5: Activation & Monitoring¶
-
Enable and start the timer:
-
Manual Test: Run the service immediately to verify the configuration.
-
Check Logs: Confirm success via the system journal.