Skip to content

Commit

Permalink
Merge pull request #388 from AccelerateNetworks/update-for-0.641
Browse files Browse the repository at this point in the history
Add additional use cases and Debian 10 install instructions
  • Loading branch information
devopsec committed Jun 22, 2021
2 parents a8c0496 + 8049a70 commit 0efb6fc
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 45 deletions.
41 changes: 0 additions & 41 deletions docs/source/user/centos-install.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/user/centos_install.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _centos7-install:
.. _centos7_install:

CentOS 7 Install
================
Expand Down
23 changes: 23 additions & 0 deletions docs/source/user/debian_install.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
.. _debian10-install:

Debian 10 Install
=================

Note that this only covers one configuration with RTP traffic proxied. Contributions of additional configurations are welcome if you have tested them!

Make sure to **set the hostmane to a fully qualified domain name (FQDN)** that has DNS records pointed at the server (like sbc.yourdomain.com) prior to installation. The average install time is between 4-9 minutes depending on the resources on your vm/server.

Note: You can add a "-b <version number>" to the end of the git command to install and specific version of dSIPRouter.

Install (Proxy audio (RTP) traffic)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: bash
hostnamectl set-hostname
apt update && apt install -y git curl
cd /opt
git clone https://github.com/dOpensource/dsiprouter -b master dsiprouter
cd dsiprouter
./dsiprouter.sh install -all
.. _debian9-install:

Debian 9 Install
Expand Down
Binary file added docs/source/user/images/direct-routing-sbcs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions docs/source/user/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Prerequisites:

- Must run this as the root user (you can use sudo)
- git needs to be installed
- Hostname needs to be set to a FQDN (for certbot to get LetsEncrypt certificate)
- The installer will handle all other dependencies


Expand All @@ -38,17 +39,24 @@ Install Options
OS Support
^^^^^^^^^^

- **Debian Stretch (tested on 9.6)**
- **Debian 11 (Bullseye) (BETA)**
- **Debian 10 (Buster) (tested on 10.9)**
- **Debian 9 (Stretch) (tested on 9.6)**
- **Debian 8 (Jessie)**
- **CentOS 8**
- **CentOS 7**
- **Amazon Linux 2**
- **Ubuntu 16.04 (Xenial)**


Kamailio will be automatically installed along with dSIPRouter.
Must be installed on a fresh install of Debian Stretch or CentOS 7.
Must be installed on a fresh install of Debian Stretch, Debian Buster or CentOS 7.
You will not be prompted for any information. It will take anywhere from 4-9 minutes to install - depending on the processing power of the machine. You can secure the Kamailio database after the installation.
Links to the installation documentation are below:

- :ref:`debian9-install`
- :ref:`centos7-install`
- :ref:`debian10-install`
- :ref:`centos7_install`

Amazon AMI's
^^^^^^^^^^^^
Expand Down
80 changes: 80 additions & 0 deletions docs/source/user/use-cases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -461,3 +461,83 @@ Steps to Implement

.. image:: images/freepbx-pt-setup-softphone.png
:align: center

==============================
Microsoft Teams Direct Routing
==============================

dSIPRouter can act as an intermediary Session Border Controller between Microsoft Teams Direct Routing and your SIP provider or SIP servers.

An instance of dSIPRouter can either be a single tenant configuration (like sbc.example.com) or multi-tenant under a single wildcard subdomain (like *.sbc.example.com where * is the tenant's name).

.. image:: images/direct-routing-sbcs.png
:align: center


------------------
Steps to Implement
------------------
1. `Buy a license <https://dopensource.com/dsiprouter-annual-subscriptions/>`_ and follow the license installation instructions that are emailed to you.
2. Add any carriers you need for inbound and outbound routing, define appropriate routes.
3. Authorize your SBC's domain with Microsoft 365 by adding a TXT record starting with ms= per `Microsoft's documentation <https://docs.microsoft.com/en-us/microsoft-365/admin/setup/add-domain?view=o365-worldwide>`_.
Note: For multi-tenant use, authorizing the root subdomain or domain (if you use *.sbc.example.com, you would authorize sbc.example.com) should avoid the need to authorize each subdomain below this (like clientname.example.com)
4. Create a global admin user with proper Teams licensing associated with the domain (or for multi-tenant both the root subdomain (eg: sbc.example.com) and client's domain (eg: client.sbc.example.com))
5. Add the Teams session border controller in `Teams Admin Center <https://admin.teams.microsoft.com/direct-routing/v2>`_. Ensure the SIP port is correct (usually 5061) and the SBC is enabled!
6. `Install PowerShell <https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux>`_ type pwsh then:

.. code-block:: bash

Install-Module -Name MicrosoftTeams
Import-Module MicrosoftTeams
$userCredential = Get-Credential
Connect-MicrosoftTeams -Credential $userCredential


Login Note: If your using multi-factor authentication (MFA/2FA), log in by typing Connect-MicrosoftTeams
Debian 10 Note: If you run into `this OpenSSL issue <https://github.com/PowerShell/PowerShell/issues/12202>`_ , here is `a workaround <https://github.com/PowerShell/PowerShell/issues/12202#issuecomment-720402212>`_!
**Replace sbc.example.com, user@example.com and +13137175555** with your SBC's FQDN, the user's email address and their phone number (with + then country code, use +1 if you are in the North American Numbering Plan)

.. code-block:: bash

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="US and Canada"}
Set-CsOnlineVoiceRoute -Identity "LocalRoute" -NumberPattern ".*" -OnlinePstnGatewayList sbc.example.com
New-CsOnlineVoiceRoutingPolicy "US Only" -OnlinePstnUsages "US and Canada"

# This is suppose to stop MSTeams from using the Microsoft Dialing Plan and using the routing policies that was defined above
Set-CsTenantHybridConfiguration -UseOnPremDialPlan $False

# Apply and the US Only Voice Routing Policy to the user
Grant-CsOnlineVoiceRoutingPolicy -Identity “user@example.com“ -PolicyName "US Only"

# If it doesn’t return a value of US Only, then wait 15 minutes and try it again. It sometime takes a while for the policy to be ready.
Get-CsOnlineUser “user@example.com" | select OnlineVoiceRoutingPolicy

# Define a outgoing phone number (aka DID) and set Enterprise Voice and Voicemail
Set-CsUser -Identity "user@example.com" -OnPremLineURI tel:+13137175555 -EnterpriseVoiceEnabled $true -HostedVoiceMail $true


Note: Log out by typing Disconnect-MicrosoftTeams

Credits to Mack at dSIPRouter for the SkypeForBusiness script and `this blog post <https://seanmcavinue.net/2021/04/20/configure-teams-direct-routing-simple-deployment-via-powershell/>`_ for helping me update these commands for the new MicrosoftTeams PowerShell module.

-----------------------
Add a single Teams User
-----------------------
If you have an existing dSIPRouter SBC configured in Teams and have added a DID as an inbound route already, then run the commands below in PowerShell to add an additional user.

**Replace user@example.com and +13137175555** with your SBC's FQDN, the user's email address and their phone number (with + then country code, use +1 if you are in the North American Numbering Plan)

.. code-block:: bash

# Get Credentials, if using MFA/2FA just run Connect-MicrosoftTeams
$userCredential = Get-Credential
Connect-MicrosoftTeams -Credential $userCredential

# Apply and the US Only Voice Routing Policy to the user
Grant-CsOnlineVoiceRoutingPolicy -Identity “user@example.com“ -PolicyName "US Only"

# Define a outgoing phone number (aka DID) and set Enterprise Voice and Voicemail
Set-CsUser -Identity "user@example.com" -OnPremLineURI tel:+13137175555 -EnterpriseVoiceEnabled $true -HostedVoiceMail $true


Note: Log out by typing Disconnect-MicrosoftTeams

0 comments on commit 0efb6fc

Please sign in to comment.