cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
903
Views
1
Helpful
3
Replies

provider.getAddresses() returns old directory numbers (after restart)

lciesielski
Level 1
Level 1

Hello,

We had some changes on Cisco UCM administration regarding directory numbers assignment to users.

All the new directory numbers are associated with our application user and have "Allow Control of Device from CTI" checked.

Now after these changes when I restart my application and call provider.getAddresses() then I get a list of numbers but some of them have values from before the changes. It also looks that the list changes every couple hours without any changes in Cisco UCM administration. 

What could cause issue like this and how can I get the system back in sync?

Best regards

Lukasz

1 Accepted Solution

Accepted Solutions

Yes, just printing addresses[i].getName() there.
But we managed to fix it by recreating the CTI application user and are getting the expected and unchanging list of addresses again.

View solution in original post

3 Replies 3

npetrele
Cisco Employee
Cisco Employee

Is this how you're getting the addresses? From https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/jtapi_dev/11_5_1/CUCM_BK_C04D9E75_00_jtapi-developers-guide_1151/CUCM_BK_C04D9E75_00_jtapi-developers-guide_1151_chapter_00.html

 

public void getProvider ()
{
  try
  {
    JtapiPeer peer  =  JtapiPeerFactory.getJtapiPeer ( null );
    System.out.println ("Got peer "+peer);
    Provider provider  =  peer.getProvider("cti-server;login = username;passwd = pass");
    System.out.println ("Got provider "+provider);
    MyProviderObserver providerObserver  =  new MyProviderObserver ();
    provider.addObserver(providerObserver);
    while (outOfService )
    {
      Thread.sleep(500);
    }
    System.out.println ("Provider is now in service");
    Address[] addresses  =  provider.getAddresses();
    System.out.println ("Found "+ addresses.length +" addresses");
    for(int i = 0; i< addresses.length; i++)
    {
      System.out.println(addresses[i]);
    }
    provider.shutdown();
    catch (Exception e)
    {
    }

  }

 

Yes, just printing addresses[i].getName() there.
But we managed to fix it by recreating the CTI application user and are getting the expected and unchanging list of addresses again.

Wonderful, glad to hear you got it working.