1

How can I retrieve the call forwarding (routing) rules of a lyn client using UCMA or MSPL? I have tried to retrieve it using a UserEndpoint and subscribing to the PresenceNotificationReceived event of RemotePresenceView. Unfortunately this seems not to work. According to the msdn documentation it is only possible to query the route category with a local-access (LocalOwnerPresence).

Another options would be to use an ApplicationEndpoint of impersonate every user for which I want the retrieve the call forwarding rules. But in my eyes this seems to be a dirty solution.

Could this be also be done with MSPL?

Christoph
  • 158
  • 4

1 Answers1

0

In my tests this:

Another options would be to use an ApplicationEndpoint of impersonate every user for which I want the retrieve the call forwarding rules. But in my eyes this seems to be a dirty solution.

Has been the only working solution (outside of querying the database directly).

If you want this done in MSPL, look at QueryCategory. The problem there is you will need the correct ContainerNumber and Instance ids.

However, if you look them up (See MSDN for Presence data source and category instance ID) you will find there is no instance numbers listed for routing. The container number info can be found here: Routing category instance value element, and that one does list some instance IDs.

Interesting point is that routing data is classified as "local only", see Local-access only category instances:

The routing category instances contain routing rules to forward inbound calls made by any members of a hosting container. They are private category instances and are not visible to the remote users who are members of the hosting containers.

So far I have not found a combination of name ('routing'), ContainerNumber and Instance id that give any results, so please update if you find anything.

w5l
  • 5,341
  • 1
  • 25
  • 43
  • Yes, probably you have the `AutomaticPresencePublicationEnabled` property set to `true` in the user endpoint settings. This automatically publishes the user as online when you connect the endpoint. Set it to false and subscribe to presence manually: https://msdn.microsoft.com/en-us/library/office/microsoft.rtc.collaboration.userendpointsettings.automaticpresencepublicationenabled_di_3_uc_ocs14mreflyncuc3cr%28v=office.15%29 Also set the endpoint's state to offline before connecting: `userEndpointSettings.Presence.UserPresenceState = PresenceState.UserOffline`. – w5l Apr 02 '15 at 15:01
  • Yes, you are right, the `AutomaticPresencePublicationEnabled` property was set to `true`. What do you mean with "subscribe to presence manually"? Because when I subscribe to `myUserEndpoint.LocalOwnerPresence.PresenceNotificationReceived`, I only get the routing information, when they are changed but I have to receive them immediately. – Christoph Apr 02 '15 at 16:52
  • Might be better to put this in a new question instead of comments, but here goes. You need to add an eventhandler to the presence received event before establishing. Create an endpoint with `AutomaticPresencePublicationEnabled = false` and `UserPresenceState = PresenceState.UserOffline`. Handle the `LocalPresenceNotificationReceived` event, after that call `Establish`, and when established call `LocalOwnerPresence.Subscribe`. Soon your handler should fire with all 'current' settings. – w5l Apr 03 '15 at 06:53