Welcome!

Blog Feed Post

Series: Exchange 2013 and Lync 2013 Integration with AsteriskNOW PBX Pt. 2

In Part 1 of this series I went through the process of setting up our AsteriskNOW PBX. Now in Part 2 we need to connect the AsteriskNOW PBX to our Lync 2013 environment. We will break this down into 4 primary steps. First step will be to configure AsteriskNOW SIP trunk to route calls to Lync, Secondly we need to configure Lync to Normalize and Route calls to AsteriskNOW, third we need to enable Lync users for EV,  and finally we will test calls in both directions.

Let’s open the FreePBX Admin page (http://asteriskserverip), click FreePBX Administration, and then type admin for both the username and password. Once you have connected click on Connectivity, select Trunks, and then choose “Add SIP Trunk”. Input the details below that pertain to your environment. A lot of the articles that I ran into left out 2 very important settings type=friend and insecure=very which caused my communication to fail. Also be sure to clear out both the USER Context and User Details boxes. After entering this data select Submit Changes at the bottom of screen (scroll all the way down) and then the red Apply Config at the top of the screen.

  • host=<IP address of Lync Server or SE FQDN\EE Pool Name>
  • transport=tcp,udp
  • port=5060
  • insecure=very
  • fromdomain=<IP Address of AsteriskNOW PBX Server>
  • type=friend
  • context=from-internal
  • promiscredir=yes
  • qualify=yes
  • canreinvite=yes

Now we need to configure our Inbound and Outbound routes. First our Inbound Route. Click Connectivity and select Inbound Routes. In the Description give your incoming route a name (FromLync) and under Set Destination select Trunks and select the trunk we created above (Fabrikam Lync Trunk). Click Submit and then Apply Config.

Next is our outbound route going to Lync. Click Connectivity and select Outbound Routes. In the Route Name give the route a name (ToLync) and under Trunk Sequence for Matched Routes select our Trunk (Fabrikam Lync Trunk). Now the most important part which I skipped over is we need to set our Dial Patterns that will use this Route. When we send calls to Lync they will need to be in E.164 format (e.g. +12673645102) so that Lync will recognize them. In the prepend field under dial patterns we need put our Lync TEL URI (including the +) excluding the extension (e.g. +1267364). Now in the match pattern field put the first digit of your extension followed by X’s for the remainder of the digits. Since I will be using 4 digit extensions starting with 5 I will insert 5XXX. See example below. Next select Submit Changes and then Apply Config. This completes our AsteriskNow configuration and we can now move to the Lync 2013 side.

Now that AsteriskNOW can route calls to Lync we need to configure Lync to accept the calls for EV enabled users and route calls back. We are going to start by creating a SIP Trunk to AsteriskNOW so lets open the Lync Topology builder on one of our Lync Servers. Once the topology build is opened choose Download Current Topology and choose a location where to save the file. Once the Topology Builder shows our servers expand Lync Server \ SiteName \ Lync Server 2013 \ Mediation pools. Right click the mediation pool that we will route this trunk through and select edit properties. Under Listening ports we need to set TCP to 5060-5060 (see below) and click OK.

Now under Shared Components right click PSTN gateways and choose New IP/PSTN Gateway. Under FQDN put the IP Address of the AsteriskNOW server and click next, again click next on the Define the IP Address screen, now on the define root change the listening port and mediation ports to 5060 and the SIP transport to TCP, and finally click finish. When clicking finish in addition to creating the IP/PSTN Gateway it will also create a SIP trunk under Trunks. Your settings should look similar to below based on your environment.

After creating these components we need to publish our Topology. To do this select Action \ Topology \ Publish and select Next \Finish to complete the Publish.

To configure the Voice Routing in Lync open the Lync Control panel on a Lync Server and go to the “Voice Routing” tab. Under Dial Plan we either need to create a new dial plan or use an existing one. The key here is to create normalization rules under the dial plan to convert our Lync numbers from AsteriskNOW to E.164 format and the AsteriskNOW numbers to just 4 digit extensions. If you use the global dial pan you won’t need to assign this to users but if you create a new “User” dial plan you will. I decided to create new,  so click New and then User dial plan. Give it a name and then under Associated Normalization Rules click new and create 2 different translation rules similar to the screenshots below. After you create or edit the Dial plan be sure to click Commit \ Commit All.

Now change over to the Voice policy tab and double click the Global Voice Policy. Under Associated PSTN Usages click new. Give the Usage a name (PSTN Usage – AsteriskNOW) and below Associated Routes select New and again give it a Name (Voice Route - AsteriskNOW Router). In Starting digits for numbers that you want to allow type 3 and click Add. Keep clicking OK until you get back to the Voice Policy main screen and Commit \ Commit All.

Finally lets EV enable some Lync users and test a call. In the Lync Control Panel \ Users \ Click Find. Double click a user you want to EV enable. Under the user properties change telephony to Enterprise Voice, give the user a Line URI in the format tel:+12673655102;ext=5102, select the User Dial plan policy you created earlier (if you edited the Global policy you don’t have to change this), and click Commit. Do this for as many users that are required.

Now to test some calls. From the X-Lite Client (AsteriskNOW extension 3002) let’s call one of our Lync EV enabled users (User1 extension 5102). Success. Now let’s call from Lync to the AsteriskNOW extension 3002. Again Success.

We now have full VoIP connectivity from Asterisk to Lync and back. In the next part of this series we will tie Lync 2013 to Exchange 2013 UM.

Read the original blog entry...

More Stories By Richard Schwendiman

My name is Richard Schwendiman and I am currently working for Microsoft as a (PFE) Premier Field Engineer specializing in both Exchange and Lync. I have been working as an IT Consultant for 13+ years focusing on a wide array of Infrastructure technologies. These technologies include Messaging, UC, Networking, Platforms, Active Directory, Virtualization, etc... I am currently certified as an MCSE (Microsoft Certified Systems Engineer), MCSE Messaging 2013, MCSE Communications 2013, MCSA 2012, MCITP Enterprise Messaging, MCTS-Lync, CCNA (Cisco Certified Network Associate), Commvault, CCNP (Cisco Certified Network Professional), and JNCIA-ER (Juniper Enterprise Routing). I am hoping that through this blog I can bring knowledge from the field and keep everyone informed about our ever changing Industry. Please feel free to email me any questions, comments, or concerns pertaining to this blog or any technology related things. Thanks and look forward to providing some good content. http://blogs.technet.com/b/rischwen/

Latest Stories
SYS-CON Events announced today that DXWorldExpo has been named “Global Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.
SYS-CON Events announced today that Datera, that offers a radically new data management architecture, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
SYS-CON Events announced today that Calligo, an innovative cloud service provider offering mid-sized companies the highest levels of data privacy and security, has been named "Bronze Sponsor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Calligo offers unparalleled application performance guarantees, commercial flexibility and a personalised support service from its globally located cloud plat...
"We focus on SAP workloads because they are among the most powerful but somewhat challenging workloads out there to take into public cloud," explained Swen Conrad, CEO of Ocean9, Inc., in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"Outscale was founded in 2010, is based in France, is a strategic partner to Dassault Systémes and has done quite a bit of work with divisions of Dassault," explained Jackie Funk, Digital Marketing exec at Outscale, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I think DevOps is now a rambunctious teenager – it’s starting to get a mind of its own, wanting to get its own things but it still needs some adult supervision," explained Thomas Hooker, VP of marketing at CollabNet, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We are still a relatively small software house and we are focusing on certain industries like FinTech, med tech, energy and utilities. We help our customers with their digital transformation," noted Piotr Stawinski, Founder and CEO of EARP Integration, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We've been engaging with a lot of customers including Panasonic, we've been involved with Cisco and now we're working with the U.S. government - the Department of Homeland Security," explained Peter Jung, Chief Product Officer at Pulzze Systems, in this SYS-CON.tv interview at @ThingsExpo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We're here to tell the world about our cloud-scale infrastructure that we have at Juniper combined with the world-class security that we put into the cloud," explained Lisa Guess, VP of Systems Engineering at Juniper Networks, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability and development velocity challenges. In his session at 21st Cloud Expo, Ryland Degnan, a Senior Software Engineer on the Netflix Edge Platform team, will discuss how by leveraging a reactive stream-based protocol,...
"With Digital Experience Monitoring what used to be a simple visit to a web page has exploded into app on phones, data from social media feeds, competitive benchmarking - these are all components that are only available because of some type of digital asset," explained Leo Vasiliou, Director of Web Performance Engineering at Catchpoint Systems, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, provided a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services with...
"We want to show that our solution is far less expensive with a much better total cost of ownership so we announced several key features. One is called geo-distributed erasure coding, another is support for KVM and we introduced a new capability called Multi-Part," explained Tim Desai, Senior Product Marketing Manager at Hitachi Data Systems, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I'm here to leverage my secret sauce, which is using outsourced development and the company that I utilize is delaPlex Software and they've basically allowed me to win Fortune 500 companies," noted Justin Witz, CTO of FRA and PlanTools, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.