Configuring Lync PSTN Calling Thru Avaya IPOffice
Project Scope
Preparing for Deployment – Research and Education and Pricing
Deployment of Standard Server & Director Role
Deployment of Edge and Reverse Proxy
Deployment of Lync Voice Capabilities
Configuring Lync PSTN Calling thru Avaya IPOffice
Configure Lync 4 Digit Extension Dialing without DIDs
Configure Asterisk as a SIP Proxy for Avaya IPO and and Lync
Deployment of Lync Client to users
Testing Configuration of Backup Registrar
Training
This post is a continuation of a series of posts about Lync Deployment. This can be used as a resource to configure an Avaya IPOffice (IPO) 412 (software version 5.0) as a Gateway for a Lync deployment calling the PSTN, but your mileage may vary. Calls are routed over a SIP Trunk (Session Initiation Protocol) configured between the IPO and the Lync Front End server.
An ISDN/PRI trunk provides inbound and outbound voice call access to the PSTN. Avaya IP
Office sends and receives SIP Invites to and from Lync Standard Server, Lync converts call signaling between standard SIP and Microsoft signaling protocol (MTLS).
The flow for an outbound call from an Enterprise Voice Lync User routes as the following: When an user dials a number,Lync normalizes the dialed number. If there is a match,
Lync checks that the number called is assigned to another Lync user. If so, Lync sends the call to the called user’s Lyc client. If not, Lync looks up a call routing table for a match of the
E.164-formatted called number. If there is a match, Lync routes the call to the Gateway for that route, which in this configuration is the IPO and then the IPO routes the call to the PSTN.
For inbound calls from the PSTN, Avaya IP Office receives the incoming call. Based on the
called party number,IPO looks up the corresponding Short Code (if the called number is a Lync Extension) and routes the call to the Lync server via SIP.
For this configuration an inbound call hits an IPO Inbound call route, matches the last 4 digits to a 4 digit short code which routes to an ARS table which matches the short code digits translates to E.164 format and routes the call over a SIP trunk to the Lync frontend server.
Configuration was modified from an OCSR2 & IPO document found here:
https://devconnect.avaya.com/public/download/interop/OCSR2-IPO-PSTN.pdf
Updated 2/5/2012
When configuring Lync and IPO directly as noted in the white paper above, hold may not function and disconnect the call. Additionally calls originating from the the PRI on the IPO or an IPO homed extension when transferred to a lync extension cannot be placed on hold or transferred to any other extension (lync or avaya). The work around used to resolve this issue is SIP proxy as noted here: http://jasonmlee.net/archives/447
Configuring Avaya IPOffice
- Verify Avaya SIP Trunk license. Login to the IPO Manager application. In the tree view navigate to Licensing and confirm that you have an active SIP Trunk Channel License. If a valid license is not configured in the IPO calls will not route over the SIP Trunk. You can purchase IPO 412 license keys from http://dpctelcom.com/
- Create the SIP line for Lync Server. Select Line in the left panel. Right click
and select New SIP Line. Enter the SIP Domain Name of local Domain in the ITSP
Domain Name field. Enter the Lync Server IP Address in the ITSP IP
Address field. Select Remote Party ID in the Send Caller ID field.
Network Configuration is as follows:
Layer 4 Protocol is TCP,
Send Port is the Receive port on your Lync Server in Topology Builder Default is 5060
Listen Port is the Send port in your Lync server Topology Builder Default is 5060
Network Topology Info set to NONE - Configure SIP URI for known caller ID. Go to the URI Tab and and click add. Create a primary SIP URI. Enter a unique number for the Incoming Group (Line Group 100) and Outgoing Group (Line Group 100) fields. Enter * for the Local URI, Contact and Display Name fields. Use defaults for all other field. Press the OK button.
- Configure SIP URI for Unknown Caller ID. The documentation indicates a need for a SIP URI for calls received from the PSTN with withheld caller ID. However this appears not to be 100% necessary nor applicable, but was configured in our installation. Select the SIP URI tab and click on Add again. Enter another a unique number for the Incoming Group (Line Group 101) and Outgoing Group (Line Group 101) fields. Enter 000000000 for the Local URI, Contact and Display Name fields. Calls received with hidden caller ID from the PSTN will be shown as coming from this number on the Lync client. Use defaults for all other field. Press the OK button.
- Create an Incoming call route for outbound calls from Lync incoming to the IPO over the SIP trunk. (This call can be both IPO extensions or out to the PSTN) Select Incoming Call Routes in the Left Tree and right click and choose NEW. Set the Incoming Group ID to the value you set in step 3 as your Incoming Group ID for the SIP URI (Line Group 100).
In the Destinations Tab enter . in the Destination Field and select OK
- Configure a Alternate Route Selection table (ARS) for calls going from PSTN or IPO Extensions to Lync. The ARS is used to route the call to the SIP Trunk formatted in E.164 format for Lync to receive the calls correctly . Select ARS in the left panel. Right-click and select New. Enter a unique identifier for the route in the Route Name field (e.g. SIP-Lync) and use defaults for all other field on the ARS tab.
Click on Add button and add short code. Enter a code matching the 4 digits of the Lync Extension you are wanting to call.
Deployment of Lync Extensions with DIDs: In a deployment with DIDs of (123)555-65xx with 4 digit extensions in the 6500-6599 range and a Lync server ip address of 192.168.1.100 and the unique Line Group ID of the SIP trunk is 100 the following short code could be used. (note use of the xx and N variables to allow for creating just one short code for 100 DIDs or Extensions)
For Deployments without DIDs see step 11 below. - Create a short code to route 4 digit extension calls from IPO to to Lync.
This short code allows for 4 digit dialing from the IPO to Lync extensions as well as will allow for inbound call routes to be configured for DIDs that are homed on Lync.
Select Short Code in the left panel. Right-click and select New. Enter the first 2 digits of the extension range you are wanting to route to Lync followed by xx (example 65xx). Select Dial for the Feature. Select the SIP-Lync ARS created previously from the Line Group Id drop down list. Enter “65N” for the Telephone Number field. Use default values for all other
fields. Press the OK button. - Create a short code to route Lync calls to the PSTN. This short code will be matched for any number if a Lync user calls the PSTN and the IPO has no extension match, the call will be routed to the PSTN, without the rule, the IPO doesn’t know what to do with digits dialed that aren’t extensions on the IPO.
Select Short Code in the left panel. Right-click and select New. Enter “?” in the Code field. Select Dial for the Feature. Select the ISDN/PRI line Outgoing Group Id from the Line Group Id drop down list. Enter “.” for the Telephone Number field. Use default values for all other fields. Press the OK button. - Create a Short Code for each Lync 4 Digit Extension. For the IPO to be able to route calls or allow Avaya Extensions to dial 4 digits to call a Lync user, each Lync Extension needs to have a IPO Short Code. In Hybrid environment, you have to let IPO know that this 4 digit extension is not homed on the IPO but rather on Lync for each user. Variables can’t be used in a hybrid environment because some extensions live on IPO and some on Lync.
This example is for a Lync user extension 6500
Select Short Code in the left panel. Right-click and select New. Enter “6500” in the Code field. Select Dial for the Feature. Enter “6500” for the telephone number and Select the SIP-Lync from the Line Group Id drop down list. Use default values for all other fields. Press the OK button. - Create incoming call route for Lync DIDs
For an example DID (123) 555-6500 extension 6500
Select Incoming Call Route in the left panel. Right-click and select New. Select the PSTN’s incoming Group ID in the Line Group ID drop down box. Enter “6500” in the Incoming Number to match the ICR last for digits.On the Destinations Tab enter “6500” to point to the short code created in step 7 above and the call will route via the ARS table to the SIP trunk to Lync formatted as +11235556500@192.168.1.100
- Configure routing for For Lync Extensions without DIDs (as documented here). An ARS entry will have to be created for each Extension since the IPO cannot use variables in the E.164 formatting of the outbound call and Lync requires the call to come in in the +11235556500;ext=4175 format.
This example extensions 4150-4175 don’t have DIDs but were valid Lync extensions, in order for IPO extensions to call extensions 4150-4175 a short code would be required for 41xx Pointing to the the SIP-Lync ARS Table. (Assuming no other extensions in the 4100 range are homed on the IPO).Then entries for each extension would need to be added to the ARS table.
Code: 4150, Feature: Dial
Telephone Number: +1235556500”ext=4150@192.168.1.100” (the “”s are required to tell IPO that nothing contained in this part of the string is a variable. Each subsequent extension would need a ARS entry. - Configure Lync Call routing to use the IPO as a Gateway. This assumes you have enabled users for enterprise voice which is a fairly well documented process: http://technet.microsoft.com/en-us/library/gg413011.aspx
After users are enabled, go to the Topology builder and browse the Standard Server. Check the box for Enterprise VoiceEdit the properties and go to the Mediation Server. Enable Collocated Mediation Server. Define your Listening Ports and click new gateway enter the IP address of the IPO and the Port that it is listening for SIP traffic on.
Publish the Topology.
- Configure Dial Plan and Trunk. Open Lync Control Panel and go to Voice Routing then Trunk configuration open the newly added Gateway and change the Encryption support level to Optional, Uncheck Media Bypass, Uncheck Centralized Media Processing and Uncheck Enable Refer Support.
- Add a translation rule to call 4 digit extensions on the IPO. This allows a normalized call from the Lync server to pass just 4 digits to the IPO so it correctly routes to the extension on the IPO.
Starting Digits: +12355565
Length: Exactly 12
Digits to remove: 8
This rule tells the Lync server to simply pass 65xx to the IPO. - Create a Call Route. Select New Route and name it and add a description. Leave the Pattern to match the default “*” which matches all calls.
Scrolling down select Add for Associated Gateways and select the PSTN Gateway. Do not yet associate a PSTN Usage. But confirm the Gateway is added.
- Create a Site Voice Policy Choose new and select the site you want to add a voice policy for. Add a Description and enable all appropriate features. Then New.
Associate the route just created in step 15 by hitting select
choose the route.
Go back to Routes and edit the AVAYA PSTN route and scroll to the bottom and Associate the PSTN Usage created.
Commit all Changes.
After these steps you should be able to make calls via the IPO as a Lync Gateway.


























Hello Jason
Thank you for taking the time to prepare such a nice stp by step guide.
I followed your tutorial maybe 10 times already however it is not working for me I cant make calls from lync to ipo extensions vice versa.
When I check the monitor for ipo all the sip uri are showing unknow@domain.com
can you tell me where the mistakes could be .
thank you in advance
okay i figured what the problem was
on the tcp port i had it 5060 from avaya side however on the mediation server it was 5067 so they couldn’t talk
i can make calls from lync to outside and ipo extensions however i cant make calls to lync from ipo extensions in the monitor it is giving this error SIP/2.0 488 Invalid incoming Gateway SDP: Gateway ParseSdpOffer Error: No DTMF support on Gateway side.
Thanks again
Hi,
Great article, only one I have found where I have been able to get inbound and outbound calling working with Avaya IPO and Lync.
I have one issue however and that is that I am unable to dial IPO extensions from Lync. We have 3 digit extensions and no matter how many combinations of normalization I cannot get this working. Any idea?
Many Thanks
Mustafa, i sent you an email lets connect and see how i can help.
I sent you an email reply.. let me know how i can help@David
I followed this article as closely as I could in regards to my installation specifics, but I’m not able to make calls between Lync and IP Office, or to the PSTN. I believe I have everything configured, but when I run the Test-CSPstnOutboundCall cmdlet, I get a “Gateway did not respond in a timely manner”. What are the best troubleshooting steps to take?
I’ve been pounding my head against this for a few days now, and I can’t find any problems with the config.
Laramie,
have you configured the routing table in the IPO? If you haven’t had any VOIP extensions on the IPO before, you may not have the needed routes built.
also, does the IPO system status show any errors for the trunk goint to Lync? If you can’t pass any traffic between the two it sounds more like a SIP configuration issue on the Avaya than Lync… unless you have a port miss-match on your Gateway config in the Topology.
If you could post some additional details of your config i’ll compare it to what we have in production and try to provide you some help.