One of the easy ways to connect Lync Server to any IP telephony provider.
A small but significant obstacle to using Lync Server as the basis of corporate telephony can be the peculiarity of its work with the SIP protocol. The peculiarity is the complete incompatibility with the standards of IP-telephony providers. Lync Server supports TCP or TLS and cannot transfer credentials, IP-telephony providers, in turn, mostly use UDP and require authentication by login and password.
Task
Choose the most simple and easy solution for the organization of the gateway. Ideally, free, stable and under Windows.
')
Decision
FreeSWITCH in the smallest possible configuration, sufficient to connect on the one hand with the Lync Server and on the other for authorization with the providers of IP-telephony.
As a basis for solving FreeSWITCH is not chosen by chance. Ideologically, this is a fairly powerful platform-router of multimedia traffic flows with the ability to connect additional handlers in the form of plug-in modules. The Lync <-> FreeSWITCH <-> PSTN configuration is the simplest case to follow the FreeSWITCH architectural model.
Topology
It all depends on the configuration of the specific network and the existing load on the telephony. Both options are viable, both with the installation of FreeSWITCH together with the Mediation Server (or Standard Edition) role, and on a separate server.
Customization
The whole setup process is extremely simple and consists of 3 steps:
- Creating SIP Trunks in Topology Builder
- Lync Server Setup
- Configure FreeSWITCH
Creating SIP Trunks in Topology Builder
Open an existing topology in Topology Builder. In the properties of the Mediation Server we enable the TCP port (for example, 5068). Create a new PSTN Gateway object (the name and address can be specified either as a separate server or as a Mediation in case of a joint installation). In the SIP trunk parameters, we specify the port on which FreeSWITCH is listening (for example, 6000), the TCP protocol (in this example), the Mediation Server port (5068).
Lync Server Setup
Open the section
Voice Routing .
In the
Trunk Configuration subsection, open the rule
Global . For the parameter
Encryption support level, select
Not Supported , for the parameter
Refer support -
None . Select the
Centralized media processing checkbox and remove all others.
In the
Route subsection, we create a rule for routing calls to external numbers on a SIP trunk to our gateway.
Configure FreeSWITCH
Download and install FreeSWITCH. Delete all the contents of the \ conf folder in the installation directory. Instead of deleted files, unpack the archive with the configuration (link at the end of the post).
In the \ conf \ pstn folder, specify the credentials in the file template for one of the providers and delete the extension “.noload” from it. If for your provider the template is not in the folder, then you can take any one as a basis and copy it into a file without the “.noload” extension. As a result, there should remain one or several .xml files with the parameters of the existing providers of IP-telephony.
In the freeswitch.xml file, we specify the address (fe.lab.local in our example), port (5068) and protocol (tcp) Lync Mediation Server, local address and port (6000) for connecting to the Lync Mediation Server, local address and port ( 5060, but can be any) to connect to the PSTN provider.
At the end of the file in the "dialplan" section in the context of "from_Lync" for <extension name = "RouteToPSTN"> in the "action" rule, specify the name of the gateway from the profile of the current PSTN provider to which all external calls from Lync will be sent. If there are several providers, you need to create call routing rules. You can do this in Lync itself, but this is better described in a separate article.
FreeSWITCH can be launched as a console application or as a service. After making the parameters in the configuration template, you need to start the console application and check if the profiles and gateways are connected. To do this, run the command in the command line:
sofia status
If both profiles and gateway (to PSTN) were successfully launched and connected, you can close the console with the command "..." (three points), start and set the delayed autostart service FreeSWITCH.
Gateway configured!
FreeSWITCH configuration template:
freeswitch.conf.lync-pstn.zip .
Use on health!