UCPrimer
  • UCprimer
  • About

Deploying Polycom phones for Cloud PBX with on-premise PSTN Connectivity Part 1

5/31/2016

3 Comments

 
Picture
In the previous article we upgraded our directory synchronization server from the older DirSync to the latest version of AAD Connect to prepare our Skype for Business hybrid environment for Office 365 E5 Cloud PBX with on-premise PSTN Connectivity. In this article, we will configure our Skype for Business on-prem environment with a simulated PSTN connectivity using an Asterisk IP-PBX. We will create the necessary PSTN Gateway and Trunk from the Skype for Business side, and configure the corresponding SIP trunks and inbound/outbound routes on the Asterisk side. Then we will register a Polycom VVX600 and Polycom Trio8800 using accounts homed on the on-premise Skype for Business and make sure they are able to call extensions on the Asterisk IP-PBX. Once this is completed, we will move those accounts to Office365 E5 and test the voice functionality again to confirm that on-premise PSTN connectivity is working. Below is the diagram of the initial setup before moving accounts to Office365:
Picture

Section 1/2: Configuring Skype for Business for on-premise PSTN Connectivity

We first need to configure our mediation server pool to listen on TCP 5060. By default this is not enabled and the mediation server only listens on TLS 5067. To do this we use topology builder and modify the properties of the Front End Pool to enable the TCP listening port 5060 on the mediation server as shown below:
Picture
Next we use topology builder again to define a new PSTN Gateway which is fairly straightforward. A corresponding Trunk will be automatically created and we need to modify the properties of the Trunk to listen on TCP 5060 as well as define the mediation server port as TCP 5060 also:
Picture
After publishing the topology we actually need to run the "Setup or Remove Skype for Business Server Components" on each Front End server to enable the changes. Simply start deployment wizard and run this step for each front end server in the pool.

Once completed we proceed to create a new voice route for the PSTN Gateway (Asterisk PBX). Using the Skype for Business Server Control Panel, we add a new voice route and specify the matching pattern for calls going to. As shown below, the numbers matching the pattern "+656445XXXX" will make use of this PSTN Gateway:
Picture
When defining the voice route, we also need to specify the Associated trunks and make sure the PSTN Gateway defined earlier is selected. We also want to associate the PSTN Usages for this route, which in the lab is the "Local" usage which in turn is part of the "Global" voice policy. These are shown below:
Picture
Once the route is defined, we can go to the PSTN Usage tab and see that the "Local" usage contains the route that we just defined:
Picture
Next we define and associate a new normalization rule for 4-digit extensions that will be routed through our PSTN Gateway. In this lab, extensions starting as 3XXX will be routed to the PSTN Gateway, and later we will define these 3XXX extensions in Asterisk IP-PBX. We will add the "+656445" digits to the 3XXX extension so that the Skype for Business server will match the called number to the route going to the PSTN Gateway:
Picture
Next, we modify the Global Trunk Configuration to associate the "Local" PSTN Usage so that this trunk will be used when calling our 3XXX extensions. We need to disable Refer Support and disable Media Bypass as it is not known if Asterisk will support these options:
Picture
In the trunk configuration, we also need to define a Called number translation rule so that the trunk will strip off the +656445 digits and just send the 3XXX extension to the PSTN Gateway. This is because we are going to terminate the call from Skype for Business to Asterisk on an extension defined in Asterisk itself, which is simply a 3XXX extension rather than a full E.164 number:
Picture
Fo
Section 2/2: Configuring Asterisk IP-PBX as a PSTN Gateway for Skype for Business on-premises

Now that we have completed the Skype for Business configurations, we proceed to configure the Asterisk IP-PBX. For our lab we are using FreePBX-5.211.65 which is bundled with Asterisk IP-PBX. The full name of the iso image is FreePBX-5.211.65-21-i386-Full-1416756098.iso and the Asterisk version is 11.14.1. This is not the latest version of FreePBX/Asterisk at the time of this post, as the I find that the older version is much simpler to configure and manage. The basic steps of installing and configuring FreePBX/Asterisk on Windows Server Hyper-V are already covered in this article http://www.ucprimer.com/tech-blog/lync-asterisknow-20-integration-guide and won't be repeated here. Therefore, only the key configurations will be mentioned here.

After the FreePBX/Asterisk installation is complete, we need to create a SIP Trunk for the Skype for Business Front End Pool which in this lab consists of 3 Front End servers. The FreePBX GUI will allow us to define a SIP Trunk to the first Front End server as shown below. In the Dialed Number Manipulation Rules, we defined a new rule for normalizing 4 digit extension dialing from Asterisk so that the full E.164 number will be sent over to Skype for Business Mediation Server. We also need to define the PEER Details as shown:
host=10.250.27.52                          // This is the IP address of the first FE Server
transport=tcp
type=friend
port=5060
insecure=very
fromdomain=10.222.210.70           // This needs to match the IP address of the Asterisk IP-PBX
context=from-internal
promiscredir=yes
qualify=yes
canreinvite=yes
Picture
After defining the SIP trunk to the first Front End server, we need to manually add the SIP Trunks for the other 2 FE servers by editing the /etc/asterisk/sip_addtional.conf file as shown below. If we do not do this, then only the first FE server will be recognized by Asterisk which results in calls from Skype for Business users homed on the other FE servers to fail.
Picture
After modifying the conf file, we need to restart Asterisk by running 'asterisk restart' from the shell and to see that the SIP trunks are operational, we run run 'asterisk -r' to enter the CLI and run 'SIP Show Peers". We should see an "OK" status for all our SIP trunks going to each FE Server as shown below:
Picture
Finally, we define the extensions 3001 and 3002 in the Asterisk and register a soft phone such as X-Lite to these extensions as shown below:
Picture
Picture
Picture
With the above settings the X-Lite client will register to Asterisk and we can start calling to/from Skype for Business clients. In this lab, our Polycom Trio has an extension 8800 and the VVX phone has extension 1135. From the X-Lite client we can call to/from these extensions as shown below:
Picture
This concludes the 1st part of this 2 part series on deploying Polycom phones for Office 365 E5 Cloud PBX with on-premise PSTN connectivity.
3 Comments
Shawn Harry
6/6/2016 04:43:51 am

Nice blog post. Good to see someone else using FreePBX with SfB :-)

Reply
Claudio Santini link
5/7/2017 04:15:59 pm

What configuration do i need to do on Skype Integration using Cloud Connector Edition 1.4.2 as we dont have FrontEnd Server ?
I have CCE installed, Hybrid OK;
Sip Trunk is created on PBX (Asterisk);

Reply
Brennon link
5/31/2017 07:04:46 pm

Hi Claudio

There is no SfB FrontEnd server when deploying CCE. The registrar and core components are in homed in Office365. I assume you mean integration with Skype Consumer? For this check out https://support.office.com/en-us/article/Allow-users-to-contact-external-Skype-for-Business-users-b414873a-0059-4cd5-aea1-e5d0857dbc94?ui=en-US&rs=en-US&ad=US

Hope this helps.

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    UCPrimer

    Picture
    Picture
    Picture
    View my profile on LinkedIn

    Important Links

    Microsoft Teams Docs
    Microsoft Learn

    ​Microsoft MVP Blogs

    Michael Tressler’s Blog
    Michael’s MTR Quick Tip Videos
    Jimmy Vaughan’s Blog
    Jeff Schertz
    Adam Jacobs
    James Cussen
    ​Damien Margaritis

    Archives

    March 2025
    February 2025
    January 2025
    December 2024
    November 2024
    October 2024
    August 2024
    July 2024
    May 2024
    April 2024
    March 2024
    February 2024
    December 2023
    November 2023
    October 2023
    September 2023
    July 2023
    March 2023
    February 2023
    January 2023
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    June 2021
    April 2021
    March 2021
    December 2020
    October 2020
    September 2020
    August 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    March 2019
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    August 2017
    July 2017
    April 2017
    March 2017
    February 2017
    January 2017
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    January 2016
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    September 2012
    August 2012

    Categories

    All
    Edge
    Exchange 2013
    Hybrid
    Lpe
    Lync 2010
    Lync 2013
    Mobility
    Oauth
    Office365
    Polycom
    Ucs

    RSS Feed

    This website uses marketing and tracking technologies. Opting out of this will opt you out of all cookies, except for those needed to run the website. Note that some products may not work as well without tracking cookies.

    Opt Out of Cookies