Author: Gonzalo Escarrá

Network details from Windows 8/8.1 Task Manager

Right-clicking on the Task Manager’s network throughput graph can give you some nice details on your traffic. This will work on Windows 8, 8.1 and the equivalent Server editions 2012 and 2012 R2. Note that the statistics are only gathered while the Task Manager process is running and are not cumulative. For cumulative results, you can use the Get-NetAdapterStatistics | fl cmdlet.

2014-06-10 15_16_12-astaro.escarra.org - Remote Desktop Connection

2014-06-10 15_16_28-astaro.escarra.org - Remote Desktop Connection

Out of date sources for an up-to-date template?

Say you’re trying to speed up your VM deployments and create a template with Windows Server 2012 or 2012 R2, and in the process to clean up some valuable HD space you run something like the following:

Get-WindowsFeature | Where-Object -FilterScript { $_.Installed -Eq $FALSE } | Uninstall-WindowsFeature –Remove

What that’ll do is remove the binaries off any uninstalled feature and save you a few gigs… BUT you will need the media, or the sources in a share, any time you want to install a feature, which is fine… as long as your template does not get updated. The moment you run Windows Update and go through the motions, your media will no longer work if you want to add features, and installations will fail with something like this:

Error: 0x800f081f

The source files could not be found.
Use the “Source” option to specify the location of the files that are required to restore the feature. For more information
on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

To update your sources so that you can use them when installing features, you can use the install.wim file on your media and grab the latest patches using WSUS Offline Updater (http://www.wsusoffline.net/), then merge the updates with the sources. Here’s how:

  • Copy the Sources\install.wim file from your Windows Server 2012 or 2012 R2 DVD media to somewhere in your hard drive.
  • Create a temporary folder, let’s call it C:\Win2012R2
  • Remove the read-only attributes of your local install.wim file because we will be modifying it
  • Run dism.exe /get-wiminfo /wimfile:C:\install.wim and take note of the Index for the edition you’re using
  • Run dism.exe /mount-wim /WimFile:C:\install.wim /index:4 /mountDir:C:\Win2012R2. Note i’m using Index 4, which is for Datacenter (non-core)
  • Run WSUS Offline and download all patches for the edition you’re using, and create an ISO from them
  • Mount the ISO with the updates, then run dism.exe /image:C:\Win2012R2 /Add-Package /PackagePath:F:\w63-x64\glb. In my case, the ISO was mounted on drive F:
  • Run the previous command at least twice. There are times where updates won’t slipstream into the sources unless they are at the right version. This is the case with Update 1 for Server 2012 R2.
  • Once all updates are injected, run dism.exe /Unmount-Wim /MountDir:C:\Win2012R2 /commit which will write the install.wim file back with changes and is ready for use.

When it comes time to install features, just use Add-WindowsFeature with -source:wim:\\server\share\install.wim:4 (note the Index number at the end).

For more detail, you can check out this TechNet article in combination with WSUS Offline to help you with the patch downloads.

Thanks for reading!

Oops! when you forget to update Lync’s Back End DB

After applying Cumulative Update packages to Lync 2010 or 2013 topologies, there is a required step to update the back-end databases and the Central Management Store (CMS). If you forget because you’re either lazy or rushed, you’ll start noticing some things don’t work as expected, like the Call Park Service and the Response Group Service. Here’s an indication that your DB needs to be upgraded:

2014-06-09 13_34_18-MobaXterm Professional

Event ID 31059 by the LS Call Park Service clearly tells us to Upgrade the databse to CU1. See below for the cmdlets to run, but please refer to Microsoft’s official upgrade documentation for some important considerations:

Lync 2013 Standard Edition:

  • Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SE.FQDN -Verbose
  • Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn CMS.FQDN -SqlInstanceName DBInstanceName -Verbose
  • Enable-CsTopology
  • %ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe

Lync 2013 Enterprise Edition:

  • Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn FEBE.FQDN -Verbose
  • Install-CsDatabase -DatabaseType PersistentChat -SqlServerFqdn PChatBE.fqdn -SqlInstanceName DBInstance -Verbose
  • Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SQLServer.FQDN -Verbose
  • Enable-CsTopology
  • %ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe

 

Review: Plantronics Voyager Legend UC

VoyagerLegendUC1In the days of work anywhere, at any time, from any device, having a reliable bluetooth headset that will integrate with Microsoft Lync and pair with a multitude of devices is a must. The Plantronics Voyager Legend UC is now part of my mobile office and is always in my backpack. Here are the things I love about it:

  • It integrates beautifully into Lync. You can pick up and hang up calls with a single press of a button on the headset. Also, if you press the “mute” button on your headset, it mutes your Lync client so people are aware of your status when in conferences. This integration requires the use of the BT dongle (and of course it is included).
  • Voice and build quality is outstanding for a bluetooth headset, and can play A2DP audio so you can listen to podcasts or music while in between calls. The noise cancelling is excellent and removes most background noise.
  • Tested battery life is about 5 hours if you’re constantly talking (or listening over A2DP), and the headset can charge all the way to 100% in about 30 minutes.
  • Zero effort in PC pairing. Plug in the dongle and you’re set. I have never had a problem with pairing to either cell phone or BT dongle.
  • Can pair with a PC (dongle) and two other Bluetooth devices at the same time. You can pair your Lync client on your laptop and have your smartphone and tablet also paired, simultaneously, with the ability to seamlessly pick up and switch calls.
  • Voice commands to “answer”, “ignore” or “call John Doe” built into the headset make it easy to handle calls without touching the headset, and sensors within enable you to automatically answer calls simply by putting the headset on your ear. The sensors are accurate enough to not trigger if you have the headset in your pocket.

The UC edition of the headset comes with a few accessories that the regular non-UC edition lacks, like a nice little docking station for your desk, a portable charge cable which doubles as a micro-USB cable, and probably best of all, a case that holds the BT dongle and the headset with a built-in battery that can give you up to 14 hours of additional talk time!

IMG_0379_resizedAlso, as part of a software value-add, the Plantronics Spokes software can be installed on your computer so the Lync client can change your presence to “In a Call” even if you’re on your cell phone. This unifies your presence between any voice devices using the common headset, and makes Lync aware of your status.

My only complaints about the headset is that there is no way to turn the “Mute On” and “Mute Off” prompts even after making changes through the Spokes software, or through the MyHeadset Updater settings. Also, while it offers excellent noise cancelling, the wind resistance is not that great. If you are using this headset outdoors, the voice quality might disappoint, but I feel it’s more designed for home/office and road warriors anyway, so this is not a big deal at all for me.

As part of my testing I’ve recorded a short clip with audio direct from the headset.

In summary, the Plantronics Voyager Legend UC is probably the best bluetooth headset I have ever used, and is now part of those gadgets that I can’t live without. It retails for about $199 with all the accessories (headset, dongle, charging cable, battery case and desk cradle), or about $119 for the headset, dongle and charging cable. With it’s outstanding build and audio quality, a large number of accessories that can be included, and complete Lync integration, this headset will not disappoint those who are looking to break off the desk phone forever.

Do you use the Legend UC? What do you think?

Non-E.164 voice gateway trunk into Lync 2013

While doing an integration with a Cisco CallManager cluster that was on version 6.1, I realized why Microsoft only supports CUCM 7.0 and above. Earlier versions do not handle E.164 and so calls through the SIP trunk into the Lync mediation pool would not have the nice “+” on the SIP Invites. Fortunately, Lync 2013 lets you do inbound and outbound translations to overcome these situations, although you’d still be running on an unsupported Voice gateway.

To handle Inbound SIP without E.164 prefix, you can create a Pool Dial Plan for the SIP trunks (PstnGateway) you’ll need to handle, and then create normalization rules to prefix a + and remove any other numbers. You can also do it at a Global level, but I like to keep things separate, and in my case CUCM integration is only temporary until all sites are on Lync.

Inbound:

2014-06-05 16_38_49-MobaXterm Professional

To handle Outbound SIP, you can use Calling and Called Number Rules under Trunk Configuration, and add/remove prefixes to be passed over to the voice gateway. In my case, I’m removing the + and prefixing a 7 to test outbound PSTN calling.

Outbound:

2014-06-05 16_39_45-MobaXterm Professional

Lync Comfort Noise with Cisco router or AudioCodes

Lync uses a feature called Comfort Noise that reduces network traffic in moments of silence, but still allows the voice gateways to generate some white noise to avoid the “hello? are you still there?” conversations. If your gateway is not configured to support Comfort Noise, then Lync will throw Event ID 25073 on your calls, saying The Mediation Server service has received a call that does not support comfort noise […] The Trunk does not support comfort noise.

Comfort Noise

If you’re using a Cisco router as your voice gateway, you can enable Comfort Noise support by using the following command under your voip dial-peer connecting into Lync:

rtp payload-type comfort-noise 13

Or if you’re using an AudioCodes gateway, you can find the options under VoIP > Media > RTP/RTCP Settings, but make sure you’re using the Full menu set.

2014-06-11 14_55_36-AudioCodes - Internet Explorer

After enabling Comfort Noise support, you can run a packet capture and notice the RTP packets showing support

Comfort Noise 2

Apache and MySQL on different hosts with SELinux

Recently I upgraded my single “LAMP” setup with two Apache front-ends, and two MySQL mirrored backends. When moving WordPress to the new web servers I came across an issue with MySQL connections. The /var/log/audit/audit.log shows:

type=AVC msg=audit(1401916568.434:533): avc: denied { name_connect } for pid=31254 comm=”httpd” dest=3306 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket
type=SYSCALL msg=audit(1401916568.434:533): arch=c000003e syscall=42 success=no exit=-13 a0=10 a1=7fffdda48c20 a2=10 a3=10 items=0 ppid=1685 pid=31254 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=”httpd” exe=”/usr/sbin/httpd” subj=system_u:system_r:httpd_t:s0 key=(null)

The issue is related to SELinux blocking the MySQL connections from within Apache, and instead of taking the easy way out and disabling SELinux completely, the only command needed to get it to work was:

setsebool -P httpd_can_network_connect_db 1

Missing Disk performance counter from Task Manager 2012 R2

If you’re missing the nice little graph and metrics that show in your Task Manager’s Performance tab on Windows 8 and 8.1, but not on 2012 and 2012 R2, all you have to do is run:

diskperf -Y

Before:

2014-05-19 13_08_21-makara.escarra.org - Remote Desktop Connection (escarra.org)

After:

2014-05-19 13_09_31-makara.escarra.org - Remote Desktop Connection (escarra.org)

Home Server Room finished!

20140303_020545778_iOSFor a while now I’ve had a server rack hosting my lab environment, but it’s always been exposed to bad temperature conditions. Since moving to our own house the rack has been sitting in the attached garage, where it gets up to 90F in the summer and as low as 20F in the winter. So far all equipment in the rack survived the abuse, but it was difficult to work on stuff during extreme weather, it meant either freezing or sweating during seasons. And that’s not all, the only electrical circuit that went to the garage also ran the outside lights, kitchen and living room outlets, and would trip at least once a week.

So a couple of months ago I started a little project to build an insulated server room in the basement, with tempered dual-pane glass sliding doors, separate electrical circuits, and access to a window that could house an A/C unit during the summer, and just be open during the winter. You can see the end result in the picture, but for the whole process in building the room, you can visit THIS PAGE.

Lync 2013 Apache Reverse Proxy issues

If you are using Apache as the reverse proxy for Lync, you may experience some issues when signing in using the mobile app (I only tested iOS). Things to look for are:

  • 50/50 chance in sign-ins (first fails, second works, as shown below)
  • Calls (audio or video) fail to establish
  • Signing out of the application produces an error as shown below

IMG_0877 IMG_0876

To resolve, look for the DefaultType directive in your httpd.conf. If it’s set to text/plain, change it to None and reload Apache config. The line should read:

DefaultType None