cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1074
Views
2
Helpful
3
Replies

JTAPI Get Agent Extension from Agent ID

sudeera.kbsl
Level 1
Level 1

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);

}

}

}

3 Replies 3

anchoudh
Level 9
Level 9

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 !!

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.