cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1273
Views
0
Helpful
6
Replies

Regarding cisco jtapi isRegisteredByThisApp() and isRegistered() api's in the CiscoMediaTerminal class

posenthi
Level 1
Level 1

Hi,

We are calling the CiscoMediaTerminal.register(java.net.InetAddress address, int port, CiscoMediaCapability[] capabilities)during our application startup to register the CTI port for further use .Before we invoke this api we call the isRegistered() or isRegisteredByThisApp() api's to check whether the CTI Port is already registered or not.But for the very first it works as expected.So after the api invocation we get the boolean flag as true since it is registered.But we run the application next time onwards isRegistered() or isRegisteredByThisApp() api's return false even though it should return true.So because of this when we try to call the register(java.net.InetAddress address, int port, CiscoMediaCapability[] capabilities) API it fails giving com.cisco.jtapi.CiscoRegistrationExceptionImpl error (Device registration failed as device is registered with Static media termination).I guess this could be a bug in the API.Please help me in this regard.

Regards

Senthil

6 Replies 6

mpotluri
Level 5
Level 5

Are there other instances of the app trying to register the same CTIPort? When static registration is used only 1 app can register the CTIPort. Can you attach the JTAPI logs after the time application is started to get a better understanding?

When we try to register the same CTI port second time isRegisteredByThisApp() and isRegistered() should return true .Am I correct? What do you mean by static registration? Will attach the logs once I get this error.But this error happens very frequently.

If the isRegisteredByThisApp() and isRegistered() does not give the expected result , then can you provide me sample code for dynamic CTI Port registration please?

After the first registration if the application is closed the CTIPort will return to unregistered state. On CUCM admin you should see 'unregistered' after application is closed or if provider is shutdown. Between the 2 registration attempts is the application getting closed or provider shutdown?

Do you have more than 1 instance of the app running ?

If you specify ipaddress/port in register API you are doing static registration. Cisco JTAPI supports dynamic registration where the IP address/port can be specified when media is setup.

Yes,when the application starts up first time we do a static registration and immediately after this we could see the port is registered . Then we close the application and restart the application  and try to register the CTI port, that time we get the error. But at the same time only one instance of the application is running.

Can you check if status of CTIPort is changed to 'unregistered' when application is closed on CUCM admin ?

Can you collect JTAPI logs from the time application starts up to the time you see the issue and attach it?