Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: thmuche on February 04, 2016, 10:29:23 AM
-
I'm using the below script in CCPulse 8.0.200 to get ANI that works normally:
result.Text = state.type == "AgentState" ? ANI() : "n/a";
function ANI()
{
var r = ""
for(var i = 0; i < state.CallData.Count; i++)
{
var cd = state.CallData.Value(i);
r = cd.ANI
}
return r;
}
Someone knows if changed this functionality in version 8.1.100 ? Because I did the upgrade to this version and stopped work.
-
Will work only if ANI is part of attached data, not the ANI attribute itself. Meaning that you need to do something on your strategy first, grab Ani and attach as UserData
-
I didn't have ANI in attachdata and works in version 8.0.200, I can get also DNIS information with this function:
result.Text = state.type == "AgentState" ? DNIS() : "n/a";
function DNIS()
{
var r = ""
for(var i = 0; i < state.CallData.Count; i++)
{
var cd = state.CallData.Value(i);
r = cd.DNIS
}
return r;
}
To get the attachs I use another function (this function keep working in version 8.1.100):
result.Text = state.type == "AgentState" ? Attachs() : "n/a";
function Attachs()
{
var r = "";
for(var e= new Enumerator(state.CallData.Filter("")); !e.atEnd(); e.moveNext())
{
r += e.item().Key + "-" + e.item().Value + " | ";
}
return r;
}
I know that I can put the ANI information in attachdata and use script above, but is more simple if just I get the attribute information like in version 8.0.200. To bad if took off this function at new version.
-
Weird...
You are testing with external calls, right? ANI is not present on internal calls for example
-
Yes... Call type is Inbound. I will try attach a print.
-
Enable CCPulse logs, maybe there is something usefull there
-
I will try this! in console inside CCPulse don't show nothing...
-
I configured the log and in CCPulse 8.1.100 the information about ANI and DNIS is really comming null:
action[1]:StateDNAction{
action:LoggedIn(2)
startTime:2016-02-05 08:04:35
data:DataCall{
connID:0000000000000000
DNIS:{NULL}
ANI:{NULL}
In CCpulse 8.0.200 this information doesn't even appear in logs, but works ;D. Something is wrong in version 8.1.100 :/, I will look the statserver logs to find the start of statistic and see if have something different.
-
Why would there be an ANI/DNIS on a LoggedIn event?
You sure that is shown on a call monitoring?
-
Ops.. my mistake. You are right.. I looked just the first status of agent, in Inbound status the ANI is showing:
action[3]:StateDNAction{
action:CallInbound(22)
startTime:2016-02-05 10:18:52
data:DataCall{
connID:XXXXXXXXXXXXXXX
DNIS:70XXX
ANI:11XXXXXXX
userData:TKVList{
XXXXXXXXXXXXXX}}}
But now is more confuse... :/
-
Try something...using the same script you have, write each value of the state.CallData.Value to a text file. I suspect there might be a coding issue and not a value one.
Write them to a TXT file for example
-
After some hours trying... ;D Follow the script that works in this version:
result.Text = state.type == "AgentState" ? ANI() : "n/a";
function ANI()
{
var r = "";
for(var e = new Enumerator(state.CallData); !e.atEnd(); e.moveNext())
{
var arrItems = e.item().toString().split(",");
for (item_ in arrItems) {
var kvp = arrItems[item_].split("=");
if (kvp[0].toUpperCase() === "ANI") {
return kvp[1];
}
}
}
return r;
}
For some reason the properties of CallData really stopped works in this version...
-
Nice! Thanks for sharing
Just for curiosity can you post a screenshot on how this is displayed?
Thanks
-
I had to hide sensitive informations...
[img width=640 height=348]http://s21.postimg.org/vkgfwlf5z/teste.png[/img]
-
Awesome! Thanks a lot! I am sure this will help a lot of guys :D