dSIPRouter

repository·master·Indexed 42 days ago

https://github.com/dopensource/dsiprouter

A platform that leverages Kamailio to provide managed SIP services, including SIP trunking, hosted PBX proxying, Microsoft Teams Direct Routing, WebRTC proxying, and Voice AI gateway capabilities. It features carrier and endpoint management, advanced routing (LCR, prefix, and failover), and a REST API for managing outbound routes and Kamailio statistics.

Tokens
18.9K
Snippets
57
Records
93
Agent score
53%

What's inside dSIPRouter

  1. What is dSIPRouter?

    master

    dSIPRouter is a platform that transforms Kamailio into a SIP Service Provider platform. It is designed to handle several core VoIP use cases:

    • SIP Trunking services: Supports IP and credential-based authentication for customers with on-premise PBXs (e.g., FreePBX, FusionPBX, Avaya).
    • Hosted PBX services: Proxies SIP Endpoint requests to multi-tenant (e.g., FusionPBX) or single-tenant (e.g., FreePBX) PBXs. Includes a scalable integration for FusionPBX.
    • Microsoft Teams Direct Routing (Core Subscription Required): Provides SBC functionality to interconnect existing voice infrastructure or VoIP carriers with Microsoft Teams.
    • WebRTC Proxy (Core Subscription Required): Allows WebRTC clients to register to PBXs that only expose extensions via UDP or TCP.
    • Voice AI Gateway: Manages Voice AI agents (currently supporting OpenAI Realtime Agents) through a single interface.
  2. Navigate dSIPRouter Documentation

    master

    The dSIPRouter documentation is organized into three primary sections to serve different user needs:

    1. User Documentation: Guides for operating and managing the platform.
    2. Developer Documentation: Technical details for extending or integrating with the platform.
    3. Routes Documentation: Detailed specifications for API and GUI routes.

    Use the sidebar table of contents to navigate between these sections.

  3. Configure Endpoint Weights and Load Balancing

    master

    When configuring an Endpoint Group, you can manage how SIP traffic is distributed using the weight field:

    • Weight Field: Defines the distribution of SIP traffic to a particular endpoint. If left unspecified, the system automatically generates a weight.
    • FusionPBX Domain Auth: If using this method, Register and INVITE requests are distributed across endpoints based on their assigned weights.
    • Inbound Call Load Balancing: To route inbound calls to an endpoint group based on weights, select the group name with LB concatenated to it in the Inbound Mapping Endpoint Group dropdown.
      • Example: If your Endpoint Group is named PBXCluster, select PBXCluster LB to enable weight-based inbound routing.
  4. Use the dSIPRouter Auto Upgrade feature

    master

    The Auto Upgrade feature allows you to upgrade dSIPRouter via the User Interface (UI) or the Command Line Interface (CLI).

    Important Notes:

    • Licensing: Upgrading to version 0.73 does not require a license. However, all subsequent releases require a dSIPRouter Core Subscription License to use the auto-upgrade feature.
    • Passwords: During an upgrade, hashed passwords (such as the dsiprouter admin password) are reset. You can find the new passwords in the CLI output after completion or by viewing the upgrade log in the UI.
    • Support: If an upgrade fails, you can purchase a dSIPRouter Core Subscription from the dSIPRouter Marketplace to receive support hours for assistance.
  5. Create consistent UI layouts for custom modules

    master

    When developing custom modules with user interfaces for dSIPRouter, you should maintain a consistent layout by extending the existing application structure. The GUI is built using the Python Flask framework and Jinja2 templating.

    To ensure your module's pages include the standard header, footer, and navigation menu, extend the primary base template: templates/table_layout.html.

    # Example of extending the base template in your module's Jinja2 templates
    {% extends "templates/table_layout.html" %}
    
    {% block title %}My Custom Module Page{% endblock %}
    
    {% block table_headers %}
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
        </tr>
    {% endblock %}
  6. Configure dSIPRouter logging

    master

    dSIPRouter logs to the local2 syslog facility.

    Enable/Disable Logging

    To toggle logging, edit /etc/rsyslog.d/dsiprouter.conf and ensure the line starting with local2 is either uncommented (to enable) or commented out (to disable). You must restart the syslog service for changes to take effect.

    Log File Location

    Default log file: /var/log/dsiprouter.log

    Adjust Verbosity

    To change the logging level, edit /etc/dsiprouter/gui/settings.py and modify the DSIP_LOG_LEVEL variable.

    # To enable/disable logging
    vi /etc/rsyslog.d/dsiprouter.conf
    
    # Restart syslog to apply changes
    systemctl restart rsyslog
    
    # To change verbosity
    vi /etc/dsiprouter/gui/settings.py
  7. Obtain or reset your dSIPRouter API Token

    master

    Your API token is provided upon installation. If you need to reset or update your token, use the dsiprouter setcredentials command with the -ac flag. You must provide your hostname and the new token as environment variables.

    DSIP_HOSTNAME=<your ip or hostname>
    DSIP_TOKEN=<your token>
    dsiprouter setcredentials -ac $DSIP_TOKEN
  8. Prerequisites for installing dSIPRouter on RHEL-based distros

    master

    Before starting the installation on a RHEL-based distribution, ensure the following:

    1. FQDN Configuration: Set the server's hostname to a Fully Qualified Domain Name (FQDN) that has valid DNS records pointing to the server (e.g., sbc.yourdomain.com).
    2. Git Availability: The git package must be installed.
    3. Version Selection: If you need a specific version of dSIPRouter, append -b <version number> to the git clone command.