02-12-2014 01:57 AM
I am developing an custom application. I want when any call receive at agents end , a pop will show which contain the campaign id of that call.
The process is that, we define certain campaign , then our Outbound dialer dial the number and connection will establish between agent and customer. Agents need to ask specific question according to the campaign so i need to know that, this call belongs to which campaign by recognizing the campaign id. So can any body know that how can we get the campaign id for the caller.
I have some knowledge development of CTI custom application.
Solved! Go to Solution.
02-12-2014 06:51 AM
See the Outbound Option Guide section “Outbound Option Extended Call Context Variables”
http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/outbound_option/outboundoption9_0/installation/guide/UCCE_BK_O4A87BBC_00_outbound-option-guide-for-cisco/UCCE_BK_O4A87BBC_00_outbound-option-guide-for-cisco_chapter_010.html#UCCE_RF_O3B15ECD_00
The ecc variable BACampaign contains the campaign name
02-12-2014 06:51 AM
See the Outbound Option Guide section “Outbound Option Extended Call Context Variables”
http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/outbound_option/outboundoption9_0/installation/guide/UCCE_BK_O4A87BBC_00_outbound-option-guide-for-cisco/UCCE_BK_O4A87BBC_00_outbound-option-guide-for-cisco_chapter_010.html#UCCE_RF_O3B15ECD_00
The ecc variable BACampaign contains the campaign name
02-13-2014 04:11 AM
Thank you so much for your reply,
Here is the code which i have write but its not working for me.
Call CallObject=new Call(vCtiOsSession,eventArgs);
if(CallObject != null)
{
logger.debug("The call is passed to agent");
System.out.print("The call is passed to agent");
try
{
Arguments rArgEcc=new Arguments();
rArgEcc = CallObject.GetValueArray(CtiOs_IKeywordIDs.CTIOS_ECC);
System.out.println(rArgEcc+"Arguemtns value");
System.out.println("Variabl eone"+rArgEcc);
String name=CallObject.GetValueString("BACampaign");
System.out.println("First name"+name);
if(null != rArgEcc)
{
System.out.println("IN the main agent now");
logger.debug("Getting the data of calls ");
rArgEcc.NumElements();
String First = rArgEcc.GetValueString("FirstName");
String Second=rArgEcc.GetValueString("LastName");
System.out.println("Here is the First Name" + First);
System.out.println("Here is the Second Name" + Second);
logger.debug("Here is the First Name" + First);
logger.debug("here is the Second Name" + Second);
String url_open ="https://www.google.com.pk/#q="+First;
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url_open));
logger.debug("The URL has been opened");
}
}
catch(Exception e)
{
}
}
}
but i am getting Null value in arguments as well as in the ECC variable which i am getting through variable FirstName , LastName
02-13-2014 07:20 AM
Try using the GetCallData method of the call object to get all the Callvariables and ECC variables.
02-13-2014 07:45 AM
Are you getting callvariable1..callvariable10? ECC variables should have “user.” In front of the name.
Try doing a eventArgs.dumpArgs to see what is getting passed.
02-13-2014 07:57 AM
Not sure what your code here is doing:
Call CallObject=new Call(vCtiOsSession,eventArgs);
You should get the call object from session this way:
retValue = pIArguments.GetValueString(Cisco.CtiOs.Util.Keywords.Enum_CtiOs.CTIOS_UNIQUEOBJECTID, out m_uid);
// get callpointer and store it
retValue = m_ctiSession.GetObjectFromObjectID(m_uid, out tempCall);
m_ctiCall = (Call)tempCall;
Then get the call data using
m_callData = m_ctiCall.GetCallData();
LogEvent(m_callData.dumpArgs());
m_callData.GetValueString(“user.BACampaign”);
02-13-2014 08:03 AM
Actually it should be
m_ecc = m_callData.GetValueArray(“ECC”);
m_name = m_ecc.GetValueString(“user.BACampaign”);
02-13-2014 08:24 AM
Thanks for your reply dlender,
Can you please tell what is m_ecc and m_name?
02-13-2014 08:29 AM
They are just local variables.
define m_ecc as
Arguments m_ecc = new Arguments();
And m_name as
String m_name;
02-13-2014 08:42 AM
Yes i am doing exactly in the same way but i am getting null value in the m_ecc as well as m_name..I don't know why??
Call CallObject2=new Call();
Arguments m_ecc = new Arguments();
m_ecc = CallObject2.GetValueArray("ECC");
String m_name = m_ecc.GetValueString("user.BACampaign");
System.out.println("Here is name"+m_name);
02-13-2014 09:59 AM
Are you able to get any of the properties of the Call object? Are you able to get a standard call variable? Your code snippet does not show accessing the call object from the the ObjectId that should be in the arguments array passed to your routine.
Nor does it show using the GetCallData method of the call to get the Callvariable arguments array and then invoking GetValueArray(“ECC”)
Are you modifying a sample from Cisco or did you write this application from scratch? How are you obtaining the call object for the current call?
02-13-2014 10:20 PM
!Yes i am modifying Cisco code which is available here.
I am getting that where should i pass callid, and where i should get this CallID.
here is my complete code.
public void OnCallDelivered(Arguments eventArgs)
{
System.out.println("On call delivered");
Call CallObject=new Call(vCtiOsSession,eventArgs);
String uniqueObjId = eventArgs.GetValue(CtiOs_IKeywordIDs.CTIOS_UNIQUEOBJECTID)+"";
{
if(CallObject != null)
{
logger.debug("The call is passed to agent");
System.out.println("The call is passed to agent");
try
{
Arguments m_ecc = new Arguments();
Arguments m_second=new Arguments();
m_ecc=CallObject.GetCallData();
m_second =CallObject.GetAllProperties();
// m_ecc = CallObject.GetValueArray("CTIOS_ECC");
String m_name = m_ecc.GetValueString("CampaignID");
System.out.println("Here is name"+m_name);
}
catch(Exception e)
{
}
}
}
}
02-14-2014 07:23 AM
Try looking at the JavaPhone sample that is installed with the CTIOS Toolkit in
C:\Program Files (x86)\Cisco Systems\CTIOS Client\CTIOS Toolkit\Java CIL\samples\JavaPhone
Your OnCallDelivered handler is not correct.
Note the sample shows in EventSink.java setting the current call appearance in the onCallBegin handler:
// Get a reference to the call object, reset as our default call
String sUID = rArguments.GetValueString(CTIOS_UNIQUEOBJECTID);
Call rCall = (Call) m_ctiSession.GetObjectFromObjectID(sUID);
m_ctiSession.SetCurrentCall(rCall);
Then see in m_btnGetData_MouseClicked ( you could add this code to your call delivered handler) how the call data arguments are retrieved from the call object:
// Retrieve currently active call object
Call rCall = m_ctiSession.GetCurrentCall();
if (rCall != null)
{
AddLogMessage("Requesting to get Call Data");
Arguments rCallDataArgs = rCall.GetCallData();
LogEvent("GetCallData returns:", rCallDataArgs);
}
else
{
AddLogMessage("No active call to get data from.");
}
Once you have the rCallDataArgs you can retrieve the ECC variables from them
Via
rCallDataArgs.GetValue(CTIOS_ECC, rECCArgs);
rECCArgs.GetValue(“user.BACampaign”, myCampaign);
where rECCArgs is defined as an arguments array that will receive the ECC arguments array
and myCampaign is a string that will receive the value of user.BACampaign.
02-15-2014 01:58 AM
Dlender thank you so much for you cooperation. I really appreciate this but the problem still exist. I am exactly following your recommendations.
I am getting the current call by this code
String uniqueObjId = eventArgs.GetValue(CtiOs_IKeywordIDs.CTIOS_UNIQUEOBJECTID)+"";
Call rCall = (Call) vCtiOsSession.GetObjectFromObjectID(uniqueObjId);
vCtiOsSession.SetCurrentCall(rCall);
rCall = vCtiOsSession.GetCurrentCall();
I am running my program in a debugging mode i can see the value here is the screen shot
Here you can see i can get the call related data like ani,skillgroupid, calleddevice, service number etc. I have matched this record from (AW)TCD (Termination call detail) and its exactly like that. but when i try to access its variablevalue like variable1 ,variable2 upto 10 i am not able to get that. But infect i am passing this variable from ICM. I can see these variable in TCD table. But here what i got when i try to access variable value i can access variable but its give me null or " " empty value. I am not able to find why this happening.
02-17-2014 08:35 AM
It looks to me from your second image that the Callvariables are empty. Have you tried logging all of the Call object properties? Perhaps the Callvariables have not yet been assigned to the call object when you are processing this event?
Which event handler is your code in? Sometimes call data does not arrive in the Begin Call but arrives in a subsequent CallDataUpdate event.
I suggest you log all the event arguments each time an event is fired and then examine your log to see when the callvariables arrive.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide