How to Extend Lync 2010 to MyPBX

1. Introduction

Brief introduction of the Lync server installed, and the target achieved in this manual.

Brief Introduction:
This is a standard version of Lync installed in windows 2008 R2 enterprise (64bit). It requires two computers to install, one for DC and the other one for Lync. Because only TCP/TLS is supported by Lync, which doesn't match the general trunks we get like PSTN/sip (UDP)/BRI/GSM or others, a translator like MyPBX is needed.

Basic Information:

IP of DC:
IP of Lync:
IP of MyPBX:
FQDN: (Front end server, SQL and mediation pool are installed here)
Account: harryhua, extension: 128888, UPN:
Extension range in MyPBX: 500-510
Default TCP port: 5060 (MyPBX), 5068(Lync)


1. Making internal calls between MyPBX and Lync server by dialing extension number directly without”+”.
2. Making outbound calls from Lync via the PSTN trunk of MyPBX directly.
3. Making inbound calls from PSTN trunk and then dial the number of Lync extension number after the second dial tone.

2. Create topology to MyPBX and publish it

Open the topology you have got from the builder. If you haven't got one, please create and publish it successfully before adding a new gateway.

                                                           Figure 1

Right click “” and choose edit.

                                                             Figure 2

Click “new” to add a PSTN gateway to MyPBX.

Note: please make sure TCP is enabled in MyPBX in “SIP Settings” page, which is disabled by default.

                                                               Figure 3

Input the IP of MyPBX ( in this example), port (5060), click TCP as protocol, and then click “OK”.

                                        Figure 4

Click “OK” again to save it.

                                                                  Figure 5

Then you can see a new gateway, right click and publish it. Click “Finish”.

                                                                 Figure 6

                                                        Figure 7

                                                           Figure 8

                                                           Figure 9

3. Enable Lync account

Note: please create your account in DC first before adding it into Lync server.

Enable Lync account in “Lync server 2010 control panel”.
Open “Lync server control panel” and log in.

                                                           Figure 10

Click “Users” to enable the account and spare a number to him, in my example,
User: harryhua
The number is: +128888

Click “enable users” to start:

                                                               Figure 11
Click “Add”.

                                                                    Figure 12

Input name “harryhua”, and click “find”. Then choose it before clicking “OK”.

                                                                     Figure 13
Assign user to pool:
For user' SIP URL to log in at client software, we recommend using UPN
Telephony: enterprise voice
Line URL: TEL: +128888

                                                       Figure 14

Click “Enable” to save it.
Log in the client software with the new account: to test if it is successfully added as a Lync server user.

                             Figure 15

4. Voice routing in Lync

Note: the extension number of Lync server starts with “+”.
Edit the “Global” dial plan.

                                                                  Figure 16

Edit the rule of “Prefix all”; we need add a “+” as the prefix.

                                                                       Figure 17

Modify the length to “any” and click “OK” to save it.

                                                                         Figure 18
Edit the “Route” page.

                                                       Figure 19

Click “Local Route” to start editing.

                                                       Figure 20

Modify the default pattern to “^(\+\d*)$”.

                                                       Figure 21

Click “OK” to save it and you will see the modified pattern as below:

                                                       Figure 22

Add the associated gateway:

                                                    Figure 23

                                                           Figure 24

                                                      Figure 25

Click “OK” to save it.

                                                           Figure 26
Commit all the modification.
The configuration in Lync server side is finished.

5. Configurations in MyPBX

Create a “peer to peer” sip trunk:

Hostname/IP: the IP of Lync server,
Port: 5068 (the default port for TCP protocol)
Transport: TCP

                                                            Figure 27

Check the status in “Trunk Status” page:

                                                          Figure 28

5.1 Configurations for calling between extensions

1. Create an inbound route for this trunk with DID for each extension
Extension range in MyPBX (500-510 for example)

                                                           Figure 29

In this case, you can dial the extension number of MyPBX from Lync client directly.

2. Create an outbound route for this trunk for dialing the extension number of Lync server
Note: extension number of Lync server is “+12XXXX”
In the following example, the number of account “harryhua” is +128888

                                                Figure 30

5.2 dialing out from Lync via the PSTN trunk of MyPBX

Note: please check if the PSTN trunk is available in MyPBX.

1. Create an outbound route for PSTN trunk.

                                             Figure 31

2. Create an inbound route for Lync trunk and choose this route as the destination.

                                        Figure 32

Then you can dial your cell phone number from Lync client software directly.

5.3 Dial into Lync server from outside

1.Create an outbound route for the sip trunk to Lync server.

                                                  Figure 33

2.Create a DISA and choose this outbound route.

                                                           Figure 34


3.Create an inbound route for PSTN trunk and choose DISA as destination.

                                                        Figure 35

You can test by dialing the PSTN number first, and then dial the extension number of Lync server after the second dial tone.

Have more questions? Submit a request


Please sign in to leave a comment.