CUCM IM change postgres external database

If you need to change the postgres external database for CUCM, there a few steps to follow:

  1. Change database server name
    1. External server setup -> External databases
  2. Unassign servers and disable persistent chat
    1. Messaging -> Group Chat and Persistent Chat
    2. Change “Persistant Chat Database Assigntment” to unsassigned
    3. Uncheck “Enable Persistant Chat” and Save
  3. Assign servers and enable persistent chat
    1. Messaging -> Group Chat and Persistent Chat
    2. Change “Persistant Chat Database Assigntment” to sassigned
    3. Check “Enable Persistant Chat” and Save
  4. Restart Cisco XCP Router
  5. Start XCP Text Conference Manager

 

 

This blog post helped figure out the process: http://collabtechnotes.blogspot.com/2015/07/postgre-sql-cisco-xcp-message-archiver.html

Advertisements

Cisco Router Packet Capture and Export

I’ve recently had to troubleshoot some SIP calls going through a Cisco router (CUBE) and needed a way to capture the stream and view it easily.

To do this, you will need:

  1. CLI access to the router
  2. Wireshark installed on your PC
  3. tftp server installed on your PC (I used tftpd found here: LINK)

Here are the steps required:

Log into your router and create the capture policy:

ip traffic-export profile <name> mode capture
bidirectional

Assign the capture profile to the interface:

interface <interface>
ip traffic-export apply <name> size 20000000

Clear any data and start the export:

traffic-export interface <interface> clear
traffic-export interface <interface> start

Test your application (or in my case, a SIP call)

Once the test is complete, stop the export:

traffic-export interface <interface> stop

Export the captured traffic to your PC via tftp:

traffic-export interface <interface> copy tftp:

Use Wireshark to open the file, then click “Telephony” at the top and then “VoIP Calls” to analyze the SIP traffic

Also, if you want to send your logs (in case of a debug) to your PC via tftp, the command is:

show logging | redirect tftp://tftpserver/destinationfilename

Source: https://thevoiceman.wordpress.com/2014/11/28/ip-traffic-exporting-cube/

Cisco CUCM/CUBE SIP Troubleshooting

Some quick notes on troubleshooting tools in a Cisco SIP Call Manager environment:

Commands on the CUBE router:
show call active voice compact
debug ccsip messages
debug voip ccapi inout

Article on understanding SIP traces:
https://supportforums.cisco.com/document/113271/understanding-sip-traces

SIP call flows and troubleshooting:
https://supportforums.cisco.com/document/71131/basic-sip-call-flows-troubleshooting-commands

Using CUCM RTMT Session Trace:
http://www.ucguerrilla.com/2012/03/cisco-cucm-rtmt-session-trace.html

Using TranslaterX as an additional tool to Session Trace:
https://wiklunds.wordpress.com/2013/06/09/sip-traces-from-cucm-in-transla/

2 Hour Cisco Live breakout on SIP troubleshooting with CUCM and CUBE:
https://www.ciscolive.com/online/connect/sessionDetail.ww?SESSION_ID=6098&tclass=popup

Jabber for iPhone Move to Mobile

I noticed on the Cisco Jabber for iPhone app there is a “Move to Mobile” option when you are on a VoIP call.  This feature did not work for me initially, so here are my steps to get it working.

  1. User Profile: Make sure “Enable Mobility” is checked
  2. Remote Destination Profile: A remote destination profile needs to be created and assigned to the user with their cell number.  I usually have the user sign into the self-care portal and have them create their own profile.  “Enable Move to Mobile” must be checked in the profile.
  3. Device: The TCT phone device for their iPhone needs to have the “Owner User ID” and “Mobility User ID” assigned to the user.  Also, the Transfer to Mobile Network option should be set to “Use Mobility Softkey”

Apparently their are two ways to setup up Move to Mobile, and I found this option (the user receives a call from CUCM once they click “Move to Mobile”) most effective to implement.  You can find both options detailed HERE

CUCM Phone Firmware Update

  1. Go to cisco.com, search for your phone model and download the relevant firmware
  2. Copy firmware to a SFTP server (I run Solarwind’s free SFTP server on my laptop)
  3. Log into CUCM Pub: OS Administration–>Software Upgrade–>Install/Upgrade–>Remote Filesystem
  4. Go through the steps to connect to SFTP and upload the phone firmware
  5. Repeat steps 3 & 4 on your CUCM Subs
  6. On the Pub and Subs, log into Serviceability–>Tools–>Control Center – Feature Services
  7. Select the server you are logged into (Pub or Sub)
  8. Restart Cisco Tftp

On 10.5.2, the device defaults update automatically, and next time the phone reboots it will upgrade it’s firmware.

Cisco CUCM, CUPS, Unity Upgrade to 10.5.2

I recently upgraded a Cisco Call Manager environment from 10.5.1 to 10.5.2, and since I had to figure out all the upgrade steps, I figured I’d post my process.  I used the upgrade guide found here: Cisco Upgrade Guide

  1. Login to CM Publisher Disaster Recovery System
    1. Backup–>Backup Device–>Add New (if not already present)
    2. Backup–>Manual Backup–>All features–>Start Backup
  2. Login to Unity Disaster Recovery System
    1. Backup–>Backup Device–>Add New (if not already present)
    2. Backup–>Manual Backup–>All features–>Start Backup
  3. Backup all virtual machines (I used XSI backup to do this)
  4. Snapshot all virtual machines within VMware
  5. Stop LDAP sync interval on Call Manager and Unity (I use UDS for IM)
    1. This is recommended so that LDAP doesn’t attempt to sync during the upgrade
  6. Stop Extension Mobility service–>CM Pub and Sub–>Cisco Unified Serviceability
  7. Login to CM Pub, Unity Pub and IM&P Pub
    1. OS Administration–>Software Upgrades–>Remote filesystem (or DVD drive)
      1. Upload new iso and click “Do not reboot after Upgrade”
  8. Wait for the all the Pub’s to load the new ISO
  9. Login to CM Sub, Unity Sub, and IM&P Sub
    1. OS Administration–>Software Upgrades–>Remote filesystem (or DVD drive)
      1. Upload new iso and click “Do not reboot after upgrade”
  10. Login to CM Pub
    1. OS Administration–>Settings–>Version–>Switch Version
    2. Wait for Pub to come back up
  11. Login to CM Sub
    1. OS Administration–>Settings–>Version–>Switch Version
    2. Wait for Sub to come back up
  12. Check database status
    1. SSH to CM Pub: utils dbreplication runtimestate, value should be “2”
  13. Check phone functionality
  14. Check version via cli: show version active
  15. Verify Extension Mobility service is running
  16. Done upgrading Call Manager!
  17. Login to Unity Pub
    1. OS Administration–>Settings–>Version–>Switch Version
  18. Wait for Unity Pub to come back up, try checking voicemail from a phone
  19. Login to Unity Sub
    1. OS Administration–>Settings–>Version–>Switch Version
  20. Check database status
    1. SSH to Unity Pub: utils dbreplication runtimestate, value should be “2”
  21. Done upgrading Unity!
  22. Login to CM Pub and disable IM HA: System–>Presence Redundancy Groups
  23. Login to IM&P Pub
    1. OS Administration–>Settings–>Version–>Switch Version
    2. This server took a while to come back up, it has to wait for the Cisco DB to initialize and then the rest of the services will start up
  24. Wait for IM&P Pub to come back up with all services started
  25. Login to IM&P Sub
    1. OS Administration–>Settings–>Version–>Switch Version
    2. This server also took a while to come back up, it has to wait for the Cisco DB to initialize and then the rest of the services will start up
  26. Check database status
    1. SSH to IM&P Pub: utils dbreplication runtimestate, value should be “2”
  27. Log into CM Pub and turn on HA for IM cluster
    1. HA will take a couple minutes to re-initialize
  28. Done upgrading IM&P!
  29. Re-enable LDAP sync on Call Manager and Unity

The upgrade went pretty smoothly, with only one hiccup.  After I upgraded the Unity Pub, I couldn’t access the Unity Sub webpage in order to switch the version and upgrade.   The webpage just wouldn’t load.  I could have restarted Tomcat and tried to get the webpage working, but I decided to proceed with the upgrade, and switched the version from cli with: utils system switch-version The upgrade was successful and the entire environment is working great!

CUCM LDAP Sync Based on User Group

If you don’t want CUCM to sync your entire LDAP directory, you will need to use a LDAP Custom Filter.  This filter can be used to sync based on AD Security Group.  The filter is:

(&(objectclass=user)(!(objectclass=Computer))(!(UserAccountControl:1.2.840.113556.1.4.803:=2)) (memberOf=CN=Demo Security Group,OU=SecondOU,OU=FirstOU,DC=DomainName,DC=com))

With this example, the name of my AD Security Group is: Demo Security Group.  Then, you must specify the entire LDAP location string of that security group.  My example would be:

-DomainName.com
–FirstOU
—SecondOU
—-Demo Security Group

Cisco Mobile and Remote Access via Expressway

Deployed Cisco Expressway C & E for a CUCM deployment, and these guides were useful:

Installing the VM on vSphere:
http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/expressway/install_guide/Cisco-Expressway-Virtual-Machine-Install-Guide-X8-1.pdf

Configuration and Deployment Guide:
http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/expressway/config_guide/X8-2/Mobile-Remote-Access-via-Expressway-Deployment-Guide-X8-2.pdf

Administrator Guide:
http://www.cisco.com/en/US/docs/voice_ip_comm/expressway/admin_guide/Cisco-Expressway-Administrator-Guide-X8-1.pdf

Cluster Creation Guide:
http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/expressway/config_guide/X8-1/Cisco-Expressway-Cluster-Creation-and-Maintenance-Deployment-Guide-X8-1.pdf

Cisco IM&P Chat Room Postgres Server

If you want to implement chat rooms/persistent chat or chat logging with Cisco IM and Presence, you need to setup an external postgres server.  The setup is relatively easy (I used a ubuntu server), and can be found HERE 

The problem I came across was that while testing, I created several chat rooms, then deleted the users who owned those chat rooms.  I needed a way to delete those test chat rooms, which needs to be done on the postgres server (since the users no longer existed).  Here are the steps I used:

  1. SSH to postgres server and become the postgres user: su – postgres
  2. As the postgres user, login to the database: psql -d tcmadb
  3. To view the chat rooms stored in the database, run: SELECT room_jid FROM tc_rooms;
  4. I wanted to delete ALL chat rooms previously created, so I truncated the table: TRUNCATE tc_rooms;
  5. All done!  All chat rooms are now deleted.  If you want to delete a specific room, you’ll need to select and delete a specific row instead of truncate

Additional useful postgres database commands:

Show all tables: \dt
To quit: \q
Show all rows in a table: \d+ tablename