Using Lync with Multiple Direct SIP Trunks to the Same Cisco UCM Subscriber/Cluster

I have known about this configuration for a while now but not had the chance to sit down and write about it. Its also documented on TechNet but with a more generic take. There are a couple of reasons to have multiple SIP trunks between Lync to the same CUCM subscriber or cluster. These are:

  1. Remote site MTP control. For a remote site that has its own MTP resources keeping traffic local to avoid hair pinning and sending unnecessary traffic over WAN links. By creating a separate SIP trunk for a site you can control the alternate media IP for media bypass. This means that using a remote MTP doesn’t require any local Lync resources at that site. So no Mediation Server or SBA required at a remote site.
  2. Calling Search space control on the CUCM side. Each trunk can have its own CSS so adding the ability of call authorization from the CUCM platform even though calls are coming from Lync.
  3. Redundant SIP trunks with dedicated MTP resources.

The main hurdle with configuring multiple SIP trunks to the same gateway or in this case CUCM cluster is the ability to create multiple gateways with the same IP address in the Topology Builder. The simple work around to this issue is to use DNS  records that resolve to the same IP address.

Pictured below is an example configuration without any local Lync Mediation or SBA resources at the remote site. This is not an uncommon approach to interoperability where survivability isn't a requirement or dual WAN links are used as way to overcome deploying more electronics. In this case we have two SIP trunks with each having their own dedicated MTP’s. With the inclusion of Media Bypass call media will stay local with requiring any equipment at the branch. This will however require some planning on the Lync dial plan side especially if there are a great deal of remote sites.

Remtoe MTP dns issue

This configuration will still allow the use of local DID’s for the Lync site and local termination of PSTN calls at the remote site with no hair pinning over the WAN.

There are a couple of steps to getting this setup. I have outlined below what I did in my home lab:

  1. Created 2 SRV records – cucmsip1.contoso.com and cucmsip2.contoso.com and pointed it to my A record that’s pointed to my CUCM VM server.
  2. Created 2 new PSTN gateways in Lync Topology Builder called cucmsip1.contoso.com and cucmsip2.contoso.com. Also consider using different port numbers for each trunk along with configuring the alternate media IP for the MTP. Completed the route changes in Lync.
  3. Under enterprise parameters in CUCM under cluster wide Domain Configuration-> organization top level domain – contoso.com
  4. Under enterprise parameters in CUCM entered under cluster wide Domain Configuration->cluster Fully qualified domain name - *.contoso.com
  5. Restarted my CUCM VM (this may be more of me being impatient than the update not working without it. You might be able to just restart the Callmanager service rather than a full restart of the machine).
  6. It workedSmile

The FQDN parameter in CUCM has a limitation of 255 characters so if you had a large deployment that wanted to point every branch at the same CUCM cluster you will have to use the wildcard function as it just wont scale for larger deployments without it. Of course you could tighten it up for security reasons and have a separate DNS domain for this function.

clip_image001

clip_image002

If you do not change this parameter in CUCM you will receive a SIP 404 not found message for DNS names in the SIP invite that are not valid CUCM cluster/Subscriber FQDN names.

Configuring CUCM and Lync:

http://blogs.technet.com/b/nexthop/archive/2011/07/17/integrating-lync-server-2010-and-cisco-unified-communications-manager.aspx

http://technet.microsoft.com/en-us/library/ff926525.aspx

Using Multiple Gateways on TechNet:

http://technet.microsoft.com/en-us/library/gg398971.aspx

VoIPNorm

Technet Webcast: Lync Server 2010 Edge Servers (Level 300)

More great content from TechNet.

TechNet Webcast: Deep Dive: Lync Server 2010 Edge Servers (Level 300)

Understanding the details about how to set up and deploy edge servers is a key feature to allow the customer investment to include users--domain members, partners in a federated infrastructure, and customers--outside of the internal network in the Microsoft Lync Server 2010 experience. Edge servers provide external user connections to the Lync Server platform using the Lync 2010 client not leveraging a VPN connection. In this webcast, we discuss edge server deployment topologies, the Lync S...

SMUCUG Meeting Wrap Up

Last night we had a great Seattle Microsoft UC User Group meeting with about 22 people turning out. Jim from Exchange Product Marketing and Steve from Chinook Communications both made great presentations. We ended the meeting with a tour of the Bill and Melinda Gates Foundation. It is truly a cutting edge facility both from a technology and environmental perspective. I am especially grateful to the Gates IT team for hosting and for providing a great tour of the facility after the meeting.

Gate Foundation Green Roof

Above is one of the interesting environmental features of the Foundation. That’s right, the roof in the background isn't a field but the roof of one of the main buildings. The green roof helps capture rain water, assists with building cooling and reduces storm water runoff.

Space Needle Gates Foundation from inside

Above: views of the Seattle Space Needle are available throughout the campus. This photo was taken from within the cafeteria area.

Space Needle Gates Foundation

Above: The campus takes great advantage of natural light with glass walls supported by a interesting cabling system. Pictured above is my attempt at capturing that with the reflection of the Space Needle. Not sure if this was intended or not but it’s a very cool effect to be walking into the building with a giant reflection of the Space Needle to look at. In person it looks like a framed piece of art.

Again thanks to the Gates Foundation team for a great meeting. Hopefully my WP7 snap shots did this great facility justice.

VoIPNorm

Boise Microsoft UC User Group

Mark your calendars, the next Boise Microsoft Unified Communication User group will be taking place on September 14th 2011 at 10:30am.

The current schedule for the event is as follows and is taking place at our normal location, Microsoft 401 W. Front Street, Suite 400, Boise, ID 83702

10:30 – 11am – Kick off, announcements, Introductions – Jeff Wilding

11am – 12pm – Altigen presenting their MaxACD call center product, as well as MaxMobile and iFusion products

12pm – 1pm – Lunch, and Group discussion/forum

1pm – 2pm – Exchange 2010 Client Access Server deployment options, considerations and best practice – Ryan Coates

The Altigen products will interest anyone looking for some more advanced call routing capabilities in Lync 2010 as well as early access to a mobile platform (the MS apps are still months away).

Head on over to the sign up page at eventbrite to let us know you are coming.

http://msuc-ugboise.eventbrite.com/

VoIPNorm

TechNet Virtual Lab: New Enterprise Voice Features of Microsoft Lync Server 2010 (Level 100)

In an effort  to provide more content on VoIPNorm I am constantly searching far and wide to find relevant educational material that makes sense to post. TechNet provides some of the best material in the form of webcasts, virtual labs and videos there is to find on Lync. Over the next few months I will be posting weekly content from TechNet to help get this content more exposure along with my regular posts. I know how hard it can be to find this type of content and also some people just don’t know it exists so don’t know to look. Hopefully someone somewhere finds this useful.

TechNet Virtual Lab: New Enterprise Voice Features of Microsoft Lync Server 2010 (Level 100)

After completing this lab, you will be better able to use the Lync Server 2010 Management Shell scripts to create groups, queues, and workflows, use the Lync Server 2010 Management Shell commands to edit workflows, assign phone numbers, configure agent anonymization, and experience the behavior of various workflows.

VoIPNorm

Portland Microsoft UC User Group

Join us for an engaging conversation with your peers in the UC space to chat about extending Microsoft Lync Server with AltiGen Unified Communications Solutions.

MaxMobile Smartphone Apps
Extends complete Lync Server 2010 Call Control, real-time presence, instant messaging, visual voicemail and up-to-date corporate directories to popular mobile OS platforms.

MaxACD Contact Center for Lync
A full suite of client applications, Productivity Management tools and built-in call recording & reporting, with superior Contact Center control, usability and flexibility.

Date and time:

09/15/2011
11:30 AM - 02:00 PM
Welcome Time: 11:00 A

Location:

Microsoft Corporation

1414 NW Northrup, Suite 900, Portland OR, 97209 

Register here.

VoIPNorm

Updated: Streaming Video and Audio into Lync

Before I begin, a disclaimer:

This is an unsupported configuration using a third party to plug in a video and audio stream into Lync via the use of video and audio drivers. Use at your own risk.

Back in March I wrote a post around streaming video content with ManyCam into Lync. I continue to get positive feedback around this combination of applications but with one question; how do I get audio to work? I did more searching and experimenting in the last few weeks and there is a solution of sorts but unlike ManyCam this one isn't free.

First lets go back over the issue that requires a special solution for audio. When you playback your video that is meant to be feed into Lync the audio is played over an external audio device. Which is how it should work. The problem is that while playing over the external speaker Lync has no way to capture that audio unless you sit the speaker next to the microphone being used by Lync as its audio device. Alternatively you could build or buy a physical loopback cable to feed the output audio to a microphone input. Sounds complicated, right?

Well there is an alternative. Virtual audio cable software. There are a few to choose from but the one I used in my testing was Virtual Audio Streaming. I don’t know if this is the best or worst software for this purpose but it was  the one I tried that seemed to work.

Below are a few screenshots of the setup.

1. Installed ManyCam with the video source selected.

image

2. Ensure the ManyCam video Driver is selected in Lync.

image

3. Install the virtual audio cable software of your choice and ensure that the default drivers for recording input and playback are the virtual audio cable software.

image

4.Check to ensure the Playback default device is the virtual audio cable driver under sounds in the control panel.

image

5. Check to ensure the recording device is the virtual audio cable driver under sounds in the control panel.

image

6. Before starting the video in Lync change the device for the Lync call to the computers default device.

image

7. Because the audio is being streamed directly into the virtual audio driver no sound will be produced on a local external audio device. To overcome this the software I tried had the option to enable external output so the local user could still hear the audio.

image

Lastly, there are a few caveats with using this combination of software. Here they are:

1. I will say it again, this is an unsupported configuration. Use at your own risk.

2. The virtual audio cable software may fall out of sync with the video displayed. My machine struggled a little during playback with all three applications and it took me a few goes to get it all working properly, so using a PC with a bit of horse power is probably advisable.

3.This isn't free software or at least the product I tried wasn’t. The version I was running was in trial mode and would interrupt the audio stream with a announcement that it was a trial version. Kind of annoying but bearable.

Comments welcomed.

VoIPNorm

A Look at Tabbed Conversations in Lync SDK

A Look at Tabbed Conversations in Lync SDK

The Lync 2010 SDK empowers developers to dock Lync conversation windows inside line of business applications. Danilo Perez Solano, an SDET in Lync Client Test, gives us a primer on how to quickly build an application with docking capabilities. Then he goes into some design considerations for a more robust docking application, Lync 2010 Tabbed Conversations, which he built as part of his end to end docking testing. Tabbed Conversations is a freely available application that combines all conversa...

Blocking File Transfers to Federated Users Using Lync MSPL Scripts

Once again my lack of programming skill has bitten me but luckily for me its not what you know but who you know. Keith from Got UC saved me once again with more scripting brilliance. MSPL scripts are probably one of the least talked about but most useful tools an admin has in Lync.

This is third time I have seen MSPL scripts used to extend functionality in Lync which shows just how flexible they are. Their ability to manipulate SIP messages is where their strength lies. From blocking calls to changing parameters within the SIP header they are really versatile and very useful.

Below is the script text along with a downloadable version underneath the text. The script blocks file transfers to any sipuri outside of the sip domain configured in Lync. So obviously there is a catch here in that it is only intended for a single SIP domain environment in its current format. The script is looking at the to and from header values and retrieving information on the domain from the invite. Some companies might be working with multiple SIP domains and this script could affect traffic that it wasn’t intended to, so use with some caution if that is your environment.

<?xml version="1.0"?>
<r:applicationManifest
r:appUri="http://www.gotuc.net/FileTransferBlock"
xmlns:r="http://schemas.microsoft.com/lcs/2006/05">
    <r:requestFilter methodNames="INVITE" strictRoute="true"/>
    <r:responseFilter reasonCodes="NONE"/>
       <r:scriptOnly/>
  <r:splScript><![CDATA[

/*++
Module Name:
       FileTransferBlock.am
--*/
       if (sipRequest)
       {
              //Check the content type. If the content type is QoE content type, process it; otherwise ignore it.          
              foreach(header in GetHeaderValues(StandardHeader.ContentType))
              {
                     if (IndexOfString(header, "multipart/", true) == 0)
                     {
                           Log("Debug", false, "Found multipart body. Content-Type:", header );
                           i = 0;
                           while(i < MultiPartItem.Count && BindMultiPartBodyItem(i))
                           {            
                                  if(ContainsString(MultiPartItem.ContentType, "application/ms-filetransfer+xml", true))
                                  {     
                                         //toHomeServer = QueryHomeServer(sipRequest.To);
                                         //fromHomeServer = QueryHomeServer(sipRequest.From);
                                         Log("Debugr", false, "***** We have a File Transfer request *****");
                                         //Log("Debugr", false, "***** Request.To home server ", toHomeServer);
                                         //Log("Debugr", false, "***** Request.From home server ", fromHomeServer);

                                         hostName = GetHostName(GetUri(sipRequest.To));
                                         local = ContainsString(FQDN, hostName, true);
                                         Log("Debugr", false, "***** Request.To: ", GetUri(sipRequest.To), " *****");
                                         Log("Debugr", false, "***** Request.To host name: ", hostName, " *****");

                                         if(local)
                                         {
                                                Log("Debugr", false, "***** Request.To is local. Transfer ok *****");
                                         }
                                         else
                                         {
                                                Log("Debugr", false, "***** Request.To is federated. Transfer cancelled *****");
                                                Respond(503, "Service Unavailable");
                                         }
                                   break;
                                  }
                                   i=i+1;
                           }               
                     break;
                     }   
              }
       }

       return;
         
]]></r:splScript>
</r:applicationManifest>

You can also download the script from here.

Again, thanks to Keith for putting the script together.

Update: For information on installing this script check here. This is a really good guide on how to do it. Also this script could be potentially installed on the Edge if desired. Check the guide on how to do that and also TechNet here.

Comments welcomed.

VoIPNorm