如何使用UCMA 2.0 SDK获取用户端点? [英] How to get user endpoints using UCMA 2.0 SDK?

查看:63
本文介绍了如何使用UCMA 2.0 SDK获取用户端点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用UCMA 2.0 SDK创建一个聊天监听器,它代表用户监听传入的聊天请求。它坚持要求而不接受它。以下示例代码

void On_InstantMessagingCall_Received(对象发件人,CallReceivedEventArgs< InstantMessagingCall> e)
        {
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; LOGGER.Info(QUOT;糟糕");
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; //类型检查由平台完成;除了预期的类型之外,没有任何类型的风险。
            _instantMessagingCall = e.Call;

I am creating a chat listener using UCMA 2.0 SDK which listens to incoming chat requests on behalf of a user. It holds on to the request without accepting it. Sample code below

void On_InstantMessagingCall_Received(object sender, CallReceivedEventArgs<InstantMessagingCall> e)
        {
            LOGGER.Info("Oops");
            //Type checking was done by the platform; no risk of this being any type other than the type expected.
            _instantMessagingCall = e.Call;

            //呼叫:StateChanged:仅用于记录,以显示呼叫状态转换。
            _instantMessagingCall.StateChanged + = new EventHandler< CallStateChangedEventArgs>(_ instantMessagingCall_StateChanged);
            _instantMessagingCall.InstantMessagingFlowConfigurationRequested + = this.instantMessagingCall_FlowConfigurationRequested;
            //远程参与者URI代表此对话中的远端(来电者)。
            // Toast是呼叫者设置的消息,作为此呼叫的"问候"消息。
            //在Office Communicator中,toast将显示在屏幕的右下方。
            Console.WriteLine(" Call Received!From:" + e.RemoteParticipant.Uri +" Toast is:" + e.ToastMessage);
   我想知道同一个用户是否已登录到某个其他端点,说"Office Communicator"。并在那种情况下拒绝请求,以便它可以到达另一个端点。

这可以做到吗?有没有办法找出用户是否已登录到其他某个端点?

            // Call: StateChanged: Only hooked up for logging, to show the call state transitions.
            _instantMessagingCall.StateChanged += new EventHandler<CallStateChangedEventArgs>(_instantMessagingCall_StateChanged);
            _instantMessagingCall.InstantMessagingFlowConfigurationRequested += this.instantMessagingCall_FlowConfigurationRequested;
            // Remote Participant URI represents the far end (caller) in this conversation.
            // Toast is the message set by the caller as the 'greet' message for this call.
            // In Office Communicator, the toast will show up in the lower-right of the screen.
            Console.WriteLine("Call Received! From: " + e.RemoteParticipant.Uri + " Toast is: " + e.ToastMessage);
    }

I want to find out if the same user has logged-in to some other endpoint say "Office Communicator" and in that scenario decline the request so that it can reach the other endpoint.

Can this be done? Is there a way to find out if the user has logged-in to some other endpoint?

推荐答案

订阅"设备"的实例UserEndpoint的在线类别。 该类别中的一个数据是EndpointID。 如果存在除您自己以外的任何实例,则用户会注册其他一些端点。


Subscribe to instances of the "device" presence category for the UserEndpoint.  One of the pieces of data in that category is the EndpointID.  If there are any instances other than your own, then the user has some other endpoint registered.



这篇关于如何使用UCMA 2.0 SDK获取用户端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆