0

我有一个正在接收来电的 UCMA 3.0 可信应用程序。

我的来电代表如下:

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

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

4

1 回答 1

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;
     }
}
于 2013-02-06T11:37:22.943 回答