on 01-24-2014 03:52 PM
I would use AXL to query the UCM for the IPCC Extension for the User ID.
On Tue, Apr 17, 2012 at 1:13 AM, Cisco Developer Community Forums <
cdicuser@developer.cisco.com> wrote:
> Sudeera Jayasekara has created a new message in the forum "Cisco JTAPI
> Questions":
>
> --------------------------------------------------------------
>
> Dear all,
>
> I wish to build an application using JTAPI connected to UCCX which will
> provide an CRM integration that facilitates making calls from agent phones
> to customer numbers.
>
> I have working code {Attached bellow, which has been referenced} which
> uses an Agent Extension as the source address.
>
> Although my code works, I have faced an issue while integrating with the
> CRM. The CRM can only supply the Agent ID, CRM cannot supply Agent
> Extension. My code works using the agent Extension.
>
> I tried but I was not able to find come up with a solution 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* 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);
> }
> }
> }
> --
> To respond to this post, please click the following link:
>
> <
> http://developer.cisco.com/web/jtapi/forums/-/message_boards/view_message/5474038
> >
>
> or simply reply to this email. *
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: