Difference between revisions of "Connection of Lync Server to Synway Gateway"

From synwaywiki
Jump to: navigation, search
(Created page with "[http://www.synway.net/Download/Manual/Others/Howtoconfigure-SMG-Elastix.pdf Read in PDF] ===Summary=== Microsoft Lync is a communication service which provides instant messa...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[http://www.synway.net/Download/Manual/Others/Howtoconfigure-SMG-Elastix.pdf Read in PDF]
+
[http://www.synway.net/Download/Manual/Others/Howtoconfigure-SMG-Lync.pdf Read in PDF]
  
 
===Summary===
 
===Summary===
Line 145: Line 145:
  
 
2.The expression consists of two parts: one for matching and one for convertion.<br />
 
2.The expression consists of two parts: one for matching and one for convertion.<br />
 \d represents any digit from 0 to 9.<br />
+
<pre>
| means or.<br />
+
 \d represents any digit from 0 to 9.
 & means and.<br />
+
| means or.
Content in {} represents number of digits, such as \d{4} indicating a combination of 4 digits from 0 to 9. <br />
+
 & means and.
[0-9] has the same meaning of \d, representing any digit from 0 to 9.<br />
+
Content in {} represents number of digits, such as \d{4} indicating a combination of 4 digits from 0 to 9.  
* means matching numbers in any length, including the length of 0. <br />
+
[0-9] has the same meaning of \d, representing any digit from 0 to 9.
?means matching for once only. <br />
+
* means matching numbers in any length, including the length of 0.  
 +
?means matching for once only.  
 +
</pre>
  
 
Example: <br />
 
Example: <br />
^7(\d{4})$ is the part for matching, which represents a 5-digit extension number starting with 7 plus any 4 digits from 0 to 9. <br />
+
<pre>
 +
^7(\d{4})$ is the part for matching, which represents a 5-digit extension number starting with 7 plus any 4 digits from 0 to 9.  
 
+8610591$1 is the part for conversion, among which $1 is a dynamic part and +8610591 is the prefix. If we enter 79999 to the part of $1, the final result is +861059179999.
 
+8610591$1 is the part for conversion, among which $1 is a dynamic part and +8610591 is the prefix. If we enter 79999 to the part of $1, the final result is +861059179999.
 +
</pre>

Latest revision as of 13:55, 26 October 2015

Read in PDF

Summary

Microsoft Lync is a communication service which provides instant messaging (IM), audio and video calls, online meetings, availability (presence) information, and sharing capabilities all from one, easy-to-use program. The Lync client combines many kinds of communication tools together on the updated user interface, which allows people to use it in a way they are accustomed to. It features a control panel for people to easily find and use common functions such as the dial, the visual voicemail, the contact list and the call list.

The Synway SMG series gateway products help bring traditional calls into the IP network in a more stable way.

This file will guide you step by step to configure the connection of a Synway digital or analog gateway to the Microsoft Lync system.

Testing Environment

Windows 2008 Server R2, 64bit (Domain Controller)
Windows 2008 Server R2, 64bit (Lync Server)
Windows 7 (Lync Client)
Windows XP (Lync Client)
Synway digital gateway: SMG2120, 1.6.1_2015062617 (IP: 201.123.114.144)
Synway analog gateway: SMG1032, 1.5.2_Release+2015052812 (IP: 201.123.114.205)

Lync Server Installation

First of all, it requires an agent server for the connection of the Lync server and the PSTN gateway. For details about how to install the Lync server, please refer to the document ‘Lync Server 2010 Environment Deployment’

For a Lync server installed for the first time, the PSTN gateway to be connected with it must be selected during topology generation. To be exact, run the topology generator and tick the Enterprise Voice option when going to the step ‘Function Selection’ for defining a new front-end processor pool.
CLS3A.png

Set the agent server and specify the PSTN gateway.
CLS3B.png

Add the PSTN gateway. The Synway gateway has the IP address of 201.123.114.205 and uses the monitoring port 5060 in TCP. Fill them in here below.
CLS3C.png

Release the topology once it is generated.

For a running Lync server, download the topology, save it to local and open it. Then after adding the corresponding gateway, save and release the topology.

Connection of Synway Analog Gateway & Lync Server

Lync Server IP: 201.123.114.202
Synway Analog Gateway IP: 201.123.114.43

Here we’d like to demonstrate how to initiate a call from the Lync client to the PSTN gateway.

First, go to the menu Active Directory User and PC and add a user qzt as the account of the Lync client.
CLS4A.png

Save it and log in the control panel of the Lync server.
CLS4B.png

Go to the User interface to activate the added user.
CLS4C.png

Click ‘Enable Users’ and select ‘New Lync Server User’. Press the Add button.
CLS4D.png

On the pop-up interface we can search for available users and find the newly created user qzt. Select it and click the button ‘OK’.
CLS4E.png

Fill in the blank under ‘Assign Users to a pool’ with lync.corp.sanhuid.com. Now we need to set the user’s SIP account and subscriber number. Select ‘Specify a SIP URI’ for ‘Generate User’s SIP URI’, and fill in the SIP URI in the format of sip:qzt@corp.sanhuid.com. Select ‘Enterprise Voice’ for ‘Telephony Service’ and fill in ‘Line URI’ with tel:+123456 . Then click the button Enable.
Set voice routing, mainly inclusive of the dial plan and the route. Dial Plan indicates the number-receiving rule for the calls from the Lync terminal, using the regular expressions written in Appendix I. By default there already exists a dial plan and we choose to edit it.
CLS4F.png

In the following standardized rules which are associated there by default is a rule ‘Prefix All’ for receiving 11 as the number. Now let’s add a new rule. Select ‘Add New’, enter the name ‘to_pstn’, and fill in the start digit with 8, the length with ‘Exactly, 6’, the Digits to remove with 0. It means to receive those numbers which start with 8 and in the length of 6 bits, no longer or shorter.
CLS4G.png

Thus, as long as the Lync client dials 6-bit numbers starting with 8, all of them can be received. Save the rule and click ‘OK’. Now the Dial Plan interface shows the Global status as ‘unsubmitted’.
Click the button ‘Submit’ to submit all.
Next, add a route. The route tells which PSTN gateway the specified number will go through. Now let’s create a new route.
Fill in the name with ‘to_pstn’. Write the start digit of the number to be allowed under ‘Set up matching mode’. For example, write 8 if the number which will go through the PSTN gateway starts with 8, and then click the button ‘Add’. Find out the IP address of the Synway SMG gateway (43) from associated gateways, select and add it. Just choose ‘LocalRoute’ as the associated PSTN.
Then, when the Lync client dials a number starting with 2, the gateway with the IP address of 43 will receive the call. Click ‘OK’ to return to the route setting interface and the added route displays ‘unsubmitted’.
CLS4H.png

Click the option ‘Submit All’ under ‘Submit’ and the following interface pops up.
Click ‘Submit’.

For a call from the Synway gateway to the Lync client, we need to set via the account of the Lync client. In the properties of the added Lync user, select ‘Enterprise Voice’ for ‘Telephony Service’ and enter ‘tel:+123456’ for ‘Line URI’. Now the gateway can call +123456@201.123.114.202 to reach the user.
CLS4I.png

Configuration of Synway Analog Gateway:
Note:
As the gateway is connected with Lync via SIP trunk (point-to-point) using TCP protocol, only SIP settings and corresponding routes need configuring for the gateway.

Analog Gateway:
Based on the default settings, modify the setting of ‘SIP Transport Protocol’ to TCP and that of ‘Register Gateway’ to No. CLS4J.png

Do port and port group settings by actual requirement. Here we take FXS ports for example. Set the extensions at FXS ports are 2001 - 2016, respectively corresponding to Channel 17- Channel 32.
CLS4K.png

FXO ports are temporarily not used. For details about how to use FXO ports, please refer to the relative gateway user manual.
Add IP->PSTN and PSTN->IP routes to route settings.
To accept calls from Lync, add an IP->PSTN route with Source IP of 201.123.114.202 (i.e. the IP address of Lync), with CallerID Prefix and CalleeID Prefix set to the default value * which represents all calls, and with Call Destination set to Route by Number. Thus, a call from Lync with the called party number of 2001 will ring the corresponding FXS port.
CLS4L.png

To make a call from the extension 2001 to the Lync client user1, we need dial the corresponding subscriber number 8301 and add a PSTN->IP route with Call Destination set to IP and port of the Lync server. Check the topology in Lync settings and find the port of the Lync server from the settings of the PSTN gateway connected with the agent server. The default TCP is 5068. Here is 201.123.114.202:5068. Thus, Extension 2001 can dial 8301 to make a call to the Lync client.

Configuration of Synway Digital Gateway:
As the IP address and the monitoring port of the Synway digital gateway are respectively 201.123.114.144 and 5063, we need add a PSTN gateway with the IP address of 201.123.114.144 and the monitoring port of 5063 to the Lync server.

First, set SIP Transport Protocol to TCP.
CLS4M.png

Add a SIP trunk with the remote IP of 201.123.114.202 and the port of 5068.
CLS4N.png

Add a new SIP trunk and select the SIP trunk just added.
CLS4O.png

Set the transport protocol for PCM trunk and relative parameters in PCM settings. The PCM connected here is ISDN-side.
Add PCM trunks.
Add a PCM trunk group.
Add an IP->PSTN route to route SIP calls from the Lync server to the PCM trunk group to go out.
CLS4P.png

Add a PSTN->IP route to route calls from the PCM trunk group to the SIP trunk group and then go out to reach the Lync server.
Then all calls from the Lync server will be routed to the PCM trunk group to go out, while all calls from the PCM trunk group will routed to the Lync server.

Application of Lync Client

Usually the Lync client runs on a PC which has logged on a domain, so we can log in it directly. If the PC has not logged on a domain, we shall download the certificate from http://corp.sanhuid.com/certsrv before logging in the Lync client. And what’s more, to visit http://corp.sanhuid.com/certsrv, we shall set DNS to 201.123.114.201 first.

Click the option ‘Download CA certificate, certificate link or CRL’ and follow the prompts to download or install the certificate directly. We shall manually select to install the certificate to a directory of trusted root certification authorities.

Then the Lync client can be logged in directly. Enter a complete logging address, such as qzt@corp.sanhuid.com.

Enter the account and the password to log in and the interface will display that Extension 2001 at the FXS port of an on-line gateway can call 8301 to the Lync client User1, while User1 can call 2001 to Extension 2001 at the FXS port of the gateway. Thus the gateway makes a call to the Lync server.

Appendix I Regular Expressions

Regular expressions are used for matching the Lync dial plan. Here below let’s give a brief introduction on relative symbols

1.The expression starts with ^ and ends with $.

2.The expression consists of two parts: one for matching and one for convertion.

 \d represents any digit from 0 to 9.
| means or.
 & means and.
Content in {} represents number of digits, such as \d{4} indicating a combination of 4 digits from 0 to 9. 
[0-9] has the same meaning of \d, representing any digit from 0 to 9.
* means matching numbers in any length, including the length of 0. 
?means matching for once only. 

Example:

^7(\d{4})$ is the part for matching, which represents a 5-digit extension number starting with 7 plus any 4 digits from 0 to 9. 
+8610591$1 is the part for conversion, among which $1 is a dynamic part and +8610591 is the prefix. If we enter 79999 to the part of $1, the final result is +861059179999.