Connecting Lync Server 2010 to Audiocodes Mediant Gateways
Presuming that you already have Lync Server installed and working internally, This is how you connect your Audiocodes Mediant gateway.
My Scenario:
– Audiocodes Mediant 600 with E1/T1 30 Channel PRI Gateway module
– Lync Server 2010 Standard Edition
– Mediation server on same server as the lync installation
– Need to achieve incoming and outgoing enterprise voice calls through the mediant 600 (No ippbx inbetween)
– This implementation is for South Africa, so some of your normalization rules might have to be different
Success Criteria:
– Need to be able to make an outbound call successfully
– Need to be able to receive an Inbound call successfully
Configurables:
- Lync Server – Configure Mediation server to use the mediant to route to outbound calls
- Mediant 600 – Configure the mediation server as a path, and route incoming calls to the mediation server.
Please note that I did this in parallel with our current production pbx as we only have one mediant 600. I would of course, not recommend that you do this if you do not have the skills to troubleshoot what went wrong if anything breaks. I also don’t take any responsibility for anything you break in your environment by following this post.
Step 1 – Add the mediant as a pstn gateway using the lync server topology builder
Firstly, open the lync server topology builder, and add a new PSTN gateway, if you didn’t do this initially. The mediant 600 by default uses port 5060, and TCP as the transport protocol.
Enable Enterprise voice, by right clicking on Lync Server 2010 / / Standard Edition Front End Servers / and then selecting “Edit Properties”. Scroll down to “Features and Functionality”, then tick “Enterprise Voice”
Publish the topology, and then start up the lync server control panel.
Step 2 – Setup Voice Routing
Ok if you are outside the US, this can become tricky if you don’t know how normalization rules work in lync server. I battled it out for about 3 hours before all my tests completed correctly and showed that outbound calls will be sent to the gateway.
So basically what the normalization rules apply is:
- Any number that starts with a 0, accept
- Any number that starts with +27, accept (because our country code is +27)
I then edited the voice route, and I added two pattern matches, 0 and +. So everything starting with 0 and + will be accepted in the route.
Then I associated the mediant to the route in the “Associated gateways” box.
I then went to “Trunk Configuration”, and added two translation rules. First one with te following properties:
So this looks for numbers starting with “0”, is exactly 10 digits, and then uses it just as is.
so 0211234567 will be translated as 0211234567
This one looks for numbers starting with +27, is exactly 12 digits, and remove the +27, and add a “0”
so +27211234567 will be translated as 0211234567
If all the configurations went ok, then you should be able to do a test, and all the rules should pass.
The last thing you need to do, is let your mediant 600 know that you will be sending calls to it, and it should process it for you through your trunk.
So what you are seeing above, firstly, the mediant is accepting calls from my production pbx (10.1.1.15), and routing it through trunk Group 1. (Trunk Group 1 is the E1/T1 PRI module). I’ve added an entry to route all calls from the mediation server (10.1.1.148) also through Trunk Group 1. It basically takes the phone number just as it is presented to the gateway, and pass it to the service provider through the trunk.
At this point, you should be able to make outbound calls out of lync, provided that the user you are using to make the call is enabled for enterprise voice
Step 3 – Incoming calls. Setup Mediant 600
Now you need to configure your Mediant 600 gateway to receive calls to your lync mediation server. Remember, I have a production pbx in parallel here, so some of the configs you see, shows my production pbx also, but I will differentiate.
For Reference:
10.1.1.15 – Production PBX
10.1.1.148 – Lync Server Mediation Server
Login to your Mediant 600 gateway again, and go to the Proxy Sets Table, under Configuration / Protocol Configuration / Proxies, Registration, IP Groups
Add the IP address of your Lync Server 2010 Mediation Server and submit.
So what you are seeing above, is my configuration. If you are setting up lync and the gateway only, your entry will look something like line number 10 in the screenshot above.
What you are trying to achieve here is to tell the mediant which incoming calls should it send to the mediation server.
If you look at line 10, it should send all calls, to all phone numbers, to 10.1.1.15 (production pbx). This is what you want to do in your scenario. Because I’m testing with only a couple of users in our organization, I added the three numbers at the top of the config.
So what’s happening above, is route ALL CALLS FOR EXTENTIONS 5203, 5213 and 5221 TO 10.1.1.148 (Mediation Server)
otherwise, route to 10.1.1.15 (Production PBX). This separates my test environment from my production environment quite nicely.
That’s it! Now you should receive incoming calls on your Lync Server Implementation.
If I get requests for it. I’ll write a post on how to implement Lync Server 2010 from scratch, and how to connect your mediation server to an ITSP provider.
On Tipp from a Lync Guy. DO NOT Change the normalisation within lync to get the dialable phone number, stay with E164 in in the SIP world. If oyu have to stripp of the “+” or countrycode, you should to that on the gateway level. The gateway is the right location, because this knows where it is and knows how to handle NPI and TON (ISDN Parameters). Also for incoming call: The gateway should normalize Caller and Called Number to E164 and forward that to Lync.
Great post.Can you please post regarding Lync server and Mediant(PSTN Gateway)from scratch.
So your blog was by far the most useful in getting out Lync system up and running but I have an odd scenario. I can receive incoming calls but cannot make outgoing. In watching the data flyby in wireshark I can see that the incoming call has 10 digits just as I asked for from tome Telco and the our bound have 10 as well. I followed your guide here step-by-step and again incoming works great outgoing not so much.
Could be a problem with your dial plan? Is the call leaving your lync server?
Hi,
How do you enable IP2IP on mediant 600? Or do we have to? Can you share more detailed setup if it is possible. We receive the logs below.
CSEQ: 237 ACK
CALL-ID: 649fcfec-8fef-4a94-b989-d450b8322253
MAX-FORWARDS: 70
VIA: SIP/2.0/TCP 192.168.0.40:55159;branch=z9hG4bKd273fb8b
CONTENT-LENGTH: 0
1d:2h:26m:44s ( lgr_flow)(70844 ) | |(SIPTU#40)ACK State:Disconnected(649fcfec-8fef-4a94-b989-d450b8322253)
1d:2h:26m:44s ( lgr_flow)(70845 ) | | TransactionUserMngr::ReturnSIPCall – #40
1d:2h:26m:44s ( sip_stack)(70846 ) SIPCall(#40) changes state from Disconnected to Idle
thanks for your post, it is very usefull.
one thing need your help. how can I set up voice mail for the user? do I need any additional server or lync 2010 have this feature built-in? we are using AudioCode Voice Gateway + Lync2010 + Polycom IP phones. It will be great you can show how to set thie VM up step-by-step as this post, thanks!
Lync uses Exchange 2010 UM to do voicemail, so no, lync doesnt have it’s own voicemail features. It’s pretty easy to setup if you have exchange 2010 in your environment already, but that’s a whole new blog post.
Thanks for the post this is really helpfull.
This is very useful & thanks…
thanks for the post. Not easy to find info on this!
Thanks for the comment, I will post some more when I pay around with it again 🙂