A Technical Integration Guide for

audiocodesskypeintegration audiocodesskypeintegration

13.11.2015 Views

A Technical Integration Guide for: • AudioCodes Mediant 800 / 1000 E-SBC • AudioCodes MediaPack Analog Gateways in Lync/Skype for Business On-Premises Enterprise Voice Architecture © Copyright 2015 by Mirazon / Mirazon.com All rights reserved

A <strong>Technical</strong> <strong>Integration</strong> <strong>Guide</strong> <strong>for</strong>:<br />

• AudioCodes Mediant 800 / 1000 E-SBC<br />

• AudioCodes MediaPack Analog Gateways<br />

in Lync/Skype <strong>for</strong> Business On-Premises<br />

Enterprise Voice Architecture<br />

© Copyright 2015 by Mirazon / Mirazon.com<br />

All rights reserved


Content<br />

Contents......................................................................................................................................................................... 2<br />

Document Purpose...................................................................................................................................................... 3<br />

Tested Architecture...................................................................................................................................................... 3<br />

Initial Setup – The SBC Wizard and “standard options”...................................................................................... 4<br />

FXO Ports – Inbound and Outbound on Mediant E-SBC..................................................................................21<br />

FXS Ports – Integrating with Lync/Skype and ITSP and E-SBC.........................................................................31<br />

MediaPack – Integrating with Lync/Skype and ITSP and E-SBC......................................................................38<br />

Intra-E-SBC Routing – FXS FXO & FXO FXS.............................................................................................63<br />

Failover (Alternate) Routing on E-SBC with Manipulation.................................................................................76<br />

<strong>Technical</strong> <strong>Guide</strong> – Usage and Licensing Terms...................................................................................................86<br />

“Mirazon has improved our IT by not only being a fresh set of eyes to look at a<br />

problem but also the engineeers that work there are just a knowledge vault and they<br />

know their stuff. Every single guy at Mirazon that I’ve talked to is an A-team player and<br />

because of that, they can solve issues quickly and completely in a manner<br />

that those issues don’t have to get revisited.”<br />

– Dave Mast, NewPointe Community Church<br />

www.mirazon.com


Document Purpose<br />

The following document provides technical guidance to properly configure an existing on-premises<br />

Lync or Skype <strong>for</strong> Business environment with on-premises AudioCodes gear. This document was<br />

born out of an internal project to document our own “best practices” around enterprise voice<br />

integration in a Microsoft Unified Communications (UC) practice.<br />

For the purposes of this document – the basic architecture looks like this simple diagram:<br />

In this guide, we are going to start with a simplified SIP-only configuration and add more and more<br />

features. Over the course of this document, we’ll build upon earlier sections until we have a fully<br />

integrated environment using all of the features discussed.<br />

As with previously published technical guides, the ‘meat’ is the more important part of this guide.<br />

Some screenshots are well annotated. Some are just images without any notes above or below.<br />

Tested Architecture<br />

The following products have been tested using the instructions in this document:<br />

• AudioCodes Mediant 800 & 1000 E-SBC – Firmware version 6.8 with SBC Application enabled<br />

• SIP/TLS with Microsoft UC – Lync 2013 or Skype <strong>for</strong> Business 2015<br />

3<br />

www.mirazon.com


• SIP/TLS with Microsoft UC – Lync 2013 or Skype <strong>for</strong> Business 2015<br />

• SIP/TCP with Intelepeer.com – Microsoft qualified ITSP<br />

• FXS ports inbound and outbound<br />

• FXO ports inbound and outbound<br />

• AudioCodes Mediapack MP112, 114, 118, 124D – Firmware version 6.6 / MP112 examples<br />

• Lync Server 2013 – On-Premises Enterprise Voice Architecture<br />

• Skype <strong>for</strong> Business Server 2015 – On-Premises Enterprise Voice Architecture<br />

• Other versions (hardware and firmware) of the above may work, but, have not been tested with<br />

these procedures.<br />

Initial Setup – The SBC Wizard and “standard options”<br />

When you first provision an AudioCodes SBC you will most likely utilize TLS and certificates between<br />

the SBC and Lync/Skype. That’s not a requirement, but it’s common.<br />

So at setup, you’ll set the IP address info and then get SSL certs (and intermediates) imported.<br />

That’s an important first step. That is outside the scope of this guide. Follow the AudioCodes<br />

documentation and come back. For us, we start with a simple LAN interface with IP 10.0.99.240<br />

as below.<br />

Now, use the SBC Wizard to set up Lync/Skype with Intelepeer. This is our baseline here. Did you<br />

know there was an SBC Wizard? It’s available to AudioCodes Partners.<br />

4<br />

www.mirazon.com


www.mirazon.com<br />

5


www.mirazon.com<br />

6


www.mirazon.com<br />

7


Two things of note above: VLAN 255 and no default Gateway.<br />

You have to tag VLANs. You need to be nice to your network admins. The default admin IP (in our<br />

case, 10.0.9.240) can be untagged. If you do 2x network interfaces (or more) you have to tag VLANs<br />

on all subsequent networks. For this guide, I have this second interface plugged into a device that<br />

has an interface tagged with VLAN 255. If you don’t properly tag VLANs, then you won’t get proper IP<br />

connectivity, and things won’t work.<br />

I also only set a default gateway on our LAN (internal) network. That means we’ll need static routes<br />

pointing to the ITSP Intelepeer (68.68.112.0 / 20 in our case) out the WAN interface.<br />

8<br />

www.mirazon.com


TLS with SRTP – that’s correct <strong>for</strong> us. That’s what MOST people will do -- secure between SBC and<br />

Lync/Skype. Sometimes you won’t have that, so you’ll have to set this as TCP / RTP and then there are<br />

subsequent changes related to Media Security (which will be discussed below).<br />

9<br />

www.mirazon.com


This is Intelepeer: TCP SIP with RTP. Yes, we COULD do SRTP and that’s something we would negotiate<br />

with Intelepeer. We typically do not though.<br />

If we used a SIP vendor that requires UA (user authentication) – the bottom part is where you’d<br />

set that.<br />

10<br />

www.mirazon.com


Just set some standard/default manipulation rules.<br />

At Mirazon, we only send 10 (or 11) digits to the SBC. We don’t send E.164 (including the +). Some<br />

customers will. It depends on if we use a tool like Lync Optimizer, or come in to an already existing<br />

setup. Be mindful using Lync/Skype logging and Syslogging tools with your SBC to see what digits are<br />

in the INVITE so you know what you need to potentially strip or add.<br />

11<br />

www.mirazon.com


www.mirazon.com<br />

12


You can save this file now if you’d like, or you can download it from the Device after it reloads.<br />

Your choice. Clicking Load to Device will upload this, and reset/reboot the device using this new<br />

configuration.<br />

13<br />

www.mirazon.com


Here are a few things that we typically do next as relatively standard options.<br />

First, let’s look at Media Security and then verify that <strong>for</strong> both Lync/Skype it’s enabled and <strong>for</strong><br />

Intelepeer aaand… it’s disabled. Again, as briefly discussed above, if we negotiated SRTP with<br />

Intelepeer then we would want this enabled.<br />

14<br />

www.mirazon.com


If you set this to globally disabled, it requires a reboot. Don’t do this if you do TLS/SRTP <strong>for</strong> Lync.<br />

Anything with that little yellow/lightning bolt: if you change that setting, you must reboot.<br />

Just <strong>for</strong> completeness, here’s what this looks like <strong>for</strong> our Lync/Skype and Intelepeer IP Profiles.<br />

Lync/Skype – Media Security – Preferable<br />

15<br />

www.mirazon.com


Intelepeer – set Media Security to Disable.<br />

Make sure you have both U-law and A-law selected in the default table.<br />

16<br />

www.mirazon.com


Change both RFC 2833 TX and RX Payload type to 101 – default is 96.<br />

Change default SIP General Parameter transport type to TCP. This would also be a good time to verify<br />

your ports – maybe tcp/5060 or tcp/5068 or tls/5067 etc.<br />

17<br />

www.mirazon.com


Don’t <strong>for</strong>get the Static Route pointing to Intelepeer – 68.68.112.0 / 20 out our WAN interface.<br />

Now, burn to take all of that in effect. For good measure, reboot. Wait. Log back in.<br />

Our new architecture has more detail now.<br />

Enable Syslog<br />

18<br />

www.mirazon.com


Now bring up Audiocodes Syslog and watch…<br />

Looks good <strong>for</strong> an outbound call!<br />

We called from my phone, 502-400-1975, to a remote phone, 502-751-2108, and the call was<br />

successful. We can see Lync/Skype sent this to the device as TLS as expected as well.<br />

Now, let’s test inbound.<br />

19<br />

www.mirazon.com


Yup, that looks good too!<br />

We called from a remote phone, 502-751-2108, to a local phone, 502-400-1975, and the call was<br />

successful. We can see Intelepeer connects to this device as TCP as expected as well.<br />

When you get to a good steady state, save the .INI file.<br />

20<br />

www.mirazon.com


FXO Ports – Inbound and Outbound on Mediant E-SBC<br />

Okay, so, we’ve made a good start. We have known-good working config with Lync/Skype and a<br />

public ITSP. Let’s add some FXO Ports to the mix. What if we wanted to do an outbound 911 call and<br />

have that use FXO by default or a backup route?<br />

First of all, we need an FXO port. In our case, I unplugged a standard analog POTS line from an office<br />

fax machine and plugged that cable directly into our AudioCodes FXO port 1.<br />

See how port 1 is gray now instead of red? That means the Mediant SBC knows there’s a line there.<br />

Now, let’s start making some changes to use this. Set FXO as One Stage and also enable Disconnect<br />

on Dial Tone as an option.<br />

Also, set the Current Disconnect option to Enable.<br />

21<br />

www.mirazon.com


Now we want to make a Hunt Group – FXO 1 – Channel 1 – Trunk Group 1<br />

Make sure the Hunt Group Settings look right <strong>for</strong> our use-case, Cyclic Ascending. It’s only a single<br />

port, but this allows us to increase the # of FXO ports in the previous area and things work as<br />

expected.<br />

Now, want to make sure Lync/Skype can actually 911 and it go out the FXO port and not the SIP Trunk.<br />

22<br />

www.mirazon.com


By default in our SBC Application, we have just a single outbound route… from 1 to 2 (Lync/Skype to<br />

Intelepeer) and then vice versa. Route entry 0 is only <strong>for</strong> SIP OPTIONS (keep alive).<br />

So, let’s make this look the way we want. We want to insert a rule ahead of Route Index 1.<br />

23<br />

www.mirazon.com


We are routing here from SBC IP Group 1 – Lync/Skype – and the destination is the Gateway itself.<br />

Make sense? The FXO Port is on the “Gateway”; the SBC Application is what does routing when the<br />

source is an IP. It will all come together soon.<br />

Since we’re routing this to the Gateway itself on TCP / 5060, we need to make sure the SIP Interface <strong>for</strong><br />

the Gateway is listening on TCP, which it isn’t by default. We only enabled TLS through the SBC Wizard,<br />

remember?<br />

This of course precludes that we’re listening now on TCP, which we weren’t based on our initial setup.<br />

24<br />

www.mirazon.com


Create SIP Server Tables – the “host” matches the Office 365 IP Gateway Forwarding Address<br />

Making more sense? We are doing SBC Routing, from Lync/Skype to the Gateway.<br />

Now, we’re doing Gateway Routing, from IP to Hunt Group (which we created above).<br />

And now a single IP to Hunt Group Routing rule: anything going to 911 go out FXO Hunt Group 1.<br />

Now, let’s syslog and test this. This is a 911 call, so, have your, “This is not an emergency, I’m testing<br />

911” script ready. This is a live 911 call. Be ready. Be careful. If you haven’t fully tested two-way audio<br />

and they cannot hear you, they will roll emergency vehicles to your location!<br />

25<br />

www.mirazon.com


Notice that the call “seized” the FXO Port – it’s now Green.<br />

And notice, that Syslog looks good. Since this went out FXO, the caller ID reflected the FXO line (the actual<br />

phone company POTS line) not what the “from” was in the INVITE above (502-400-1975).<br />

To clean this up, and make this a backup “outbound 911” config – I’m going to adjust the SBC route and<br />

make 911 route “underneath” the default route.<br />

26<br />

www.mirazon.com


Finally with FXO, let’s play with Inbound. What if you wanted Incoming calls to an FXO port actually a<br />

specific Lync/Skype number, like maybe a primary Auto Attendant or Response Group?<br />

For our example, let’s say that if someone calls into our FXO (502-240-0409), we want that to ring<br />

outbound to Lync/Skype and our Main auto-attendant (AA) (502-240-0404). It would build upon what<br />

we’ve already done.<br />

First of all, we build a Tel to IP Routing Rule – anything in from FXO 1 (Hunt Group 1) – and send that to<br />

Destination IP Group 1 (Lync/Skype).<br />

Then we have to build the “answer” rule.<br />

27<br />

www.mirazon.com


Now, any call into FXO 1 – 502-240-0409 – should automatically dial 502-240-0404 toward IP Group 1<br />

(Lync/Skype).<br />

Let’s syslog and test it.<br />

It rings, then the AA picks up – and you can see FXO #1 seize as green.<br />

28<br />

www.mirazon.com


The Syslog looks good. But, oddly, the Caller ID doesn’t look right. Let’s see if we can correct that.<br />

29<br />

www.mirazon.com


There it is. Let’s Enable that and try again.<br />

Much better!<br />

We’ve added more detail to our architecture. Now it looks like this:<br />

30<br />

www.mirazon.com


To review what we have so far, we have active/working:<br />

1) SIP Inbound from Intelepeer – default routing to Lync/Skype<br />

2) SIP Outbound from Lync/Skype – default routing to Intelepeer<br />

3) A route we can change order on to make 911 go out FXO if <strong>for</strong> some reason we need that and ...........<br />

Intelepeer is down<br />

4) FXO Inbound that is properly routing to Lync/Skype and our Main AA number – 502-240-0404<br />

FXS Ports – Integrating with Lync/Skype and ITSP and E-SBC<br />

We’re making great progress! We have fully working SIP and FXO. Time to add FXS to the mix.<br />

Remember, in this <strong>Technical</strong> <strong>Guide</strong>, we’re adding features and building upon past successes.<br />

I setup FXS Port #1 <strong>for</strong> 502-400-2349. This is a dumb little white Walmart phone.<br />

31<br />

www.mirazon.com


Make sure you set the Hunt Group Settings to “By Destination Phone Number” here.<br />

Set a route entry. Anything from Hunt Group 2 (our FXS Port) – Route that out Destination IP Group 2<br />

(Intelepeer). Notice that I left a lot of “empty rows” here. That’s on purpose. There is not an easy way to<br />

reorder/renumber routing rules. I like to leave empty space <strong>for</strong> future additions/changes.<br />

Let’s syslog and test.<br />

32<br />

www.mirazon.com


Looks good! You can see the “digits” of 502-751-2108 and the Invite going out to Intelepeer.<br />

Note: I honestly don’t know why this shows up as X-Siemens-Call-Type: collect-call. If you know, please<br />

let me know. I’ve seen that on an ISDN/PRI configuration, but not on an analog setup. As my friend<br />

Yoav pointed out, this is typically something seen related to “facility” IE. Is this a “glitch” in this firmware<br />

as related to analog deivces? Or is this something missed in configuration? Please dive in and point out<br />

mistakes. We all like to learn!<br />

Now, let’s expand this a bit. Now we want FXS to call certain numbers inbound (to Lync/Skype) and<br />

other numbers outbound to Intelepeer.<br />

33<br />

www.mirazon.com


See that new Route #3? It’s above the FXS Call Out to PSTN. So, if you call 502-400-1965 (our dial-in<br />

conferencing number) from the FXS Port, you go to Lync/Skype. Other numbers go out Intelepeer<br />

(Route #5).<br />

Let’s syslog and test.<br />

34<br />

www.mirazon.com


Looks good! You’re really putting it all together now.<br />

Next up is inbound FXS – we want the Walmart phone to ring.<br />

Let’s start by building the IP to Hunt Group Routing:<br />

35<br />

www.mirazon.com


Above you see the entry <strong>for</strong> 502-400-2349. No matter which IP Group (1 <strong>for</strong> Lync/Skype – 2 <strong>for</strong><br />

Intelepeer) – we go to Hunt Group 2. That’s what “-1” means on the far right.<br />

Now, we need SBC routing so we can actually get this call to the Gateway side of the AudioCodes device.<br />

This is the SBC Routing from 1 (Lync/Skype) to 502-400-2349 and it is “Above” the default route out to<br />

Intelepeer.<br />

And we need to address incoming calls from the ITSP as well.<br />

This is the same as above except from 2 (Intelepeer) to 502-400-2349. Notice it also is above the<br />

default route in to Lync/Skype.<br />

Now, let’s syslog and test. We should now get the plastic Walmart phone to ring from both Lync/Skype<br />

and also from the ISTP.<br />

36<br />

www.mirazon.com


Excellent – notice this is an inbound call from Intelepeer (502-751-2108) to 502-400-2349.<br />

And now from Lync/Skype. Notice this is from the inside (502-400-1975) to 502-400-2349.<br />

Once again, we’ve added more detail to our architecture. Now it looks like this:<br />

37<br />

www.mirazon.com


To review what we have so far, we have active/working:<br />

1) SIP Inbound from Intelepeer – default routing to Lync/Skype<br />

2) SIP Outbound from Lync/Skype – default routing to Intelepeer<br />

3) A route we can change order on to make 911 go out FXO if <strong>for</strong> some reason we need that and<br />

Intelepeer is down<br />

4) FXO Inbound that is properly routing to Lync/Skype and our Main AA number – 502-240-0404<br />

5) FXS Outbound that can properly route to Lync/Skype and our Public ITSP<br />

6) FXS Inbound that can properly ring a device whether the call is originated internal (Lync/Skype) or<br />

external (our Public ITSP)<br />

MediaPack – Integrating with Lync/Skype and ITSP and E-SBC<br />

Time to add an Analog Gateway into the mix. We want to be able to have a remote device – an<br />

AudioCodes MediaPack 112 in our case – able to make and receive calls on Analog devices. Those<br />

calls need to be both received from and destined <strong>for</strong> both Lync/Skype and the ITSP (via the E-SBC).<br />

This is a slightly more complex discussion than we’ve had so far. The MP112 is IP 10.0.150.64.<br />

38<br />

www.mirazon.com


Let’s start with some of the choices we made on the E-SBC. Set the RFC 2833 (DTMF) TX and RX to 101<br />

(default is 96):<br />

Create Proxy Set 1 – pointing to Lync/Skype – srv-rtc04 in our case.<br />

Create Proxy Set 2 – pointing directly to the Mediant E-SBC – srv-sbc02 in our case.<br />

Create IP Group #1 <strong>for</strong> Lync/Skype.<br />

39<br />

www.mirazon.com


And Create IP Group #2 <strong>for</strong> the Mediant E-SBC.<br />

40<br />

www.mirazon.com


Like with the E-SBC, we have a few “general settings” we want to standardize on. Set default SIP<br />

Transport Type to TCP.<br />

Set Current Disconnect to ‘Enable’.<br />

41<br />

www.mirazon.com


Set Use Default Proxy – No. We’re going to set rules to route accordingly.<br />

Choose both A-Law and U-law as coders. We typically will only be using G.711ulaw of course.<br />

Let set FXS Port #1 <strong>for</strong> 502-400-2353<br />

42<br />

www.mirazon.com


And like we did on the E-SBC, set the Hunt Group Settings <strong>for</strong> FXS to be By Destination Number<br />

For this example, I just created generic/default manipulation rules <strong>for</strong> both IP -> Tel and Tel -> IP – just<br />

passing through digits.<br />

I created four generic “from analog to IP” routing rules.<br />

If you call 502-400-1965 or 502-400-1975 or 502-240-0404 – call Lync/Skype.<br />

If you call anything else, it will call srv-sbc02 (so it will route out to Intelepeer ITSP from there).<br />

Then, <strong>for</strong> IP -> Hunt Group routing there is just a single rule here: if you call 502-400-2353 and the call<br />

makes it to the MP112 from anywhere (Source IP Group of -1), route that call to Hunt Group 1 (FXS #1).<br />

To make sure nothing weird happens based on the number of digits dialed, let’s make the maximum<br />

number of digits something large – larger than you would normally dial.<br />

43<br />

www.mirazon.com


Great. The MP112 looks reasonably complete. Let’s briefly discuss Lync/Skype.<br />

Previously, we’ve already added the MP112 as a TCP/5060 gateway via the topology and properly set<br />

up Gateway, Policy, PSTN Usages, Routes, etc. This guide is focused on AudioCodes. Use your existing<br />

Lync/Skype knowledge accordingly.<br />

Short version: we have a “csanalogdevice” with LineURI of +15024002353. We have routing rules setup<br />

pointing anything that resolves to +15024002353 to the MP112. Then, at the Trunk Level – based on<br />

the above config (expecting 10 digits) – I have a rule that strips off the +1.<br />

At the incoming level, there is no “Pool Dial Plan” <strong>for</strong> the MP112, so, all number normalization rules<br />

happen at the next level, the SITE in our case.<br />

Let’s test by turning on syslog on the MP112 and capturing info.<br />

44<br />

www.mirazon.com


That looks good! Looks like a good call from the FXS MP112 to 502-400-1975 – my Lync/Skype<br />

endpoint.<br />

And the other way?<br />

45<br />

www.mirazon.com


This is Lync/Skype to MP112 FXS call… yay! Works great!<br />

Notice the CallerID shows +15022400404 because, in the Lync/Skype Route, I’m not suppressing Caller<br />

ID from me. It’s coming from my full LineURI +15022400404;ext=566<br />

What’s left? Oh yeah – let’s get the Mediant E-SBC set up properly and test public calls too.<br />

Head to the E-SBC and start by creating a new Proxy Set <strong>for</strong> the MP112 @ 10.0.150.64 with TCP/5060<br />

And then we’ll need a new IP Group <strong>for</strong> proper routing of the call at the E-SBC level.<br />

46<br />

www.mirazon.com


www.mirazon.com<br />

47


Okay, I set up the IP Group <strong>for</strong> the MP112. I’m using SRD 1 and Realm1 – this is all “inbound / LAN” to<br />

the SBC.<br />

Notice that I set IP Profile 3 though, so we have to configure that.<br />

48<br />

www.mirazon.com


Note: Media Security Disable<br />

49<br />

www.mirazon.com


Okay. That’s the IP Profile 3, so that should be good to go.<br />

Time to do routing.<br />

50<br />

www.mirazon.com


Okay, Route 4 – this is “above” the default route of 2-1 (Intelepeer/ITSP to Lync/Skype) – so – anything<br />

from 2 (Intelepeer) that’s destined <strong>for</strong> 502-400-2353 – route that to IP Group 3 – MP112.<br />

That’s good. Now the other way.<br />

51<br />

www.mirazon.com


Okay, Route #7: Anything from MP112 (IP Group 3), send that to IP Group 2 (Intelepeer).<br />

Now, let’s test.<br />

52<br />

www.mirazon.com


Okay, here’s the trace from the Analog FXS port to the MP112 that then sends it to the Mediant SBC<br />

(10.0.99.240). So far so good.<br />

53<br />

www.mirazon.com


And there is the full call from the SBC perspective. The call comes from MP112 (10.0.150.64) and then<br />

routes and works appropriately via Intelepeer. This is a very good test. Yay! Now inbound.<br />

54<br />

www.mirazon.com


Okay, that’s nice. Inbound to 502-400-2353 gets to the E-SBC then routes properly to the MP112.<br />

55<br />

www.mirazon.com


Great! And the call continues to the MP112 and rings properly.<br />

Also… what about a full “triangle” of calls? That is… what if I want to call from the MP112 to the SBC and<br />

then back to Lync? And vice versa?<br />

That’s easy. It’s all about how you setup your routing tables in each device. Let’s modify our MP112<br />

routing table and remove the route <strong>for</strong> 502-400-1975. If you recall, we had that route set to go to Lync<br />

directly. By removing that specific route (red highlight below), the call will be <strong>for</strong>ced to head to the<br />

E-SBC instead (IP Group 2).<br />

56<br />

www.mirazon.com


Then on the SBC – notice that I have Route 7 (a new Route 7) above Route 8. This means if anything<br />

comes from IP Group 3 (MP112) destined <strong>for</strong> 502-400-1975 – send it out IP Group 1 (Lync).<br />

Let’s test that again with syslog.<br />

57<br />

www.mirazon.com


MP112 to SBC at 10.0.99.240 looks good. Let’s keep going.<br />

58<br />

www.mirazon.com


And the whole route from MP112 (10.0.150.64) to the E-SBC (Device) to Lync/Skype (10.0.99.178) looks<br />

good. That’s great.<br />

One more test case to complete our triangle. We should test an inbound call from the ITSP to the<br />

E-SBC to Lync/Skype to the MP112.<br />

We’ll start by creating another FXS port on the MP112 <strong>for</strong> 502-400-2355.<br />

59<br />

www.mirazon.com


Next we’ll create an analog device on Lync/Skype – something that will be available via Reverse<br />

Number Lookup (RNL) and properly route to the MP112.<br />

And we’ll assume that Lync/Skype is set up properly to handle the E.164 <strong>for</strong>m of that number and<br />

manipulate it be<strong>for</strong>e it heads off the MP112, which it does J<br />

So, putting that together… if we make an inbound call to 502-400-2355, the route should be ITSP -><br />

SBC -> Lync/Skype (RNL) -> MP112 -> Phone 2355 (FXS Port #2).<br />

Let’s syslog and test that.<br />

60<br />

www.mirazon.com


So far so good. The call from 502-751-2108 to 502-400-2355 comes from the ITSP to the E-SBC<br />

(device) and ships off to Lync/Skype (10.0.99.178) just fine.<br />

61<br />

www.mirazon.com


And, from Lync/Skype (10.0.99.178) to the MP112 (Device) to FXS Port #2 (Ch:1). This call is complete.<br />

Once again, we’ve added more detail to our architecture. Now it looks like this:<br />

62<br />

www.mirazon.com


To review what we have so far, we have active/working:<br />

1) SIP Inbound from Intelepeer – default routing to Lync/Skype<br />

2) SIP Outbound from Lync/Skype – default routing to Intelepeer<br />

3) A route we can change order on to make 911 go out FXO if <strong>for</strong> some reason we need that and<br />

Intelepeer is down<br />

4) FXO Inbound that is properly routing to Lync/Skype and our Main AA number – 502-240-0404<br />

5) FXS Outbound that can properly route to Lync/Skype and our Public ITSP<br />

6) FXS Inbound that can properly ring a device whether the call is originated internal (Lync/Skype) or<br />

external (our Public ITSP)<br />

7) Full MediaPack MP112 <strong>Integration</strong> with both Lync/Skype and E-SBC and ITSP<br />

a. SIP inbound to E-SBC to MP112<br />

b. SIP inbound to E-SBC to Lync/Skype to MP112<br />

c. MP112 to Lync/Skype<br />

d. MP112 to E-SBC to Lync/Skype<br />

e. MP112 to E-SBC to ITSP<br />

f. Lync/Skype to MP112<br />

g. Lync/Skype to E-SBC to MP112<br />

Intra-E-SBC Routing – FXS FXO & FXO FXS<br />

Let’s add another scenario to the mix. What if we wanted to route internally between FXS and FXO?<br />

There’s no easy way to do this from hunt group to hunt group, so we have to mix both SBC and<br />

Gateway routing methodologies within the E-SBC itself.<br />

63<br />

www.mirazon.com


Let’s discuss the following use cases<br />

1) FXS outbound to FXO – maybe an analog extension like a lobby phone, or maybe an elevator that<br />

wants a failover route to go out FXO if the primary IP / SIP Route is down.<br />

2) FXO inbound to FXS – maybe like a fax machine pass-through<br />

Let’s review our FXS and FXO Port Hunt Group settings.<br />

We have FXO #1 set up and attached to the fax line we got from the telco.<br />

We have FXS #1 set up <strong>for</strong> a Walmart phone: 502-400-2349<br />

We have FXS #4 set up <strong>for</strong> our own fax machine: 502-240-0409<br />

And, our Hunt Group Settings are what they were be<strong>for</strong>e in previous examples: Cyclic Ascending <strong>for</strong><br />

FXO and By Dest Phone Number <strong>for</strong> FXS.<br />

Great. Now what? Well, we want to do some routing. But be<strong>for</strong>e we can route, we have to set up more<br />

in<strong>for</strong>mation, of course. We know that routing has to have a destination. We need to start by creating a<br />

Proxy Set <strong>for</strong> our own “internal” destination.<br />

64<br />

www.mirazon.com


I created Proxy set #10 (because it’s a good round number) – pointing to our internal LAN IP of<br />

10.0.99.240 / TCP / 5060.<br />

Now we need an IP Group <strong>for</strong> routing.<br />

65<br />

www.mirazon.com


www.mirazon.com<br />

66


Notice that I made this reference Proxy Set ID #10 (the one I created above). I also chose SRD 1<br />

and Realm1 – this is an “internal / LAN” thing. This is similar to why I chose those options in previous<br />

documentation related to the MP112. Some people don’t like using terms “SRD” or “Realm” and prefer<br />

more friendly names to explain what they are. At the basic (high level), realms are a collection of ports<br />

<strong>for</strong> your RTP traffic, and SRD is a collection/definition of IP interfaces, and usability stuff from the user<br />

perspective. Yes, that’s vague. Both are important to understand – so – consult your user and admin<br />

manuals here.<br />

Likewise I chose IP Profile ID 3. That’s the IP Profile I chose <strong>for</strong> the MP112. Why? Because I specifically<br />

wanted this profile to NOT use media security. Making another IP Profile isn’t a bad idea, but <strong>for</strong> this<br />

example, I chose to use shared IP Profiles between the MP112 and internal device.<br />

Okay, we have a Proxy Set. We have an IP Group. Now, let’s route.<br />

The route to pay attention to here is #4. From Source Hunt Group 2 (the FXS Ports), if you dial seven<br />

digits 7512108 (local calls are seven digits in our location) – we want this to route to IP Group 10 (the<br />

one we just created <strong>for</strong> “internal routing”). But, remember, we’re an SBC so we need SBC routing too.<br />

67<br />

www.mirazon.com


www.mirazon.com<br />

68


See that route #1? That’s Internal SBC Routing. The Source IP Group is 10. The destination is the<br />

Gateway itself. This should be familiar based on the other testing/documentation we discussed up to<br />

this point.<br />

Okay, so, we routed from Tel to IP using SBC Routing to get to the Gateway and now we need IP to Tel<br />

routing. I know, it’s kind of circular.<br />

Okay, so if anything comes to the Gateway and is destined <strong>for</strong> 7512108, send it out hunt group #1 –<br />

the FXO. This looks complete. Let’s test with syslog.<br />

69<br />

www.mirazon.com


That looks good. The phone went off hook, dialed 7512108, and the route went to itself at 10.0.99.240.<br />

70<br />

www.mirazon.com


Then, the route happened internally, and the route came from itself 10.0.99.240 and out the FXO Port.<br />

Now, what about inbound? What if we wanted to an incoming FXO port to ring an FXS port on the<br />

device itself. This use case may be an analog extension passthrough or fax passthrough.<br />

Consider the configs to be similar: hunt groups, hunt group settings, IP groups, profiles, etc.<br />

The Tel to IP Routing is a good place to start this time.<br />

71<br />

www.mirazon.com


Notice line #1 – I have this set up already <strong>for</strong> FXO/FXS FAX Passthrough. Let’s adjust that because we<br />

want to test this with a white Walmart phone to more easily capture syslog.<br />

Okay, the route now goes to 502-400-2349 like we want, but I need to tell the FXO to dial 502-400-<br />

2349 now instead of the fax number we had.<br />

Now, let’s test with syslog and see what happens. We are going to call 502-240-0409 (the PSTN line<br />

plugged into FXO #1). Notice it turns green when dialed.<br />

72<br />

www.mirazon.com


Also notice that FXS #1 is up (the 502-400-2349 entry we auto-dialed).<br />

73<br />

www.mirazon.com


That’s good. My cell 502-751-2108 called 502-240-0409 (the FXO Port) which immediately was set to<br />

call 502-400-2349 (based on the screen shots above).<br />

This call went straight to 10.0.99.240 (the gateway itself).<br />

74<br />

www.mirazon.com


Then the gateway 10.0.99.240 routed back to the device and out Ch:4 which is FXS Port #1.<br />

We now have FXS to FXO (outbound) and FXO to FXS (inbound) working alongside our other routes<br />

we’ve built on with SIP Trunks and MP112 devices, etc. For completion, in our specific case, we set<br />

things back to inbound calls to FXO going to 502-240-0409 which is FXS #4 – our fax machine.<br />

And again, we’ve added more detail to our architecture. Now it looks like this.<br />

75<br />

www.mirazon.com


To review what we have so far, we have active/working:<br />

1) SIP Inbound from Intelepeer – default routing to Lync/Skype<br />

2) SIP Outbound from Lync/Skype – default routing to Intelepeer<br />

3) A route we can change order on to make 911 go out FXO if <strong>for</strong> some reason we need that and<br />

Intelepeer is down<br />

4) FXO Inbound that is properly routing to Lync/Skype and our Main AA number – 502-240-0404<br />

5) FXS Outbound that can properly route to Lync/Skype and our Public ITSP<br />

6) FXS Inbound that can properly ring a device whether the call is originated internal (Lync/Skype) or<br />

external (our Public ITSP)<br />

7) Full MediaPack MP112 <strong>Integration</strong> with both Lync/Skype and E-SBC and ITSP<br />

a. SIP inbound to E-SBC to MP112<br />

b. SIP inbound to E-SBC to Lync/Skype to MP112<br />

c. MP112 to Lync/Skype<br />

d. MP112 to E-SBC to Lync/Skype<br />

e. MP112 to E-SBC to ITSP<br />

f. Lync/Skype to MP112<br />

g. Lync/Skype to E-SBC to MP112<br />

8) Intra-E-SBC FXS Routing out to FXO<br />

9) Intra-E-SBC FXO Routing in to FXS<br />

Failover (Alternate) Routing on E-SBC with Manipulation<br />

Okay, we’ve made a ton of progress. Here’s one more topic to discuss in the scope of this technical<br />

guide. There are no architecture changes at this time. We need to address failover (or alternate)<br />

routing. Up until this point, I’ve referenced voice routing tables as “routing table order” and that is<br />

mostly true,<br />

76<br />

www.mirazon.com


ut AudioCodes does not do failover routing in the way you’d think. It’s not ONLY “routing table order”<br />

based. I admit, I set you up a little bit here in the examples in the document so far. Sorry, not sorry.<br />

You would think if you have two identical routing table/statements, it would try the first, and if it failed,<br />

it would go down the list to the next. That’s fairly accurate in many E-SBC solutions, but that is not the<br />

case with these specific scenarios with SBC routing in this technical guide.<br />

In general, <strong>for</strong> something to fail and need an alternate route, you probably get one of three SIP<br />

responses back – 500, 503 or 487. There are more options, but, those are typically the ones you get.<br />

Let’s build some rules to capture these reasons.<br />

Okay, if we get a SIP Response as 487, 500, or 503 then that’s a legitimate reason to use Alternative<br />

Routing. Again, your mileage may vary here.<br />

Now, let’s build/adjust the routes we’ve discussed up to this point and actually give them useful names<br />

based on routing scenarios discussed.<br />

Notice Index #2 – that’s Skype to ITSP (Intelepeer) <strong>for</strong> 502-751-2108.<br />

Let’s build an identical route with alternative routing options pointing to the Gateway so it can route<br />

out FXO. We want to make sure the call works if the ITSP goes down.<br />

77<br />

www.mirazon.com


See that? The routing order is correct – ITSP ahead of FXO. So, routing table order matters.<br />

But notice I changed the Alternate Route Options to “Alt Route Consider Inputs”. That means that if the<br />

SIP RESPONSE (input) matches 487, 500, 503 then use this route. Got it?<br />

So, we have a route that should call 502-751-2108 via ITSP, but if ITSP isn’t available, my then 502-751-<br />

2108 should be called out FXO. But in our case, specifically, we can’t dial 10 digits out FXO <strong>for</strong> a local<br />

call. You should remember that from the previous section. So we have to manipulate that <strong>for</strong> an IP -><br />

Tel call.<br />

This rule is so if a call is routed IP -> Tel destined <strong>for</strong> 502-751-2108, strip three digits from left and<br />

make it 751-2108.<br />

And the routing table should then send 751-2108 out Hunt Group 1 – the FXO Port – based on<br />

previous tests.<br />

78<br />

www.mirazon.com


But notice the IP-to-Tel Routing Mode is “Route calls be<strong>for</strong>e manipulation”, so we need to have<br />

a 10 digit route <strong>for</strong> 502-751-2108 so there is a routing destination be<strong>for</strong>e our three-digit strip/<br />

manipulation.<br />

Make sense? We’re adding more and more complexity and options and rules to our architecture to fit<br />

with various use cases.<br />

Let’s test to make sure our ITSP call works properly.<br />

Looks good. Lync/Skype to 502-751-2108 via ITSP (68.68.117.67).<br />

79<br />

www.mirazon.com


Now, let’s make sure the ITSP fails. Unplug the WAN cable. We can see below the be<strong>for</strong>e state – FXO<br />

#1 is connected. And LAN #3 is connected <strong>for</strong> WAN.<br />

After: LAN #3 is dead. Any calls out should now fail; however, any calls to 502-751-2108 should reroute<br />

out FXO after being properly manipulated to 751-2108.<br />

80<br />

www.mirazon.com


Let’s test that…<br />

Well, FXO #1 picks up. That’s good!<br />

81<br />

www.mirazon.com


Weird, why don’t we see the failover happening here? We know the failover happens. We see it visually<br />

because the FXO port goes active. The call happens.<br />

Let’s go back to the syslog/traces in a little more detail.<br />

82<br />

www.mirazon.com


Okay, the call happens (obviously) but when we scroll down a little more in the traces we see more.<br />

Ah, okay. Alternative Routing happens. This is good. And then we see more...<br />

There it is: Routing Rule #3 (the alternative route to the gateway). And the call goes <strong>for</strong>ward.<br />

83<br />

www.mirazon.com


Let’s zoom in to see that in a little more detail<br />

Notice the routing takes place – 502-751-2108 is the destination. Then Manipulation happens<br />

removing three digits from the prefix turning it into 751-2108. This is exactly as we expected. Then<br />

back to normal / typical routing:<br />

So, the Syslog/SIP Traces saw all the logic and what happened, but the SIP Flow Diagram doesn’t,<br />

because the only SIP Flow that actually stood up and tore down was the SIP Flow out FXO. The rest of<br />

all of this was internal E-SBC logic. It’s been pointed out that some SBCs have built-in-logic to do FXO<br />

FXS failover. I did not touch on that in this guide. If you have specific examples of how this may<br />

work, I’d love to know that so I can make this document more accurate.<br />

Even though this example was specific to handling 10 digits 502-751-2108, this would more likely be<br />

used <strong>for</strong> useful things like 911, or whatever else you deem critical.<br />

In this section we specifically called out ITSP failover to FXO; however, that is not the only use case<br />

here. You can extrapolate alternate routing from ITSP to ITSP or inbound calls as well that primarily are<br />

answered by Lync/Skype but failover to an FXS line. Be creative.<br />

To review what we have done in this technical guide, we have active/working:<br />

1) SIP Inbound from Intelepeer – default routing to Lync/Skype<br />

2) SIP Outbound from Lync/Skype – default routing to Intelepeer<br />

3) A route we can change order on to make 911 go out FXO if <strong>for</strong> some reason we need that and<br />

Intelepeer is down<br />

4) FXO Inbound that is properly routing to Lync/Skype and our Main AA number – 502-240-0404<br />

5) FXS Outbound that can properly route to Lync/Skype and our Public ITSP<br />

6) FXS Inbound that can properly ring a device whether the call is originated internal (Lync/Skype) or<br />

external (our Public ITSP)<br />

84<br />

www.mirazon.com


7) Full MediaPack MP112 <strong>Integration</strong> with both Lync/Skype and E-SBC and ITSP<br />

a. SIP inbound to E-SBC to MP112<br />

b. SIP inbound to E-SBC to Lync/Skype to MP112<br />

c. MP112 to Lync/Skype<br />

d. MP112 to E-SBC to Lync/Skype<br />

e. MP112 to E-SBC to ITSP<br />

f. Lync/Skype to MP112<br />

g. Lync/Skype to E-SBC to MP112<br />

8) Intra-E-SBC FXS Routing out to FXO<br />

9) Intra-E-SBC FXO Routing in to FXS<br />

10) Failover / Alternate Routing to ensure critical dialing outbound or inbound is addressed<br />

85<br />

www.mirazon.com


<strong>Technical</strong> <strong>Guide</strong> – Usage and Licensing Terms<br />

The following contains detail the actual licensing / usages of this document.<br />

• This document is a freely licensed technical work. It was written and distributed by Mirazon –<br />

Mirazon.com – Louisville, Kentucky, USA.<br />

• As the licensee of this technical guide, you received this document under a license agreement<br />

which includes both copyright as well as authorized, en<strong>for</strong>ceable usage restrictions.<br />

• If you received this document from any other source than Mirazon.com, please contact us – info@<br />

mirazon.com - to ensure you have received a complete and unedited copy of your own.<br />

• You are permitted to use the document provided exclusively <strong>for</strong> the purpose of per<strong>for</strong>ming work<br />

related to what it describes, or preparing yourself in a matter of training or education on that<br />

purpose.<br />

• We consider it fair that someone you know personally might be given the opportunity to casually<br />

review your materials or tools in the context of deciding if they would value having a copy of this<br />

technical guide of their own. We also consider it fair to present this appropriate portion of your<br />

documentation to a customer or prospect <strong>for</strong> whom related work is involved, where adequate<br />

disclosure of the method involved is requested. However, please treat the shared access to our<br />

documentation and tools as training material <strong>for</strong> which the right to use it in that manner is<br />

yours, and yours alone.<br />

• You may not place any hard copy, or electronic copy, of any portion of this technical<br />

documentation in a location that provides anonymous access.<br />

• You may not store or locate this document in any manner which encourages, or permits violation<br />

of the license agreement or copyright such as with file swapping / sharing technologies.<br />

• Under no circumstances are you allowed to take portions of this document and share them<br />

with anyone else, without obtaining specific and written authorization from Mirazon.com <strong>for</strong> that<br />

purpose. For example, posting sections of this documentation to the Internet or public network,<br />

or private network are all examples in violation of our license and copyrights. As the document is<br />

freely licensed and distributed, kindly direct others to Mirazon.com <strong>for</strong> their own copy.<br />

86<br />

www.mirazon.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!