Home
Contact Center Express (CCX) Authenticate Users with CRS Script

Recently I fielded a question on managing prompts in Cisco's Unified Contact Center Express (UCCX) using CRS scripts.  The person posing the question knew that they needed to use the Upload prompt script step but wasn't sure how to authenticate a user to the system.  This process is pretty straight forward, but there are a few steps involved.  I figured I would do a quick blog/"how to".  Why not? Right?

As with most things, I am sure there are multiple ways to accomplish this task.  This just happens to be the approach I take.  The context for the following example is based on the need to manage prompts remotely.  For every CCX solution NetCraftsmen deploys, we add a "prompt changer" application. 

At a high level, our "prompt changer" application does the following:

  • Accepts the call
  • Authenticates the user
  • Allows the user to manage dynamic/"live" prompts (i.e. instantly active prompts)
  • Allows the user to pre-record prompts by a specific prompt ID (for later upload)
  • Allows the user to open/close a call center

The following example focuses on the second step:  User Authentication.

Variables

The example uses the following variables:

  • intRetryCnt:  (integer) Used to control the number of times we ask the caller to authenticate themselves
  • strUserExtension: (string) Used to store the agent extension as provided by the caller
  • usrWhoAmI: (user) Stores the user object retrieved from CUCM
  • blnSupervisor: (boolean) Flagged true if the user object is a CCX supervisor
  • strCCMUserID: (string) User ID for the CUCM user held in usrWhoAmI
  • strUserPIN: (string) User PIN as defined in CUCM (provided by the caller)

Script

Our first task is to initialize the variable intRetryCnt to 0 and then play a prompt to provide basic instructions for authenticating to the system.

Next, we show the simplistic loop control.  We have a label "AUTHENTICATE_LOOP" and then we increment the retry counter, do a quick check, and if the counter is greater than 3 we send the caller to the script termination routine.

Step 1:

First things first.  Since the user is using a telephone to call into the script, it makes sense to make it easier on the caller by asking them for their CCX agent extension.  The agent extension is programmed in CUCM as "ICD Extension" or "IPCCX Extension".  The "Get Digit String" step basically plays a prompt with instructions and defines digit filters like length and termination string.

If we collect digits successfully, we move to step 2.

Step 2:

We use the "Get User" step to tell the CRS scripting engine to retrieve the user object associated with the agent extension that the user provided.  If the user provided an erroneous agent extension, then the "Unsuccessful" branch is engaged.  Otherwise, we have successfully grabbed the user object and wrote it to the usrWhoAmI variable.  Proceed to step 3.

Step 3:

This step is optional.  I just like to restrict contact center control to designated supervisors.  You could allow it so that anyone can manage the contact center.  I don't advise it, but you could.  Anyway, all we are doing is checking an attribute tied to the user object stored in usrWhoAmI.  Specifically, we are asking if the user is a CCX supervisor and storing the value in blnSupervisor.

Step 4:

Again, we are extracting an attribute from the user object stored in usrWhoAmI.  In this case, we are grabbing the end user ID.  This is the user ID as configured in CUCM (e.g. bbell).  This is an attribute of type string, so we push it into a string variable: strCUCMUserID.

Step 5:

We check to see if the user object is a supervisor.  If it is then we proceed.  We are now going to prompt the caller to enter their Personal Identification Number (PIN).  This is the PIN as defined in CUCM.  Similar to the procedure in Step 1, we are using "Get Digit String" to store the PIN.  We push this into a string variable: strUserPIN.

Step 6:

OK, all previous steps are needed to reach this point.  We are going to take the user ID stored in strCUCMUserID and the PIN stored in strUserPIN and authenticate the user against CUCM.  If the PIN and User ID match up with what is stored in CUCM, then we are good to go and allow the caller to manage the prompts and/or contact center.

Unsuccessful and Timeout Steps:

Many of the steps we have provided have a branch for handling exceptions (e.g. Unsuccessful or Timeout).  Each of these has a similar structure:

  • Play a prompt to user to clue them in on what they did or didn't do
  • Send the caller back to AUTHENTICATE_LOOP (which will increment the counter, and see if we should try this again)

 

That's it, now you have a method to authenticate users before they destroy your contact center.  Thanks for reading!

Comments (8)Add Comment
0
Supervisor VS Administrator
written by Anthony Holloway, September 29, 2010
What would happen if the supervisor, also happened to have Admin rights, because they need to change Application parameters?
William Bell
Re: Supervisor VS Administrator
written by William Bell, September 29, 2010
The fact that a guru like Anthony Holloway is asking me this question makes me wonder if I missed something big! smilies/wink.gif I have tested the script using a user that was a supervisor and an admin. I didn't test for that reason, I was just being lazy and tested using an account I setup for both purposes!

Prior to having this script, I would set the admin attribute for the user object so that they could edit the script parameter variables. I am actually a proponent for parameter variables (as long as you don't get carried away). Again, that is because I am lazy and want to leave my customers with a method to control script behavior.

Does that answer the question? Or did I miss something?

HTH.

Regards,
Bill
0
Phone Lock
written by Davi Saminaden, May 09, 2011
Hello William.
I know that maybe this is not the right place to post this. But i was wondering if there is any way to lock a phone when the user is not at their desk. I know of third party software like stonelock that do this, but I was wondering whether you know write custom code to do the same thing in a simpler way..

Best regards...
davi
William Bell
Re: Phone Lock
written by William Bell, May 09, 2011
Davi,

I am not familiar with Stonelock. I did a quick read on their software offering and I imagine it may use some of the same approaches you see with EM. Meaning, it uses device profiles to do its job. But that is a guess on my part.

In my experience, Extension Mobility can be used as an effective security measure. Though, it could be cumbersome for folks who want to "lock" their phone when they leave their desk for a short period. Stonelock may be a simple shortcut to the same mechanisms?

Anyway, I have not looked at coding something like this but the first place I would look is the Phone SDK to see if there is an API function that could be leveraged (just in case). Then I would look at the EM API to see if I could create user shortcut functions (like I suspect Stone has done - but could be wrong).

HTH.

Regards,
Bill
0
Manager, Voice Operations
written by Pam Smith, May 28, 2011
I am not experienced at CCX Scripting but I was looking for something that would allow Supervisors to Close the Call Center and put it temporarily into NITE mode and take it out of NITE mode with a phone call or something. They have a need to do this when they are having meetings with agens or something. Currently, the only way for them to do this is by giving them Admin rights to CCX server and they go and put the day in Holiday Schedule and Update and once their meeting is over, they remove that Holiday schedule. The problem I have is with giving a Supervisor Admin access to the Server! Your help willl be greatly appreciated.
William Bell
Re: CCX night closure
written by William Bell, May 30, 2011
Pam,

You can do this using a CCX script. We add this functionality into our standard CCX script jobs all of the time. There are two parts. One part is having a CCX script that the supervisor can use to open/close the call center. The idea here is that the open/close script will write a boolean value to a XML file. Then other call center scripts read from these file to determine if they are open or closed. If open, proceed as normal. If closed, let the caller know and then hang up.

I touch on the whole XML document thing in this blog:

http://www.netcraftsmen.net/resources/blogs/using-xml-files-to-control-a-crs-script.html

HTH.

Regards,
Bill
0
Network Engineer
written by Davi Saminaden, January 25, 2012
Hi Bill. Thanks for the kind info.

I know I replied kind of very late.
For the time being we'll stick to stone lock as it has the closest match to what we are seeking.

Extension mobility will not do the job. Instead of easing off our job, it'll attract only disgust and complaints from users.

Thanks and best regards
Davi
0
Consulting Engineer
written by Nathan Richie, February 10, 2012
Bill,

Great article! I have completed my script and added the necessary steps to authenticate the user and it works great. However, my script is not uploading the prompt to the directory. No real errors that I can see either.

Any ideas or can you point me in to another blog that maybe spells this part out?

Regards,

Nathan Richie

Write comment

busy