Thursday, September 07, 2023

CUCM SQL DNs on device types

 Returns device type, device name, associated DNs, etc. where DNs are 1+10 digit format. 

run sql SELECT TypeModel.Name, Device.Name, Device.Description,  DeviceNumPlanMap.Display, NumPlan.DNOrPattern,  DeviceNumPlanMap.NumPlanIndex,  CallingSearchSpace.Name  FROM NumPlan  INNER JOIN TypeModel INNER JOIN Device ON TypeModel.Enum =  Device.tkModel INNER JOIN DeviceNumPlanMap ON Device.pkid =  DeviceNumPlanMap.fkDevice ON NumPlan.pkid = DeviceNumPlanMap.fkNumPlan  INNER JOIN CallingSearchSpace ON  NumPlan.fkCallingSearchSpace_SharedLineAppear = CallingSearchSpace.pkid  INNER JOIN RoutePartition ON NumPlan.fkRoutePartition =  RoutePartition.pkid where dnorpattern like '1%' and length(dnorpattern) = 11 ORDER BY NumPlan.DNOrPattern

Wednesday, July 19, 2023

CUCM SQL device and owner ID where LDAP integrated

 Returns a list of physical devices that are owned by a LDAP integrated user

run sql SELECT device.name, enduser.userid FROM device LEFT JOIN enduser ON device.fkenduser = enduser.pkid where device.name like "SEP%" and enduser.fkdirectorypluginconfig is not null

Tuesday, May 02, 2023

VS Code Connect to host Remote SSH invalid format Permission denied (publickey)

After moved a website from one AWS ubuntu EC2 instance to a another AWS ubuntu ECS instance I wanted to make some quick modifications to some python code there.

Using VS Code, I created a new host in my C:\users\Administrator\.ssh\config file using the same format as my previously working host config:

Host XX.XXX.XX.XXX
  HostName XX.XXX.XX.XXX
  User ubuntu
  IdentityFile "C:/Users/Administrator/Documents/Projects/TTS/key_that_works_with_putty.ppk"

Connecting using that host entry consistently returned in VS Code terminal:

[21:32:12.279] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 56925 "XX.XXX.XX.XXX" bash
[21:32:12.283] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[21:32:12.608] > ]0;C:\WINDOWS\System32\cmd.exe
[21:32:12.608] Got some output, clearing connection timeout
[21:32:12.957] > Load key "C:/Users/Administrator/Documents/Projects/TTS/key_that_works_with_putty.ppk" i
> nvalid format
[21:32:12.990] > ubuntu@XX.XXX.XX.XXX: Permission denied (publickey).

Although the key worked with putty and WinSCP, VS Code called it invalid and public.

The fix was:
  • puTTYgen
  • Load
  • point to key_that_works_with_putty.ppk
  • Conversions | Export OpenSSH key
  • Call the new key something like key_that_works_OpenSSH_style.ppk
  • Modify VS Code host entry IdentityFile to point to new key.

Hope that helps.

Wednesday, September 07, 2022

CUCM Block Inbound Callers by Caller ID on CUBE or gateway level

For information on blocking inbound callers by caller ID on MGCP gateways via CUCM, see my old post here: http://webmaxtor.blogspot.com/2017/12/blocking-calls-based-on-calling-party-id.html

Since a co-worker and an old client just recently asked about doing it at the gateway level using SIP trunks, here's a quick synopsis of one way to do it:

Create a voice translation rule that identifies calls with a very specific number.  Here for example I am focusing on the telephone number +1(716)555-1212.

!
voice translation-rule 99
    rule 1 reject /7165551212/
!

Then create a translation profile that indicates you want to use that rule when looking at calling numbers.  Since we are looking to block a caller with this caller ID the profile would look like so, keeping in mind the word BLOCK is just a label and could be anything.

!
voice translation-profile BLOCK
 translate calling 99
!

Then use that profile to block calls handled by a specific inbound dial peer.  Here dial peer 88 is the incoming dial peer that handles calls from the PSTN.  The profile we created called BLOCK is used to identify which incoming calls on this dial peer should be rejected.

!
dial-peer voice 88 voip
    call-block translation-profile incoming BLOCK
    call-block disconnect-cause incoming call-reject
!

Monday, September 05, 2022

Webex Contact Center CJA report on IVR menu option dialed

I was recently asked to set up a simple telephony IVR with six options and provide the ability to report on which options were chosen by callers.  

In UCCX world I would use a Set Enterprise Info step to write a custom variable and then report on it later.  Here, since some of the IVR options were already being served by Webex Contact Center I wanted the IVR and reporting to be a function of Webex as well.

Below is what I came up with after a tip from the Reddit r/ciscoUC group found here: https://www.reddit.com/r/ciscoUC/comments/wrqw7v/webex_contact_center_menu_option_selection_report/ 

  1. new Global Variable created called Global_OptionEntered
  2. new dialed number to Entry Point Mapping
  3. new Entry Point to new Flow Routing Strategy
  4. Flow IVR created with Menu activity with six Custom Menu Links
  5. Each Menu Link flow path is connected to a Set Variable activity
  6. Each Set Variable activity set the Global_OptionEntered variable to a string that describes the reason for the option selected. For example, option 1 was set to "1. Vanilla", option 2 was set to "2. Chocolate", etc.
  7. The Set Variable flow path was then connected to a Blind Transfer activity to send the caller to another system, or to a GoTo activity to route the caller to another Entry Point already in production in Webex Contact Center.

Set Variable

  1. In CJA create a new visualization with the Customer Session Record type
  2. The Row Segment is the new global variable Global_OptionEntered
  3. The Profile Variable is the Count of Global_OptionEntered
  4. The Filters is Global_OptionEntered "is in" and the six strings (i.e. "1. Vanilla", "2. Chocolate", etc.) written to the variable by the Set Variable activities in the flow.
CJA Customer Session Record Filter

  1. The report output is then basically this:
Sample Report Output