Platform SDK 8.1, how to get EventResourceInfo from TServer [JAVA]

Hi all, hope this not a dull question to ask, but i’ve failed to find ANY info on the subject.

I’m trying to build a little application on java, that monitors MCP resources and for that i need to get EventResourceInfo from TServer, but i can’t find the proper request, that could return to me that event.

Thanks in advance for your help.

Artem.

Not sure what you are trying to monitor but:

http://www.genesyslab.info/repository/PSDK/8.0-Java_API_Reference/com/genesyslab/platform/voice/protocol/tserver/events/EventResourceInfo.html

Thanks for reply, but I know what is this event and how to create instances of it. But what I need is for TServer to answer on my request with this event. And I can’t find info on which type of request should it be. Or perhaps I could somehow subscribe for this events?

As it is a TServer event, guess would be a simple listener of the MessageId:


switch(response.messageId())
{
case EventResourceInfo.ID:
  //Whatever you wanna here
case EventError.ID:
  //Whatever you wanna here
  ...
}

This is not a problem too. This response should come after some request to TSereverProtocol. The exact type of this request is what I am looking for.

Thank you for trying to help me btw. Really appreciate it.

Try to register DN with “Tenant” name. On that level event of type EventResourceInfo should be fired.

Also I guess there is no way to “Ask” how many ports are available. Seems to be automatic:


@13:55:12.7770 [0] 8.0.300.48 distribute_event: message EventResourceInfo
 AttributeEventSequenceNumber 00000000000a51cb
 AttributeTimeinuSecs 777000
 AttributeTimeinSecs 1320481512 (13:55:12)
 AttributeExtensions [46] 00 02 01 00..
  'available-ports' 2200
  'total-ports' 2200
 AttributeThisDN 'SouthHubSIP05'
13:55:12.777 Trc 04542 EventResourceInfo sent to [508] (00000004 SHAGOBD_OCS01P 10.96.156.30:60898)
13:55:12.777 Trc 04542 EventResourceInfo sent to [488] (00000003 SHAGOBD_OCS01B 10.96.156.39:59998)

It must be possible - ICON can retrieve these messages/events. As I wrote above, try to Register DN which serves for this purpose.

What I meant is that you can “listen” on how many ports are free, but not “ask” as seems SIP Server reports it based on the OPTIONS message

Yes, that is right. The event is based on and fired by information received by RM.

Yes! That did it! Thank you, guys!