Better WebEx / Lync / Skype meeting locations for mobile users

[Edit 2016-12-01 … changed the VBA code to format the phone number with dashes]
[Edit 2016-11-07 … changed the VBA code to handle WebEx invites, too][Edit 2015-10-27 … changed the VBA code to be able to extract the phone number]

By default, the “Location” for a Skype for Business (ne Lync) Meeting in an Outlook calender invite reads as “Skype Meeting”. WebEx is no better. This is not very friendly to mobile users who want to dial in via phone. If the body of the meeting contains a lot of agenda text, the WebEx / Skype dialin information may not display at all on mobile; and without something in the “Location”, a user can’t just tap the invite to dial in directly.

I wanted to have a Macro that lets me set the “Location” to “phone-number,,,conference-id#”. This way, the user can dial, and will be logged in automatically.
An alternative (you’d need to slightly modify the code by replacing “,,,” in the second line with ” ; “) would be “phone-number ; conference-id#” which makes the conference id available in the dial screen to be sent with one touch.

Further, I wanted to be able to control permissions through the Skype Meeting Options, which means I can’t use a “dedicated meeting space”, but have to use the “new meeting space” option, which means the conference ID changes with every meeting.

I want to hear when people enter or leave, I don’t want anyone to have to wait around in a lobby, and I conference with customers, so I don’t want restrictions as to who can join or present. The screenshot below shows the permissions I chose before hitting “Remember Settings”.

Screenshot 2015-06-01 10.33.50

The macro I created can extract US phone numbers. If you have a need for international number detection, you’d need to key on the country code and then have individual patterns from there in a case structure. There’s no good way I know of to handle international number formats in a single regex.

In order to use the macro, you’ll need to:

– Enable access to the coding tools in Outlook, the “Developer” toolbar

– Create the macro

– Sign the macro and save

– Link the macro to the “New Appointment” screen

The macro was created for use with Outlook 2016, 2013 and 2010. The current version has only been tested with Outlook 2016.

Enable access to the coding tools in Outlook

From the Outlook main windows, click on “File” then “Options”

In the “Outlook Options” window, click on “Customize Ribbon” on the left. Check the “Developer” ribbon to show up.

Click OK

Screenshot 2015-06-01 10.41.13

Create the macro

From the Outlook main window, click the “Developer” toolbar, then the “Visual Basic” icon

Right-click the Project name in the left pane, choose “Properties…” and set the “Project Name” to “Conf”, then click OK.

Under “Modules”, you should see a “Module 1” with an empty window to the right. Click it and paste the code below.

<Edit> Now with code formatting that will paste correctly.

Sub AddLocation()
Application.ActiveInspector.CurrentItem.Location = GetConfNumUsingRegEx() & ",,," & GetConfCodeUsingRegEx() & "#"
End Sub

Function GetConfNumUsingRegEx() As String
 ' Set reference to VB Script library
 ' Microsoft VBScript Regular Expressions 5.5
 
 Dim olAppt As Outlook.AppointmentItem
 Dim Reg1 As RegExp
 Dim M1 As MatchCollection
 Dim M As Match
 Dim fNumber As String ' Formatted phone number
 
 Set olAppt = Application.ActiveInspector.CurrentItem
 ' Debug.Print olAppt.Body

 Set Reg1 = New RegExp
 
 For i = 1 To 2 ' Run through twice in case this hasn't been saved and WebEx info isn't there yet
 
 With Reg1 ' look for the bizarre CI number we use, and prefer it if it's there
 .Pattern = "tel:\+1855-SkypeCI"
 .Global = True
 End With
 
 If Reg1.test(olAppt.Body) Then
 GetConfNumUsingRegEx = "+1-855-759-7324"
 Exit Function
 End If
 
 ' You can copy / paste code from "With Reg1" to "End If" any number of times if there are
 ' additional preferred numbers / oddly formatted numbers you want to be on the lookout for
 
 With Reg1 ' look for tel: style links, US numbers being matched
 .Pattern = "tel\s*[:]+\s*((?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *(?:ext\.|ext|x)?\s*(\d+))?)\w*"
 .Global = True
 End With
 
 If Reg1.test(olAppt.Body) Then
 
 Set M1 = Reg1.Execute(olAppt.Body)
 For Each M In M1 ' Find preferred toll-free number
 If (Found = False) And ((M.SubMatches(2) = "800") Or (M.SubMatches(2) = "844") Or (M.SubMatches(2) = "855") Or (M.SubMatches(2) = "866") Or (M.SubMatches(2) = "877") Or (M.SubMatches(2) = "888")) Then
 Found = True
 GetConfNumUsingRegEx = FormatPhoneNumber(M.SubMatches(0))
 Exit Function
 End If
 Next
 ' No preferred number, use the first one
 Set M = M1(0)
 GetConfNumUsingRegEx = FormatPhoneNumber(M.SubMatches(0))
 Exit Function
 End If
 
 With Reg1 ' sometimes tel: is missing, again US numbers being matched
 .Pattern = "((?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *(?:ext\.|ext|x)?\s*(\d+))?)\w*"
 .Global = True
 End With
 
 If Reg1.test(olAppt.Body) Then
 
 Set M1 = Reg1.Execute(olAppt.Body)
 For Each M In M1 ' Find preferred number
 If (Found = False) And ((M.SubMatches(2) = "800") Or (M.SubMatches(2) = "844") Or (M.SubMatches(2) = "855") Or (M.SubMatches(2) = "866") Or (M.SubMatches(2) = "877") Or (M.SubMatches(2) = "888")) Then
 Found = True
 GetConfNumUsingRegEx = FormatPhoneNumber(M.SubMatches(0))
 Exit Function
 End If
 Next
 ' No preferred number, use the first one
 Set M = M1(0)
 GetConfNumUsingRegEx = FormatPhoneNumber(M.SubMatches(0))
 Exit Function
 End If
 olAppt.Save ' This will fill in WebEx info with WebEx Productivity Tools running and try again
 Next i
End Function


Function GetConfCodeUsingRegEx() As String
 ' Set reference to VB Script library
 ' Microsoft VBScript Regular Expressions 5.5
 
 Dim olAppt As Outlook.AppointmentItem
 Dim Reg1 As RegExp
 Dim M1 As MatchCollection
 Dim M As Match
 
 Set olAppt = Application.ActiveInspector.CurrentItem
 ' Debug.Print olAppt.Body
 
 Set Reg1 = New RegExp
 
 With Reg1 ' look for Skype/Lync pattern
 .Pattern = "Conference ID\s*[:]+\s*(\d*)\s*"
 .Global = True
 End With
 If Reg1.test(olAppt.Body) Then
 
 Set M1 = Reg1.Execute(olAppt.Body)
 Set M = M1(0)
 GetConfCodeUsingRegEx = M.SubMatches(0)
 Exit Function
 End If
 
 With Reg1 ' look for WebEx public or private room pattern
 .Pattern = "[Aa]ccess code\)?\s*[:]+\s*(\d*\s?\d*\s?\d*)"
 .Global = True
 End With
 
 If Reg1.test(olAppt.Body) Then
 
 Set M1 = Reg1.Execute(olAppt.Body)
 Set M = M1(0)
 GetConfCodeUsingRegEx = Replace(M.SubMatches(0), " ", "") ' strip all spaces
 Exit Function
 End If
 
End Function

Function FormatPhoneNumber(sRawNumber As String)
 'Purpose: Formats a US telephone number as 999-999-9999,,,165.
 'Works with x, ext, ext. or just space before extension
 'Works with or without 1-number or +1-number
 'Works with or without spaces, dashes or parentheses between and around number groups
 'Does NOT deal with international numbers

 Dim sPhoneNumber As String 'Phone number formatted as 999-999-9999
 Dim Reg1 As RegExp
 Dim M1 As MatchCollection
 Dim M As Match
 
 Set Reg1 = New RegExp
 
 With Reg1 ' US numbers being matched
 .Pattern = "((?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *(?:ext\.|ext|x)?\s*(\d+))?)\w*"
 .Global = True
 End With
 
 If Reg1.test(sRawNumber) Then
 Set M1 = Reg1.Execute(sRawNumber)
 Set M = M1(0)
 If Not Len(M.SubMatches(1)) = 0 Then ' Starting with a code like "1"
 sPhoneNumber = M.SubMatches(1) & "-" & M.SubMatches(2) & "-" & M.SubMatches(3) & "-" & M.SubMatches(4)
 Else
 sPhoneNumber = M.SubMatches(2) & "-" & M.SubMatches(3) & "-" & M.SubMatches(4)
 End If
 If Not Len(M.SubMatches(5)) = 0 Then ' Found an extension
 sPhoneNumber = sPhoneNumber & ",,," & M.SubMatches(5)
 End If
 End If
 
 'Return formatted phone number
 FormatPhoneNumber = sPhoneNumber

End Function


This code should work as-is. If desired, you can hard-code a number to be used for your own invites inside the GetConfNumUsingRegex() function.

In the Visual Basic editor, click the “Tools” menu, then “References…” and check the “Microsoft VBScript Regular Expressions 5.5”, then click “OK”. This is required for the macro to function.

Screenshot 2015-06-01 11.11.32

Here is a screen shot of the VBA editor for reference:

Screenshot 2015-06-01 10.44.26

Sign the macro and save

Outlook 2010, by default, has a macro security setting of “Notifications for digitally signed macros, all other macros disabled”. Without signing the macro, it may work the first time around, but you might get an error message that “the macros in this project are disabled” in future.

We’ll create a self-signed cert and apply it. For Outlook 2010 and 2013, look for the “Digital Certificate for VBA Projects” application in the Start menu, give it your name, and click “OK” to create the certificate, like so:

Screenshot 2015-06-02 13.47.47

N.B.: Your installation of Office might not have linked this utility in the Start Menu. My O365 copy of Office 2016 does not, for example. In that case, open File Explorer, navigate to where Office is installed (C:\Program Files (x86)\Microsoft Office\Office16 is the default path for Office 2016), and launch the “SELFCERT.EXE” program.

Next, apply this certificate to your project. In the VBA editor, choose the “Tools” menu then “Digital Signature…” and apply the certificate you just created by selecting it via “Choose…” then clicking “OK”:

Screenshot 2015-06-02 13.48.10

 

Lastly, save your Project via “File” and “Save VbaProject.OTM”.

When that is done, you can close the VBA editor screen either via the X in the corner or through the “File” menu.

At some point when first executing the macro, you may see a warning whether to trust the certificate you just created. Choose “Enable Macros” or “Trust all documents from this publisher” :

Screenshot 2015-06-02 13.53.19

 

Link the macro to the “New Appointment” screen

This was actually the least intuitive step of the whole lot.

In Outlook, click on “Calendar”, then “New Meeting”. As far as I can tell, you can only add the macro to the ribbon while in that window.

With that new meeting window open, click “File”, then “Options”.

Click on “Customize Ribbon”

Right-click “Appointment” and choose “Add New Group”

Right-Click the “New Group (Custom)” and rename it to “Conf”

Select “Conf (Custom)” and use the up-arrow to the right to move it just under “Skype Meeting” or “WebEx”, depending on which you use.

With “Conf (Custom)” still selected, change “Choose commands from:” on the left-hand list to “Macros”

Click on the “Conf.AddLocation” macro and use the “Add>>” button

The macro should now show up in your “Conf (Custom)” group.

Click OK and test the macro!

Screenshot of what this ribbon option window looks like below.

Screenshot 2015-06-01 10.52.39

All Done

This is a fair serious amount of effort just to get a phone number into the “Location” field. For me, it was worth it because that effort makes life easier for my customers joining my meetings.

If so desired, you can disable the “Developer” toolbar again.

Canon EOS utility causes high “System” CPU, network meltdown

This is one of those slightly odd ones. I had high CPU on my PC even when not running anything, 20-25% (one whole core in essence) taken up by “System”. Mouse responsiveness was sluggish, sound would stutter, the works.

I tracked it down to ndis, and my Ethernet driver, using Sysinternals Process Explorer. Other folk have had similar experiences, so I updated the Ethernet driver. Things got worse. Rolled back and disabled all power savings functions on Ethernet. That helped a little, but only a little.

After a few weeks of off-and-on trying to fix this (and business travel in between), it occurred to me that my driver might be behaving just fine, that it was just genuinely busy – that there might be some form of traffic flood on the wire that caused my symptoms.

Sure enough. SSDP (UPnP discovery) packets to an obscene degree, originating from another machine in the network, with the string “Canon” in the discovery.

This was the Canon EOS Utility 2, or rather the UPnP discovery part of it. I saw no way of disabling UPnP discovery in settings, and the user was opposed to uninstalling the utility, so I just renamed the UPnP discovery exe so it couldn’t be started on boot, then rebooted the machine to check that worked. Problem solved. By killing the UPnP discovery process on another PC, my PC is responsive again.

That UPnP discovery process misbehaves. Until Canon fixes the issue – if they will – renaming it is the only workaround I can see.

If your System process CPU is high and it’s your network driver that’s doing it, run wireshark. It might not be your system at fault.

Installing VMWare Tools on JunOS SPACE

[Edit 2016-04-27] Updated for JunOS SPACE 15.2r1.

JunOS SPACE, Juniper’s management platform for JunOS devices (switches, routers, firewalls) does not come with gcc or kernel-headers. Installing VMWare Tools from a mounted ISO via vmware-install.pl is not all that successful. Happily, VMWare still provides RPM versions of those tools. SPACE 15.2 is built on CentOS 5, which in turn is a RHEL 5 clone.

This post will be around when SPACE 15.2 is history. To check for version of the underlying OS, run:

rpm -qa | grep ‘base.*centos’

(thanks to Riley in the comments for that)

Be sure to use the VMWare Tools package that matches the version of CentOS your SPACE is running.

1) Start by downloading the RPMs for VMWare Tools on RHEL 5. You’ll want the following (or their current equivalent):

vmware-tools-core-10.0.6-1.el5.x86_64.rpm
vmware-tools-esx-nox-10.0.6-1.el5.x86_64.rpm
vmware-tools-foundation-10.0.6-1.el5.x86_64.rpm
vmware-tools-guestlib-10.0.6-1.el5.x86_64.rpm
vmware-tools-libraries-nox-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-autoUpgrade-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-deployPkg-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-grabbitmqProxy-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-guestInfo-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-hgfsServer-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-powerOps-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-timeSync-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-vix-10.0.6-1.el5.x86_64.rpm
vmware-tools-plugins-vmbackup-10.0.6-1.el5.x86_64.rpm
vmware-tools-services-10.0.6-1.el5.x86_64.rpm
vmware-tools-vgauth-10.0.6-1.el5.x86_64.rpm

That list might change with newer versions of the tools and of RHEL, of course. When in doubt, grab just the vmware-tools-esx-nox package, try to install it, and take a note of all the dependent packages it wants, then download those too.

2) scp the lot to SPACE, say to /var/tmp. While WinSCP is unhappy with the shell the admin user runs on, command-line scp does not care and will work. Choose any version you like: The one that comes with Putty, the one that comes with Cygwin, an Ubuntu one on Windows 10, or any other. And if you’re running OSX or Linux, you can feel extra-smug because you have scp as part of your base OS.

3) Install those RPMs. Now, you could install the GPG key they are signed with, but if you trust that you got them from VMWare, in an unaltered form, then just:

yum install --nogpgcheck vmware-tools*rpm

If there are dependency errors, download the missing packages as well and try again.

5) Satisfy yourself that vmtoolsd is running:

service vmware-tools-services status

 

vSphere should now be reporting that SPACE is running “VMtools 3rd party/independent”. And that’s all there is to it.

The kmod portion of the tools won’t install, by the way – but then it’s not needed.

 

Resolving JunOS Pulse install issue on Windows

On my own Windows 7 machine, I had an odd error when attempting to install JunOS Pulse 5. The installer would start with “copying new files”, then “rolling back action” and would finally tell me that “the wizard was interrupted before JunOS Pulse could be completely installed.”

Usually, when something odd like this happens, the remedy is to uninstall everything Juniper. Which I did. Network Connect, Host Checker, Setup Client, Installer Service, Pulse Collaboration, I got rid of them all. Which didn’t resolve my issue.

Now, this machine has had various versions of Juniper-something installed on it over the years. Even the OAC client at one point. So it was likely that something was lingering that was causing this issue.

I had seen something similar at a customer of mine. They resolved it by re-imagining the machine. I didn’t want to be quite so thorough.

The solution turned out to be to open a command line “as Administrator”, run “pnputil -e > pnplist.txt”, find everything in there that has the name “Juniper” in it, then run “pnputil -d oemXX.inf” for each entry, where “XX” is the actual number of the entry.

This got rid of a lingering driver in the Windows driver store, which was keeping the Pulse driver from being installed. After this little bit of surgery, Pulse installed without complications.

Before reaching for pnputil, be sure that the previous step, uninstalling everything that has to do with Juniper MAG/SA client software, has already been taken. These drivers are components of the client software. Pulling them out from under that client software is not desirable.

I’ve found a forum mention that pnputil helped with a Network Connect install issue where a Juniper driver had gotten orphaned. This remedy is not specific to Pulse alone.

 

Restoring a bitlocker system volume with Acronis 2014

I had reason to restore my Windows 8 system volume, which is encrypted using Bitlocker. Getting access to my data drive back after that wasn’t quite as straightforward as I had hoped. For reference, and in case others get into this situation, here is what I encountered.

My setup

One system drive, SSD, encrypted using Bitlocker, running Windows 8.1.

One data drive, HDD, encrypted using Bitlocker, set to auto-unlock.

One backup drive, HDD, unencrypted. TrueImage 2014 is set to encrypt the backups themselves. This is crucial: Without an unencrypted backup drive, I couldn’t “get at” my backups when restoring the system drive.

I do not have a TPM module and use a USB stick instead for Bitlocker keys. I do not have Secure Boot enabled, mainly because I upgraded this system from Windows 7, don’t have a Secure Boot compatible GPU, and really don’t feel like re-installing Windows 8 to get the additional boot sector protection of Secure Boot. It’s a neat feature, but convenience wins out.

I keep a copy of my startup key and my recovery keys on a separate USB stick in the safe, and this proved to have been a necessary precaution.

Restore system drive

Restoring the system drive itself was reasonably straightforward. It cannot be done from Acronis within Windows, I had to use a Rescue CD instead. On machines without an optical disk drive, use a Rescue USB stick.

As expected, the system drive was unencrypted after the restore. This is a result of the way Acronis takes sector backups: It is “fed” the unencrypted data by Bitlocker, and so that is what get’s backed up and restored.

Get access to data drive back

I encountered two errors.

First, upon attempting to unlock my data drive, I received an error “Application not found”. The context menu entry to unlock the drive read “unlock-bde”, which points to an issue. This can be resolved by editing the registry, see Microsoft’s KB entry. The automatic fixit didn’t work for me, since my temp directory is on the data drive. Rather than change the location of temp, I just made the necessary two changes in regedit. To unlock the drive, I had to get my recovery key USB stick from the safe. You do have one of those, I’d hope. If not, you might be screwed.

Secondly, upon attempting to set the data drive to auto-unlock, I received an error “data error cyclic redundancy check”. No need to panic, the data is fine: This is a problem with the stored Bitlocker keys. Mark Berry documented the fix back in 2010. I used his updated (2/17/2011) methodology, which is henceforth no longer untested. In a nutshell, enable Bitlocker on the system drive, reboot. While the system drive is encrypting, use manage-bde to get rid of old auto-unlock keys and delete external keys from data volumes, then re-enable auto-unlock. This worked like a charm. Note he uses S: as a sample drive letter of the data volume; replace with whatever drive letter your data volume has.

Lastly, do not forget to copy your startup key and backup your new recovery key for the system volume onto your “oh crap” USB stick, and put it back in the safe where it belongs.

Recover Juniper SRX from failed boot

I have a Juniper SRX240H in the lab. I decided to load a beta version of JunOS, which brought the unit into a state where it did not successfully boot, and where I could not use the loader> prompt to recover from TFTP.

The symptoms were:

  • During boot, the SRX would experience a fault and enter the db> prompt. I believe this to be a debugger, possible gdb. “c” will cause it to reboot again
  • If I enter the loader> , I cannot execute setenv – I get a “stack underflow” error. This means I cannot install JunOS from TFTP

I may have been able to recover this system using a USB key, but I am remote to my lab: All I have is serial console.

I resolved the issue by entering u-boot instead of the loader. u-boot prompts right after boot, and the loader prompt is shown shortly thereafter. The u-boot prompt is “Press SPACE to abort autoboot in 1 seconds”, and the loader prompt is “Hit [Enter] to boot immediately, or space bar for command prompt.”

In u-boot, I issued this command:

=> getenv

This showed me that boot.current=primary

I changed this to the alternate slice, which still held a working copy of JunOS:

=> setenv boot.current alternate
=> boot

The system came up successfully and warned me that I had booted from the alternate slice, and it rebuilt the primary slice:

***********************************************************************
**                                                                   **
**  WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE      **
**                                                                   **
**  It is possible that the primary copy of JUNOS failed to boot up  **
**  properly, and so this device has booted from the backup copy.    **
**                                                                   **
**  The primary copy will be recovered by auto-snapshot feature now. **
**                                                                   **
***********************************************************************

The auto-snapshot feature that was used here needs to be configured (set system auto-snapshot) and supported by the version of JunOS you’re running.

Lastly, I confirmed that the snapshot had been repaired, then rebooted:

root@SRX-Lab-2> show system snapshot media internal
Information for snapshot on       internal (/dev/da0s1a) (primary)
Creation date: Nov 13 12:53:04 2013
JUNOS version on snapshot:
  junos  : 12.1X44-D20.3-domestic
Information for snapshot on       internal (/dev/da0s2a) (backup)
Creation date: Oct 4 17:13:17 2013
JUNOS version on snapshot:
  junos  : 12.1X44-D20.3-domestic
root@SRX-Lab-2> request system reboot

Final IPv4 allocations; IPv6 readiness test; IPv6 world day

Final IPv4 allocations have been made today. Will this galvanize businesses to start moving to IPv6? We’ll see 🙂

 

If you’ve been following my “IPv6 at home” series, here’s a neat link to test your IPv6 readiness: http://test-ipv6.com/

 

Finally, “World IPv6 day” will be on June 8th 2011. Google, Facebook, Yahoo, Akamai and Limelight will turn on IPv6 for 24 hours. Results should be interesting to see. If you’d like to prepare for World IPv6 day today, go on over to their official site.