1 year ago

#373676

test-img

MHugh

Teams Graph Calls API, how make a Consultative Transfer

I can make a call from a BOT to a teams user, and can carry out a "blind" transfer of that call to another teams user using

   public async Task TransferCallAsync(string replaceCallId, string userDisplayName, string userID)
        {
           
            var transferTarget = new InvitationParticipantInfo
                {
                    Identity = new IdentitySet
                    {
                        User = new Identity
                        {
                            DisplayName = userDisplayName,
                            Id = userID
                        }
                    },
                AdditionalData = new Dictionary<string, object>()
                         {
                            {"endpointType", "default"}
                         },
                };
           
                    await graphServiceClient.Communications.Calls[replaceCallId]
                        .Transfer(transferTarget)
                        .Request()
                        .PostAsync();
             }

derived from https://learn.microsoft.com/en-us/graph/api/call-transfer?view=graph-rest-1.0&tabs=csharp%2Chttp#request

In order to carry out a "consultative transfer" (traditionally this means that the Party A is put on hold whilst the operator/BOT dials the Party B, speaks to the Party B, then actions the transfer of Party A to Party B and drops out of the call), the documentation at

https://learn.microsoft.com/en-us/graph/api/call-transfer?view=graph-rest-1.0&tabs=csharp%2Chttp#request-1

shows that I need to use the same code as for a blind transfer, but add a

"ReplacesCallId = "..some Call ID.."

to the transferTarget structure.

My question is, where does this ID come from ?

Note that this is not the id of the call which exists between the BOT and party A. This gives a "Code: 8523 Message: replacesCallId matches callId. Cannot replace a call with itself"

What API steps are necessary to generate the ReplacesCallId value.

microsoft-graph-api

microsoft-teams

microsoft-graph-teams

0 Answers

Your Answer

Accepted video resources