Saturday, September 10, 2011

TCL vs. VXML Applications

TCL and VoiceXML are two different approaches to provide automated functions on voice gateway such as IVR, B-ACD, CAC, Calling Routing Maniplution, etc.

The main difference between Tcl and VoiceXML is that the router executes a Tcl scripts by it self (the script can be stored locally or remote location), whereas a VoiceXML script is a client-server model. If the gateway associates a call with a VoiceXML application, the application loads the appropriate VoiceXML document that can call for the gateway to interact with various web applications. This document might play audio prompts and collect digits. You can load additional VoiceXML documents based on the caller input.

Note: MGCP is not supported with Tcl or VoiceXML applications. To support applications, the gateway 

Deploying TCL Scripts and VoiceXML

For TCL scripts below are the required steps:
1.       Load the script to flash memory or the TFTP server
HQ#dir
Directory of flash:/

   47  -rw-       30421  Jan 24 2010 00:37:46 +00:00  app-b-acd-3.0.0.2.tcl
   48  -rw-     1016832  Jan 24 2010 00:37:36 +00:00  app-b-acd-3.0.0.2-ReadMe.txt
   49  -rw-       55599  Jan 24 2010 00:38:06 +00:00  app-b-acd-aa-3.0.0.2.tcl
2.       Load the associated audio prompts to flash memory or the RTSP server
HQ#dir
Directory of flash:/

    7  -rw-       75650  Jan 24 2010 00:38:30 +00:00  en_bacd_allagentsbusy.au
    8  -rw-       83291  Jan 24 2010 00:38:58 +00:00  en_bacd_disconnect.au
    9  -rw-       63055  Jan 24 2010 00:39:20 +00:00  en_bacd_enter_dest.au
   10  -rw-       37952  Jan 24 2010 00:39:34 +00:00  en_bacd_invalidoption.au
   11  -rw-      496521  Jan 24 2010 00:42:08 +00:00  en_bacd_music_on_hold.au
   12  -rw-      123446  Jan 24 2010 00:42:48 +00:00  en_bacd_options_menu.au
   13  -rw-       42978  Jan 24 2010 00:43:04 +00:00  en_bacd_welcome.au
3.       Initialize the application

application
   service application-name location

4.       Specify the initial local parameter values

application
   service application-name
   param parameter-name value

5.       Configure the dial peers to use the script or ephone-dn/voice register pool.

dial-peer voice ID [voip|pots]
   service application-name

or

ephone-dn ID
   application application-name

or

voice register pool ID
   application application-name

TCL/VoiceXML services are applied to inbound dial-peers (inbound calls only). To apply them to outbound calls,

dial-peer voice ID [voip|pots]
   service application-name outbound

6.       TCL scriptes can call packages. Packages are C subrouties or functions which can be called by the main script (program). Packages should be uploaded to flash or TFTP server and defined as below:

package package-name location

Then the package can be called using its name in the TCL script. To check all available packeges use the command show call application voice summary

7.       Specify the initial global parameter values
Parameters have two types: local and global. Local parameters are defined per script (you can have two local parameters sharing same name in two different scripts. Each will be initialized individually) while global parameters are shared between all scripts.

Global parameters initialization is applied in one location and will impact the same parameter in all scriptes sharing it. An example of global paramters are package parameters.

Below command can be used to initialize global parameters:

paramspace parameter-namespace parameter-name parameter-value

This can be applied per dial-peer,  service level (global), per-package with precendece order from high (dial-peer) to low (package) in case same initialization applied at differnet locations.

Note: If you change a parameter value, you must reload the script for the changes to take effect.

For VXML deployments:
1.       Initialize the application

application
   service application-name location

Note: The location of the VXML should point to VXML server, e.g. Mobile Voice Access
2.       Configure the dial peers to use the application or ephone-dn/voice register pool.

dial-peer voice ID [voip|pots]
   service application-name

or

ephone-dn ID
   application application-name

or

voice register pool ID
   application application-name

TCL/VoiceXML services are applied to inbound dial-peers (inbound calls only). To apply them to outbound calls,

dial-peer voice ID [voip|pots]
   service application-name outbound
3.       Configure an outbound dial peer (SIP/H323) pointing to VXML server.

Note: Inbound dial-peers providing TCL/VXML applications can’t be used for other purposes, e.g. normal inbound PSTN calls.

Tuesday, November 16, 2010

UCCX - Understand & Configure HTTP Contacts

HTTP contact is similar to call contact which is triggering a script to run, however; in this case UCCX will accept web contact/trigger to run the script. The user should browse a URL that is configured in UCCX as http trigger.

HTTP trigger will link to an application that is associated with the script that contains http steps. 

UCCX uses port 8080 for http trigger and the URL should follow the following format:
http://(UCCX-Name or UCCX-IP-Addr):8080/(URL)
The (URL) variable will be explained below.

You may need to map the IP and/or perform port redirection in order to publish this page for internet or intranet users (specially port redirection since normal users don't prefer to type ports in the URL). This can be done with NAT devices such as routes or firewalls and UCCX functionality won't be affected.

Below are the steps to create HTTP contact:

1. Create and upload a script (we will assume that its already present and uploaded to UCCX)
2. Create an application and associate it with the script (this is exactly similar to call contact application)
3. Create HTTP trigger as below (Subsystems > HTTP)


Below is a simple script that can be used by ACD agents to view queue statistics. Using this script agents will browse the URL http://queuestatistics.com which will trigger http contact that collects statistics from UCCX real time reporting tool about queue statistics and generate the report. 

Note that template document keywords (document variables which should modified) can be entered/typed manually in "keyword transform step" or imported from template itself. This can be done by selecting import button then selecting the template which contains the keywords between % signs (you can see this in HTML template at the end of the blog).
 
Here is the summary of script steps:

1. Obtain http request method and save it in REQUEST_METHOD string variable (this is for my own purpose. I used it during debugging to realize HTTP requesting method and found it GET)
2. Get two parameters (queue statistics) from UCCX real time reporting tool which are "excepted wait time" and "average talk time" and save them in two integer variables which are "IPCCNotReady" and "AgentAverageTalkTime" respectively.
3. Load "queue statistics report" template (which is HTML template) in document variable DOC. The HTML file is listed below and should be uploaded in UCCX (Applications > Documents)
4. Update the template keywords with the integer variables values filled in step 2. This is done using "Keywords Transform Step".
5. Send the resulted document/report to requester as HTTP response. 

Below is snapshot sample of generated report ,




Also, here is the code for HTML report template/document




UCCX - Agent State after Call Completion

Below diagram explains how agent state will change after completing ACD call.

DNS Performance Troubleshooting

When you are troubleshooting internet performance, there are different parts of the connection should be verified:   ·         DNS Pe...