Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Timur Karimov on August 17, 2009, 01:18:08 PM
-
Hi All,
another strange question - does any one know where in interaction/contact database Genesys store the attached user data? or any other way to get key same as GSIP_REC_FN from Genesys but with out using API ?
WBR Tim
-
Hi Tim,
UserData are stored in the "interaction" table in the column "AllAttributes". Unfortunately, data are stored as binary object so it nearly impossible to read them using SQL language. If you want to read just a few keys from UserData you can configure Universal Contact Server to store value of these keys to special columns available in "interaction" table. These columns are named "StrAttribute<number>" (10 columns) and "IntAttribute<number>" (5 columns). Read chapter "Making an Attached Attribute Sortable" of "Multimedia 7.6 Selected Conceptual Data Models for the UCS Database" document for instruction how to configure UCS.
Hope it helps you.
R.
-
Rene, it's work like the contact attribute ? great. but also terrible. coz, it work for new interaction and no way to convert old millions of interaction =(
however, fanx very match.
-
[quote]coz, it work for new interaction and no way to convert old millions of interaction =([/quote]
If you need to do the conversion for old interactions then the only option is to write an application that will read binary data from database, recode it, read value of defined key and store it back to database.
R.
-
C# code snipet for read and decode AllAtribute value
read it to array and after it do :
string mime = Convert.ToBase64String(bytes.ToArray(), Base64FormattingOptions.InsertLineBreaks);
byte[] mb = Convert.FromBase64String(mime);
char [] str = new char[8000]; int i =0;
foreach (byte b in mb)
{
if (b == 0) str[i] = ' ';
else
{
if (i > 0)
{
if (str[i - 1] != ' ')
{
str[i] = Convert.ToChar(b);
}
}
else str[i] = Convert.ToChar(b);
}
i++;
}
string all_interactions = new string (str);
in all_interactions u got samething like this:
M PegAGCPM CBR-contract_DBIDs RTargetPlaceSelected 7110_CPM RRequestedSkills ServiceType default RTenant Resources RTargetTypeSelected 2 RTargetObjectSelected CPM RTargetRuleSelected RRequestedSkillCombination RTargetObjSelDBID 106 RStrategyName Outbound RTargetRequested CPM CBR-Interaction_cost
GSIP_REC_FN recorder/7110/2009-08-19/3002_8FKOJ3T39D67P96TB45JG4MGG800002H.wav RVQID CBR-IT-path_DBIDs CustomerSegment default RTargetAgentSelected cag1 ServiceObjective RStrategyDBID 123 CBR-actual_volume