检测来电是否发往响应组

时间:2013-02-04 13:48:09

标签: lync ucma

我有一个接收来电的UCMA 3.0受信任应用程序。

我的来电代表如下:

private void incomingAVCall_CallReceived(object sender, CallReceivedEventArgs<AudioVideoCall> e)

有没有办法确定呼叫是否最初发往响应组?

1 个答案:

答案 0 :(得分:0)

我最终在DiversionContext中检查ms-retarget-reason标头。它可能不完全可靠,但对我有用。

private void incomingAVCall_CallReceived(object sender, CallReceivedEventArgs<AudioVideoCall> e)
{
     bool isResponseGroup = false;
     foreach (var dd in e.DiversionContext.GetAllDivertedDestinations())
     {
          string[] values = dd.DiversionHeader.GetValue().Split(';');
          foreach (string s in values)
          {
                if (s == "ms-retarget-reason=acd")
                {
                    isResponseGroup = true;
                    break;
                }
          }
          if (isResponseGroup)
              break;
     }
}