Find UCCE agents and their assigned attributes and level

Maybe I should have checked CUIC to see if there was something, but I don’t remember something like this available. All I wanted was to see all my agents their attributes and levels.

SELECT [lab_awdb].[dbo].[Agent].EnterpriseName
      ,[lab_awdb].[dbo].[Attribute].EnterpriseName
      ,[AttributeValue]
  FROM [lab_awdb].[dbo].[Agent_Attribute]
JOIN [lab_awdb].[dbo].[Agent] ON [lab_awdb].[dbo].[Agent_Attribute].[SkillTargetID] = [lab_awdb].[dbo].[Agent].[SkillTargetID]
JOIN [lab_awdb].[dbo].[Attribute] ON [lab_awdb].[dbo].[Attribute].AttributeID = lab_awdb.dbo.Agent_Attribute.AttributeID

~david

X-Lite change the caller ID/Display Number

I had not used X-Lite for over a year and decided to load it up and realized that there’s an upgrade and older version of the software are no longer valid. So I upgraded and noticed that my Flowroute settings didn’t migrate correctly. I went to Flowroute got my credentials and moved them over, but noticed that my caller ID was not the caller ID I wanted. After playing around with it a bit I realized that I had to set my User ID to the caller ID I wanted displayed and moved my username/auth to “"Authorization name”. Now it’s working like it used to.

xlitesettings

~david

Using git to push and pull repositories.

I’ve been trying to get more proficient with git and figured the only way to do that is to get my hands dirty and write some simple app(s) and push them to a production server. There are my notes, mainly for me to help me remember how this stuff works.

The very first time you do a git init to initialize your repository.

git init

You do this every time you want to add new changes to your reposiotry.

git add .

To see the status of things which are going to be added, removed.

git status

Once you’re happy with what you want to commit, leave your future self a little love note.

git commit –m “Doing something”

You only do this the first time to setup your remote repository destination.

git remote add origin git@github.com:dmaciasSS/myrepo.git

Then you do this every time you want to push your commit.

git push –u origin master

Now, let’s say I want to pull my repository to a new host e.g. production. If you’re using Laravel make sure you’re setting up your environment name in your vhost file first.

sudo git clone https://github.com/dmaciasSS/myrepo.git locaton/in/my/server

Laravel specific commands.

chown -R :www-data app/storage

chmod –R 777 app/storage

‘composer install’

php artisan cache:clear

Now, once you’ve cloned your repository you need to updated it every time you want to pull down any new commits.

sudo git pull origin master

composer update

php artisan cache:clear

~david

Finesse Error: The device associated with that extension or dial number is invalid.

This is the first time I’ve used an 8945 phone as an agent phone and while the documentation states it’s supported, I kept getting the above error which made no sense to me as everything looked right. Checked out the jtapi logs and this is what it said:

16:48:24:420 PG1A-jgw1 Trace: MsgAddCallObserver:  Addr: 7778 Remote Addr: 0 InvID: 8380 CallDeliveryMode ID: 0.
16:48:24:420 PG1A-jgw1 Trace: Adding Call Observer to: 7778.
16:48:24:420 PG1A-jgw1 Trace: Address Name: 7778IP Addressing Mode:IP_ADDRESSING_MODE_IPV4.
16:48:24:420 PG1A-jgw1 Trace: AddCallObserver address validation failed – Address Name: 7778, error code: 154.
16:48:24:420 PG1A-jgw1 Trace:   MsgAddCallObserverResponse:  Addr: 7778 Succeeded: 0 InvID: 8380 Cause: 154.

Which then let me to this link. The problem was something I’ve never had to set in the UCM before. Join And Direct Transfer Policy.

image

Once that was changed the the phone recycled, everything worked. Go figure.

~david

Add Connection Profiles to Cisco AnyConnect Secure Mobility Client

I enjoy the new VPN client, it’s small and fast, however I hated that you can’t save profiles in the drop down list like you could in the traditional VPN client.

VPNNoProfile

This has been bothering for a long time and kept finding conflicting information on if this was possible or not. Finally got it to work.

VPNProfiles

This is for version 3.1x and Windows 7 let me know if this works for your version and OS.

  • Create a preferences.xml file in C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile\
  • Use this format

<?xml version="1.0" encoding="UTF-8"?>

<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/">
<ServerList>
     <HostEntry>
          <User>dclouduser</User>
          <SecondUser></SecondUser>
          <ClientCertificateThumbprint></ClientCertificateThumbprint>
          <ServerCertificateThumbprint></ServerCertificateThumbprint>
          <HostName>dCloud</HostName>
          <HostAddress>dcloud-rtp-anyconnect.cisco.com</HostAddress>
          <Domain></Domain>
          <Group>ssl_url</Group>
          <ProxyHost></ProxyHost>
          <ProxyPort></ProxyPort>
          <SDITokenType>none</SDITokenType>
          <ControllablePreferences>
          <LocalLanAccess>true</LocalLanAccess></ControllablePreferences>
     </HostEntry>

     <HostEntry>
          <User>dmacias</User>
          <SecondUser></SecondUser>
          <ClientCertificateThumbprint></ClientCertificateThumbprint>
          <ServerCertificateThumbprint></ServerCertificateThumbprint>
          <HostName>Speech-Soft</HostName>
          <HostAddress>vpn.dmacias.com</HostAddress>
          <Domain></Domain>
          <Group>ssl_url</Group>
          <ProxyHost></ProxyHost>
          <ProxyPort></ProxyPort>
          <SDITokenType>none</SDITokenType>
          <ControllablePreferences>
          <LocalLanAccess>true</LocalLanAccess></ControllablePreferences>
     </HostEntry>
</ServerList>

</AnyConnectProfile>

  • Save the file.
  • Restart the connectivity client.
  • Enjoy

~david

EDIT 01/18/2017: This also works with Cisco AnyConnect 4.x!

Connecting to AWS MySQL Server

I thought I had setup my connection setting correctly, but kept coming up with this error specially because of the SSH tunnel:

Long Message:
Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Details:
   Type: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
   SQL State: 08S01

Turns out I had to set my Database Server to localhost and not to the address of the EC2 instance.

MySQL Connection Settings

Excel macros multiple columns to a single column and delete a repetitive range of columns.

When I’m not fighting the war on bad call centers I try to assist my better half with some of her work.  Lately this has involved a lot of spreadsheets and data manipulation, which is something I enjoy as it’s a bit different than what I do day-to-day. The latest issue was turning a dataset from rows to columns. Transpose, you say? I wouldn’t be posting this if it would have been that easy.  The dataset looked like this:

A 7 2 9
B 3 4 5
A 9 9 2
C 3 2 3
C 1 3 9
B 1 2 2

The good thing is that the data had the same number or rows for every entity, in my case 10 rows belonged to each entity.  The bad news is that transposing got me from 10 rows to 10 columns.  The first thing I did was sort the rows by entity to group all entity rows together and did a transpose. 

AABBCC
793131
224223
925239

Next, I went to Google for some help and came up with the following macro:

Sub ManyColumnsTo1()
Dim LR As Long, index1 As Long, index2 As Long, x As Long, y As Long, z As Long, maxCol As Long
x = 2
y = 10
z = 1
maxCol = 50
‘ First entry
    For index1 = x To y
        LR = Cells(Rows.Count, index1).End(xlUp).Row
        Range(Cells(1, index1), Cells(LR, index1)).Copy
        Cells(Rows.Count, z).End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
    Next index1
‘ All others
For index2 = x To maxCol
    x = x + 10
    y = y + 10
    z = z + 10
    For index1 = x To y
        LR = Cells(Rows.Count, index1).End(xlUp).Row
        Range(Cells(1, index1), Cells(LR, index1)).Copy
        Cells(Rows.Count, z).End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
    Next index1
Next index2
On Error Resume Next
Columns("A").SpecialCells(xlCellTypeBlanks).Delete shift:=xlShiftUp
On Error GoTo 0
End Sub

This macro will copy a range of columns into one column.  The code will copy y columns, starting with column x into column z.  The for loop will then cycle through maxCol to ensure you get every column in your dataset. Which then gives us the following.

AABBCC
793131
224223
925239
A  B  C
9  1  1
2  2  3
2  2  9

Ultimately, this is what I wanted, but I had a lot of unnecessary columns in the middle which we needed to get rid of.  Enter a column delete macro:

Sub DeleteColumn()
    Dim startCol As Long, endCol As Long, maxCol As Long
    startCol = 1
    endCol = 10
    maxCol = 50
    For i = startCol To maxCol
        ActiveSheet.Range(Cells(1, startCol + 1), Cells(10, endCol)).EntireColumn.Delete
        startCol = startCol + 1
        endCol = endCol + 1
    Next i
End Sub

This macro will delete a range of columns.  The deletion will start with startCol through endCol for maxCol.

Which gives us the following.

ABC
733
242
953
ABC
911
223
229

One more transpose and some cleanup and we’re good to go.  Hope this helps others.

david

Find the total number of attributes and skillgroups in an agent team.

With the new 9.x release and the popularity of Finesse I’m seeing a lot more cases of latency/timeouts from the Finesse desktop.  A lot of these have been attributed to network issues, but I still feel that Finesse has been made way too sensitive to the network.  Makes me yearn for the good old days of CTIOS.  One thing which came up recently is to find out how many skillgroups and attributes/PQs an agent team has.  As the SRND alludes that having too many SG/PQs (>50) in a team will cause performance issues.  The following two queries will give you the total count of unique attributes and skillgroups in an agent team, all you need to do is know your agent team ID.

Attributes

SELECT count(distinct(awdb.dbo.t_Agent_Attribute.AttributeID)), COUNT(awdb.dbo.t_Agent_Attribute.AttributeID) FROM awdb.dbo.t_Agent_Attribute INNER JOIN t_Agent_Team_Member ON (t_Agent_Attribute.SkillTargetID = t_Agent_Team_Member.SkillTargetID)
WHERE t_Agent_Team_Member.AgentTeamID = ‘XYZ’

Skillgroups

SELECT count(distinct(awdb.dbo.t_Agent_Attribute.AttributeID)), COUNT(awdb.dbo.t_Agent_Attribute.AttributeID) FROM awdb.dbo.t_Agent_Attribute INNER JOIN t_Agent_Team_Member ON (t_Agent_Attribute.SkillTargetID = t_Agent_Team_Member.SkillTargetID)
WHERE t_Agent_Team_Member.AgentTeamID = ‘XYZ’

david

Determine Busy Hour From UCCE TCD

The busy call hour is a valuable piece of information in order to forecast how many phone lines you’re going to need as well as how many agents, however getting this information can be difficult and then ensuring that it’s accurate is a whole other matter.  Recently I ran into an issue and I wanted to get the busy hour for myself.  I don’t have any access to the provider records, so all I have is the TCD table… when all you have is a hammer the whole world looks like a nail.

First, I turned to Google, which pointed me to how to get the calls per second.  This is good information as you would imagine that the highest CPS would fall during the busiest hour.  The query mentioned is:

   1:  SELECT Time=CONVERT(char,DateTime,108), CPS=CONVERT(decimal(5,2), RouteCallDetailTo5/300.0)
   2:  FROM t_Logger_Meters
   3:  WHERE DateTime BETWEEN '01/01/2013 00:05' AND '01/02/2013 23:59'
   4:  ORDER BY Time

Second, I opened up SQL Studio and began running some queries and came up with the following:

   1:  SELECT DATEPART(HOUR, DateTime) AS [Hour of Day], COUNT(distinct RouterCallKey) 
   2:  FROM t_Termination_Call_Detail
   3:  WHERE DateTime > '01/01/2013 06:00' and DateTime < '01/01/2013 20:00'
   4:  GROUP BY DATEPART(HOUR, DateTime)
   5:  ORDER BY DATEPART(HOUR, DateTime)
 
This query assumes that every new call will receive its own RCK, so we can use this as our counter.  Next, the query breaks up the select statement by hour.  Finally, put the output in Excel and make a pretty graph.  Some caveats, this is very generic and over counts.  It doesn’t care about transfers, outbound calls, etc.  Next, the query doesn’t look at the routing client, so if you have a lot of UCM generated calls this might not help you very much.
~david