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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See the Outbound Option Guide section “Outbound Option Extended Call Context Variables”
The ecc variable BACampaign contains the campaign name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Try using the GetCallData method of the call object to get all the Callvariables and ECC variables.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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”);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Actually it should be
m_ecc = m_callData.GetValueArray(“ECC”);
m_name = m_ecc.GetValueString(“user.BACampaign”);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks for your reply dlender,
Can you please tell what is m_ecc and m_name?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
They are just local variables.
define m_ecc as
Arguments m_ecc = new Arguments();
And m_name as
String m_name;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!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)
{
}
}
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yes this is problem that i am getting " " empty values in the call variables.
I am accessing the variable in two events "OnCallEstablish" "OnCalldelivered"
but still i am not be able to get it when i use call.Getalldata().
Although i can get the getAllPropeties in which i can see different values like ani, pheriphraid, skillgroupid etc.
I don't know why i am not getting the callvariables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Try using the Java sample JavaPhone in the CTIOS Toolkit and see if you can get the CallData including the Callvariables in your environment. Also, does the out of box CTIOS Agent Desktop display the callvariables correctly in the call appearance grid?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dlender i am really grateful to your help but the problem is still un solved.
I just have install CTIOS tool kit on my local machine and i am able to receive call and can see call variable data .
They are receiving variable by calling one event which is OnCallBegin().
But when I have write OnCallBegin() event in my standalone application, its doesn't call by CTIOS, I don't know why its not calling this event, it's only return me OnDilvered, OnConnection, Onfailure, and oNEstablish event not CallBegin() event. Can you help in this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I suggest (again) that you try using the sample JavaPhone to verify that the Java CIL is receiving the events (including BeginCall) and the call variables. You will see all the events in the log window.
If after comparing your code to the code in the JavaPhone sample you are still unable to get your code working, I suggest you purchase the fee based SOW consulting from our Custom Engineering team.
You can contact them by sending an email to custom-application-request@cisco.com<mailto:custom-application-request@cisco.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.