Bot Transferring Teams User, Leaves Call Leg Remaining
We use the Graph Cloud Communications API for our Teams Calling Bot to answer an incoming call to the Bot from a Teams user, and then add another Teams user into the call (as per this example (participant: invite - Microsoft Graph v1.0 | Microsoft Learn). If this user does not accept the call, the Bot then transfers the caller (initial Teams user) to either another Teams user or a PSTN number. This is a non-consultative transfer, as given in this example; call: transfer - Microsoft Graph v1.0 | Microsoft Learn
The transfer appears to work fine, however, the initial Teams user incorrectly remains in a call with Bot, even after the transferred call has terminated. Although this fact is not apparent from the Teams client (there is no call window present), if a subsequent call is made from the caller to the same Teams Bot, the Teams client reconnects to the initial call, showing that the call is on hold. Furthermore, if the subsequent Bot call is not made, the Teams user's presence shows they are still in a call, and this presence doesn't change until the call to the Bot is cleared by some means.
We believe that this is a bug within the Teams Client or the Teams core, relating to the Transfer operation.
Steps to Reproduce;
1. Make call into Teams Calling Bot (from Teams user 1)
2. Bot Answers call [Using call: answer]
3. Bot adds Teams user 2 to the call [Using participant: invite]
4. [Teams user 2 doesn't answer the call] Call is left to time-out
5. Bot transfers Teams user 1 to a PSTN number [Using call: transfer]
6. [At this point the Bot sees a message indicating Transfer success but it doesn't suggest that the call is terminated - see below]
7. Drop call between Teams user 1 and the PSTN
8. [Teams user 1 presence indicates they are still in a call]
9. Make call into Teams Calling Bot (from Teams user 1)
10. [Call "reconnects" to original call]
11. Drop this call
12. [At this point the Bot sees a message indicating the call has terminated]
13. [Teams user 1 presence indicates they are no longer in a call]
This is the message received by the Bot at step 6;
We would expect this message to have a changeType of "deleted" and a state of "terminated", and for the call to have been terminated. But clearly in this case the transfer operation is not completing correctly.
Any help in this matter will be gratefully received. Cheers, Dave