Friday, 27 February 2015

Unity Connection Connection Failed to Record Name

I've experienced this in Unity Connection 10.5 & 9.1, but it may affect other versions as the Media Master applet is notoriously flakey.

Attempting to save an uploaded recording in the Media Master applet results in an error "Failed to record name", the workaround is to select "use phone" for playback (see screenshot below), upload the recording, play it & then saving works; not playing the recording or playing it through the computer fails.

For those of you having difficulty even launching the Media Master applet, edit the Java Runtime Environment (JRE) settings via Java in Control Panel (for Windows users). Add the IP address & FQDN of the Unity Connection server to the Exception Site List:


If you're using self-signed certificates, recent versions of the JRE don't like this so either import the certificate via Manage Certificates or generate a certificate from a trusted CA. As a general rule it's better to have certificates issued by a trusted CA, but this may not be feasible in all situations.

Thursday, 19 February 2015

Unity Connection Port Status Monitor

There's a quick & dirty way to monitor port status in Unity Connection to confirm the called, calling, redirecting number, redirecting reason & mailbox reached.

First navigate to System Settings > Advanced > Conversations, enter your PC's IP address into "IP Addresses Allowed To Connect For Port Status Monitor Output" & then tick "Enable Remote Port Status Monitor Output":
Note that you have to wait a bit, sometimes even 15 minutes, for the change to become live.
Now you can Telnet to port 5000 on you CUC server & view port status information in real time, such as the example below:

CallData, 8, CallerId=7999, CalledId=9010, RedirectingId=9010, AltRedirectingId=, Origin=16, Reason=8, CallGuid=EEAA4D0D4BD944ABBA8E1860437598BC, CallerName=Cisco Trainer, LastRedirectingId=9010, AltLastRedirectingId=, LastRedirectingReason=8, PortDisplayName=PhoneSystem-1-001
Application, 8, 7999, AttemptForward
State, 8, 7999, State - AttemptForward.cde!Dummy
State, 8, 7999, Event is [NULL]
Application, 8, 7999, PHTransfer
State, 8, 7999, State - PHTransfer.cde!LoadInfo
State, 8, 7999, Event is [TrueEvent]
Application, 8, 7999, PHGreeting
State, 8, 7999, State - PHGreeting.cde!PlayGreeting
Display, 8, 7999, Call answered if needed
Display, 8, 7999, Playing greeting for Subscriber:  Voicemail Test House
State, 8, 7999, Event is [HangupEvent]
State, 8, 7999, State - PHGreeting.cde!DoHangup
State, 8, 7999, Event is [HangupEvent]
Display, 8, 7999, Idle


Handy for quickly troubleshooting calls not delivering to the mailbox you intended, however remember that in an HA cluster you'll need to Telnet to port 5000 on the server that the ports are active on.

Thursday, 12 February 2015

CUCM Pattern or Number Reference Finder

For some unknown reason you can't run dependency records on hunt pilots or route patterns, which makes tracking down references to them a pain if you've deleted or changed the number. Fortunately you can run SQL queries from the CLI to get around this. Below is an SQL query for CUCM 8.X+ that checks for CFA, CFB, CFNA, CFNC, CFUR, AAR Destination Mask or Called Party Transformation that reference a specified number (in this example 119063):


SELECT n.DNOrPattern, n.AlertingName, n.Description, n.tkPatternUsage FROM NumPlan as n LEFT JOIN CallForwardDynamic AS cfd ON cfd.fkNumPlan = n.pkid WHERE n.CFAptDestination LIKE '119063' OR n.CFBDestination LIKE '119063' OR n.CFBIntDestination LIKE '119063' OR n.CFNADestination LIKE '119063' OR n.CFNAIntDestination LIKE '119063' OR n.PFFDestination LIKE '119063' OR n.PFFIntDestination LIKE '119063' OR n.CFURDestination LIKE '119063' OR n.CFURIntDestination LIKE '119063' OR n.AARDestinationMask LIKE '119063' OR n.CalledPartyTransformationMask LIKE '119063' OR cfd.CFADestination LIKE '119063' ORDER BY n.DNOrPattern ASC


The output will include the pattern, description, alerting name & pattern type for any dial plan elements that reference the given number:

admin: run sql SELECT n.DNOrPattern, n.AlertingName, n.Description, n.tkPatternUsage FROM NumPlan as n inner join CallForwardDynamic AS cfd ON cfd.fkNumPlan=n.pkid WHERE n.CFAptDestination LIKE '119063' OR n.CFBDestination LIKE '119063' OR n.CFBIntDestination LIKE '119063' OR n.CFNADestination LIKE '119063' OR n.CFNAIntDestination LIKE '119063' OR n.PFFDestination LIKE '119063' OR n.PFFIntDestination LIKE '119063' OR n.CFURDestination LIKE '119063' OR n.CFURIntDestination LIKE '119063' OR n.AARDestinationMask LIKE '119063' OR n.CalledPartyTransformationMask LIKE '119063' OR cfd.CFADestination LIKE '119063' ORDER BY n.DNOrPattern ASC

dnorpattern alertingname   description    tkpatternusage
=========== ============== ============== ==============
9063        Catarina Vidal Catarina Vidal 2 


The tkPatternUsage field lists the type of dial plan element, use the table below to interpret it:

tkPatternUsageDial Plan Element
0Call Park
1Conference
2Directory Number
3Translation Pattern
4Call Pick Up Group
5Route Pattern
6Message Waiting
7Hunt Pilot
8Voice Mail Port
9Domain Routing
10IP Address Routing
11Device template
12Directed Call Park
13Device Intercom
14Translation Intercom
15Translation Calling Party Number
16Mobility Handoff
17Mobility Enterprise Feature Access
18Mobility IVR
19Device Intercom Template
20Called Party Number Transformation
21Call Control Discovery Learned Pattern
22Uri Routing
23ILS Learned Enterprise Number
24ILS Learned E164 Number
25ILS Learned Enterprise Numeric Pattern
26ILS Learned E164 Numeric Pattern
27Alternate Number
28ILS Learned URI
29ILS Learned PSTN Failover Rule
30ILS Imported E164 Number

Wednesday, 11 February 2015

Rebuilding IM & Presence Servers Failing

Now that IM & Presence servers are configured as subscribers in CUCM, rebuilding them isn't quite so straight forward. If you just try reinstalling them then you'll get a nice unhelpful error message like the below:

To avoid this, within CUCM you must first delete the Presence Redundancy Group that contains the IM & P servers, then delete the IM & P servers. You may also need to bulk update all End Users to disable ". Then you'll be able to successfully reinstall the IM & Presence servers without it failing.

Also watch out for bug CSCus27634, which affects certain versions of IM & Presence 10.5, it results in the Cisco Presence Engine refusing to start due to it crashing. If you look the traces for the Cisco Presence Engine you'll see something a bit like this:

*** glibc detected *** /usr/local/pe/bin/pe: free(): invalid next size
(fast): 0x0ada0010 *** ======= Backtrace: =========
/lib/libc.so.6(+0x70b91)[0x787bb91]