When you integrate Click to Call and CSC with an external CTI system, you need to provide the CTI system with a URL that accesses the Click to Call information. Before you can configure the eStara portion of the configuration, ensure that your external CTI system can produce a hash that CSC will be able to reproduce. Then, generate a script, for example,

/**
  *
  * Generates the URL that is used to spawn a CSC instance passing the required
  * parameters for a Click To Connect Session
  *
  * @param pURL
  *    The initial part of the CSC URL e.g. http://foo:8080/agent/main
  * @param pUsername
  *    The username of the CSC user
  * @param pCallerID
  *    The caller id of the customer
  * @return The fully qualified URL
  *
  */
public URL generateURL(String pURL, String pUsername, String pCallerID) throws \
MalformedURLException, UnsupportedEncodingException {

// hashKey is the secret key used to salt the hash, this secret key is also
//configured within CSC and should be identical to what is used here.
final String hashKey = "mySecretKey";

// hashingAlgorithim is the algorithm used to create the hash. The algorithm
//should be the same as is configured within CSC in order for CSC to recreate the
//hash.
final String hashingAlgoritim = "SHA1";

// hashText is the information that the hash is created from, the Agent username,
//customer telephone number and the hashKey.
String hashText = pUsername + pCallerID + hashKey;
String clickToCallURLString = "";
String hashString = "";

/*
 * Create hash of the username, callerID and the hashKey. The Hashing algorithm
 * used is SHA1, matching the hashing algorithm that CSC is configured to use.
 */
try {
  MessageDigest m = MessageDigest.getInstance(hashingAlgoritim);
  m.update(hashText.getBytes(), 0, hashText.length());
  hashString = new BigInteger(1, m.digest()).toString(16).trim();
} catch (NoSuchAlgorithmException nsae) {
}

/*
 * The URL is created from the initial CSC URL e.g http://foo:8080/agent, the
 * clickToCallInit parameter, the Agent username, the hash value, and the
 * telephone number of the shopper who initiated the click to call session
 */
clickToCallURLString += pURL + "?clickToCallInit=true&username="
  + URLEncoder.encode(pUsername, "UTF-8") + "&hash="
  + URLEncoder.encode(hashString, "UTF-8") + "&UserTelephoneNumber="
  + URLEncoder.encode(pCallerID, "UTF-8");

URL clickToCallURL = new URL(clickToCallURLString);

return clickToCallURL;
}

Once you have verified that your CTI system can produce the necessary hash and URL, create a script that integrates your system. The script should:

 
loading table of contents...