0

I have a UCMA 3.0 trusted application that is receiving incoming calls.

My incoming call delegate is as follows:

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

Is there a way to determine if the call was originally destined to response group?

anajavi
  • 41
  • 1
  • 6

1 Answers1

0

I ended up checking for ms-retarget-reason header in DiversionContext. It might not be completely reliable, but works for me.

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;
     }
}
anajavi
  • 41
  • 1
  • 6