简体   繁体   English

如何在lync应用程序中获取传出呼叫状态

[英]How to get outgoing call state in the lync application

We are developing an application,whenever we dial from application we are able to connect to other person successfully until when the caller doesn't lift and disconnected or ignore the call how do we find the call state whether it is disconnected,connected,ignored. 我们正在开发一个应用程序,无论何时从该应用程序拨号,我们都能够成功连接到其他人,直到呼叫者不举起并断开连接或忽略该呼叫时,我们如何确定呼叫状态是否断​​开,已连接,被忽略。 We have tried 我们已经尝试过

conversation state changed 对话状态已更改

  void Conversation_StateChanged(object sender, ConversationStateChangedEventArgs e)
    {
        if (_Conversation.State == ConversationState.Terminated)
        {
            MessageBox.Show("Terminated....");
        }
    }

audiovideo Modality state changed audiovideo模态状态已更改

   void _AVModality_ModalityStateChanged(object sender, ModalityStateChangedEventArgs e)
    {
        switch (e.NewState)
        {
            case ModalityState.Connected:
                MessageBox.Show("Connected.");
                break;
            case ModalityState.Connecting:
                MessageBox.Show("Connecting.");
                break;
            case ModalityState.ConnectingToCaller:
                MessageBox.Show("ConnectingToCaller.");
                break;
            case ModalityState.Disconnected:
                MessageBox.Show("Disconnected.");
                break;
            case ModalityState.Invalid:
                MessageBox.Show("Invalid.");
                break;
            case ModalityState.Notified:
                MessageBox.Show("Notified.");
                break;
            case ModalityState.Suspended:
                MessageBox.Show("Suspended.");
                break;
        }
    }

When we are using modality state changed event we able to get "connecting" and connected but when call is ignored or disconnected those are not firing and same also when conversation state changed. 当我们使用模态状态更改事件时,我们可以“连接”并建立连接,但是当忽略或断开呼叫时,这些都不会触发,并且在会话状态更改时也是如此。 We are able to find the call state in the ucma application but we are unable to find the outgoing call state. 我们能够在ucma应用程序中找到呼叫状态,但无法找到呼出状态。 Any suggestions is much appreciated. 任何建议,不胜感激。

对于断开的呼叫,您应该能够使用Call.StateChanged事件处理程序,而不是当前正在关注的“对话和模式”状态更改事件处理程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM