04-16-2012 04:28 AM - edited 03-19-2019 04:45 AM
Dear all,
Please pardon me if have asked this question in the worng place. I'm new to this forums and not familer with the way around.
I wish to build an application using JTAPI connected to UCCX which will provide an CRM integration which will facilitate making calls from agent phones to customer numbers.
I have working code {Attached bellow, which has been refernced} with Agent Extensions but I have faced an issue while integrating with the CRM.
The CRM can only supply the Agent ID not the Agent Extension. My code works using the agent Extension.
I tried but I was not able to find comeup with a soulution which will present the agent extension when the Agent ID is passed.
Please help me to find a way to get the Agent extension using the Agent ID.
Thank you in advance.
--Current code which uses agent extension--
import javax.telephony.*;
import javax.telephony.events.*;
import com.cisco.cti.util.Condition;
public class MakeCall {
public MakeCall(String[] args) throws Exception {
String hostname = args[0];
String login = args[1];
String passwd = args[2];
String src = args[3];
String dst = args[4];
/* start up JTAPI */
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
/* connect to the provider */
String providerString = hostname;
providerString += ";login=" + login;
providerString += ";passwd=" + passwd;
Provider provider = peer.getProvider(providerString);
/* wait for it to come into service */
final Condition inService = new Condition();
provider.addObserver(new ProviderObserver() {
public void providerChangedEvent(ProvEv[] eventList) {
if (eventList == null)
return;
for (int i = 0; i < eventList.length; ++i) {
if (eventList[i] instanceof ProvInServiceEv) {
inService.set();
}
}
}
});
inService.waitTrue();
/* get an object for the calling terminal */
Address srcAddr = provider.getAddress(src);
srcAddr.addCallObserver(new CallObserver() {
public void callChangedEvent(CallEv[] eventList) {
}
});
/* and make the call */
Call call = provider.createCall();
call.connect(srcAddr.getTerminals()[0], srcAddr, dst);
}
public static void main(String[] args) {
try {
new MakeCall(args);
} catch (Exception e) {
e.printStackTrace();
} finally {
System.exit(0);
}
}
}
04-16-2012 04:36 AM
Hi Sudeera,
I am not good at coding :-), but looking into your requirement, you want to know "Agent extension using the Agent ID".
If you access the UCCX Admin->Subsystems->RmCm->Resoures page, click on any resource you will see the Resource ID and the IPCC Extension.
Hope it helps.
Anand
Please rate helpful posts by clicking on the stars below the right answer !!
04-16-2012 10:09 PM
Dear anchoudh,
Thank you for your suggestion,
I belive the method illustrated is for getting list of extensions.
What I require is to programiatically get the Agent extension, by passing Agent Id as the input parameter.
Your words are much appriciated.
Thank you again.
04-22-2012 11:22 PM
I managed to devise a soulution.
FYR
Thank you.
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