cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5058
Views
5
Helpful
26
Replies

Can JTAPI control calls between different Providers

Simon_New1
Level 1
Level 1

Hi all,

Please give me some ideals about "call controls between different JTAPI Provider instances".

I use the Cisco JTAPI Test Tool to test JTAPI functions based on Devnet sandbox labs.

Some time when the JTAPI Test tool can detects the calls which are triggered out of the tool, and sometime, it only can get the calls which are made from itself. So, please help to confirm that one JTAPI provider can detect the call/conferences which are triggered by another JTAPI instance.

For example: (use the same connection strings)

Provider provider1 = JtapiPeerFactory(null).getProvider(".....");

Provider provider2 = JtapiPeerFactory(null).getProvider(".....");

provider1.makeCall()...

provider2.getCalls()

How to make the "provider2.getCalls()" contains the calls which are made via provider1? or the Cisco JTAPI implement does not support things like that?

I test the above, it cannot work (the provider2.getCalls() does not contains the call triggered by provider1, thought the call does exist there)

Simon

26 Replies 26

Vlad,

   Currently there is no mechanism to correlate the call between 2 clusters except for comparing the calling and calling address names.

   Same applies for software originated calls as well.

Thank you for you answer. Do you know if CUCM Session Management Edition will report those calls and do the matching based on a caller/callee?
Also, is there a way to set the callerId programatically via Jtapi? That would at list allow to send out of band notification to another provider object and correlate the calls.

Thank ahead
Vlad

Vlad,

   selectRoute API will allow applications to change the calling party number seen by called party. You could potentially intercept the call at Route Point and use this API to change the calling party number and then correlate it at the other end.

To use this feature application should have 'Standard CTI Allow Calling Number Modification' role. HTH

Thanks for getting back to me quickly. Another question I have is about the called/calling party transformation. Is there an easy way to transform numbers to E.164 using either AXL or Jtapi?

selectRoute is the only JTAP API that will allow applications change the calling party. It doesn't have any interface to change the called party to a E.164 number. You probably need to configure translation pattern to accomplish it.

Hi Vlad

Do you have the solution to correlate the call between 2 clusters?

I faced the same challenge.

And I register Call Observer, Address Observer and Route Callback to the route point (a special address), there is no useful information is captured.

any suggestion is appreciated.

Simon

Hi Simon,

We indeed solved it, however the solution is not very straight forward; we keep a collection of all open calls, and when we try to add to the collection, we iterate over it and try to match calls by participants' phone numbers (caller and callee switch of-cause).
That seems fairly simple, however, numbers some times transformed from 7 digit (tie+ext) to E.164 and vice versa. So we need to apply the same transformation pattern as UCM but in reverse direction. Basically we try to match calls by either last 4 digits or last 7 digits of the number. In addition to that we maintain our own global call ID; once we decide that we add a call to a collection, we generate a unique call ID and collection stores a list of related 'local' call IDs' + the name of the cluster that reported it.

It is very unfortunate that we can't get it out of the box, and that we need to reproduce Genesys approach ourselves. I'd expect Cisco to support this feature, or at least allow calls to be tagged with a custom field, which would make it to SIP header and be reported on the other side (which would still leave PSTN calls out).

I hope it helps somehow..

Vlad

Hi Vlad,

Thanks a lot  for you quick response.

Simon

perlocper
Level 1
Level 1

Hi all,

I wonder if JTAPI(version 9.1) can control calls between different Providers, which are created with different login credentials.

Provider provider1 = JtapiPeerFactory(null).getProvider("user1,pass1");

Provider provider2 = JtapiPeerFactory(null).getProvider("user2,pass2");

provider1.makeCall()... user1 to user2

provider2.getCalls() can user 2 answer that call?

When I tried this scenario, the TerminalConnection of the user2's address comes null. So for now, I could not solve the problem.

My aim is to create providers for each of the end users instead of using a single app user. Is it supported?

Any ideas?

Thanks.

yes. it is possible to do this with 2 providers.  You will need a wait between provider1.makecall() and provider2.getCalls().

In this case each provider will have 1 call each and each call will have 1 terminal connection. When you see terminal connection in ringing state in provider2, application will be able to answer it.

Thanks for the reply. But I couldn't solve the issue yet. Can you please look at the following codes?

Before making call, I create 2 different providers for each end users ( which are source and destination)

For makeCall:

  Address myAddr = providerSrc.getAddress(origAddrStr);

  Address myDstAddr = providerDst.getAddress(dialoutNumber);

  Terminal myTerm = myAddr.getTerminals()[0];

  Terminal myTermDst = myDstAddr.getTerminals()[0];

/* adding observers before makeCall */

  myAddr.addCallObserver(new MyObserver());

  myDstAddr.addCallObserver(new MyObserver());

  myTerm.addObserver(new MyObserver());

  myTermDst.addObserver(new MyObserver());

  call = providerSrc.createCall();

  call.connect(myTerm, myAddr, dialoutNumber);

For answerCall (I send the destination address as parameter):

(I wait for a few seconds before sending this request, but the TerminalConnection on destination is still null)

public static void answer(Call call, String monitoredAddr) throws InvalidArgumentException, ResourceUnavailableException, MethodNotSupportedException {

  Address myMonitoredStationAddress = providerDst.getAddress(monitoredAddr);

  Terminal myMonitoredStationTerminal = myMonitoredStationAddress.getTerminals()[0];

  Connection localConn = null;

  TerminalConnection[] terminalConns = null;

  // Get all the connections related to this call object

  Connection connection[] = call.getConnections(); // It gets both 2 connections which are established and alerting states

  for( int conn_index = 0; conn_index < connection.length; conn_index++)

  {

       // get the connection object

       localConn = connection[ conn_index ];

       System.out.println("localConn ["+conn_index+"] :" +localConn);

       System.out.println("Address :" +localConn.getAddress());

       terminalConns = localConn.getTerminalConnections();

       if( terminalConns == null ){

            System.out.println("No valid TerminalConnection found."); // Here what I get for 2nd connection

       return;

       }

  }

       // There are some other codes but never comes so far, since the terminaleconnection is null for destination

  }

The output of the following method is:

localConn [0] :[5223002::1/(P1-5223002) GCID=(1,6303)->ACTIVE]->ESTABLISHED

Address :5223002

localConn [1] :[5223001::1/(P1-5223002) GCID=(1,6303)->ACTIVE]->ALERTING

Address :5223001

No valid TerminalConnection found.

Do you have any ideas what i am missing?

Thanks.

Since destination is in another cluster (2) , provider in cluster (1) will not have any terminal connections for called.

Provider (2) in cluster (2) will have terminal connections if application adds a call observer on destination in provider (2).

The providers are independent of each other. Provider (1) will have a call with terminal connection of the caller and only connection to called address. Provider(2) will have terminal connection of the called address and only connection of calling address.

Also you need to do:

provider1.getAddress(origAddrstr).addCallObserver()

provider2.getAddress(destination).addCallObservers()

(Try catch blocks are not included for brevity)

To answer:

provider2.getAddress(destination).getTerminal().getTerminalConnections[0].answer();

Getting Started

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: