Note that Asterisk is not offically supported by Microsoft as a Direct-SIP PBX and is not listed in their OIP page http://technet.microsoft.com/en-us/lync/gg131938.aspx. Nevertheless, 'not supported' does not always mean 'not working' and some
small-medium business may have done this in their environment using free Asterisk PBX as a gateway to the PSTN. This article serves primarily as a guide to get Lync-Asterisk integration in a lab for testing purposes only and not be used in a real-world deployment.
The high level overview of the steps involved are:
1. Install AsteriskNOW2.0 and create users
2. Install and Configure X-Lite and test call functionality in Asterisk
3. Create the Asterisk SIP Trunk
4. Create the Asterisk Inbound/Outbound Routes
5. Configure Additional Parameters
6. Configure the Dialplan, Voice Route, PSTN Usage and Voice Policy in Lync Server
7. Test calls between Polycom CX600 phone edition Lync and X-Lite client (Asterisk)
This whole process should take 3-4 hours assuming your Lync environment is already up and running. Ready? Lets begin.
Step 1: Install AsteriskNOW2.0 and create users
Step 2: Install and Configure X-Lite and test call functionality
register with domain as shown below:
Step 3: Create the Asterisk SIP Trunk to Lync
host=10.250.27.54 transport=tcp,udp port=5060 insecure=very fromdomain=10.250.27.65 context=from-internal promiscredir=yes qualify=yes canreinvite=yes | Enter the IP address of the Lync Mediation Server Transport can be just tcp or tcp,udp. Lync will use tcp TCP Port number that the Mediation server is listening on. Note that the default port no is 5068 but you can change this to 5060. This port is already open by default in Asterisk. If you decide to stay on 5068 then you need open this port on the Asterisk server. Consult this page on how to do this. Must be set to the IP address of the Asterisk server Must match the context of the users created in Step 1 mentioned earlier |
Step 4: Create the Inbound/Outbound Routes
Step 5: Configure Additional Parameters
Step 6: Configure Dialplan, Voice Route, PSTN Usage and Voice Policy in Lync Server
Step 7: Test calls between Polycom CX600 phone edition Lync and X-Lite client
(Asterisk)
Should things not go as smoothly as above, you may check the status of the SIP Peer in Asterisk. On the Asterisk console, login as root
and on the run the command "asterisk -r". At the Asterisk CLI prompt, run the command "sip show peers". You should see the Lync mediation server listed as a peer listening on port 5060 with an "OK" status.
Asterisk by running the command "service iptables stop".
That's all for this article and I hope it was a worthwhile effort to create it.
References
http://memphistech.net/?p=245
http://savithomas.blogspot.com/2011/07/connecting-lync-server-2010-with.html
http://blog.metasplo.it/2011/11/integrating-lync-2010-and-asterisk.html