ACS Client (using Teams Identity) fails to terminate replaced call with Teams Calling Bot

Dr Dave H 150 Reputation points
2024-09-19T10:18:59.09+00:00

We are using the Azure Communication Calling client library for JavaScript (latest stable (v1.28.4)) to build a web-based softphone for voice calling. The client is using the Teams interoperability option of having the identity as a Teams user (rather than the BYOI model).

We have identified a small issue when interoperating with a Teams Calling Bot where the ACS client is being adding into an existing call and having a separate 1-2-1 call with the Bot being replaced. In this situation the ACS client library is not terminating the replaced call, which we believe it should be.

This situation is similar to a consultation transfer, with the ACS client being the "transfer target"; in this case the ACS client library does terminate the replaced call, which leads us to believe there is a bug in the library for handling the Bot scenario previously explained.

From the ACS logging we can see that the incoming call is correctly identified as a "replaces" call. Our code accepts the call but it appears that the stack doesn't terminate the replaced call.

`10:04:09.157 useAcs.js:118 azure:ACS-calling:info 2024-09-19T09:04:09.157Z CallClient1:CallStack:PluginlessStack:CallRegistry/ace44ee6:IncomingCallMessageHandler Incoming transfer paylod,{`
`	  "body": {`

`	    "evt": 107`

`	  },`

`	  "callerId": "28:u18",`

`	  "groupId": null,`

`	  "conversationId": null,`

`	  "convoCallId": "2101c865-f1ec-4e5c-888f-c12b5c11da67",`

`	  "isMultiParty": true,`

`	  "fromMixer": true,`

`	  "ngcCall": true,`

`	  "participantId": "e9877acc-3d6e-4a4d-8362-56ac3426db63",`

`	  "callType": "replaces",`

`	  "consultativeCallId": "d5540b61-c678-42bf-ac9f-062b646bf47f",`

`	  "messageId": null,`

`	  "transferorId": null`

`	}`

`	10:04:09.158 useAcs.js:118 azure:ACS-calling:verbose 2024-09-19T09:04:09.158Z CallClient1:CallStack:PluginlessStack:CallRegistry/ace44ee6:IncomingCallMessageHandler:[350ece73][handleIncomingCall] replacementCall=true`


Steps to Reproduce;

1. Make call (#1) from ACS client (Teams user 1) to Teams Calling Bot

2. Teams Calling Bot answers the call and makes a new 1-2-1 call (#2) to another ACS client (Teams user 2)

3. ACS client (Teams user 2) answers call (#2)

4. Teams Calling Bot adds ACS client (Teams user 2) into call #1, replacing call #2

As mentioned, at this point the ACS client (Teams User 2) accepts the new call but call #2 does not get terminated

Note, if a Teams Desktop Client is used in place of the ACS client, then everything occurs as expected with the replaced call being dropped.

We believe we are handling the incoming replaces call correctly but we were unable to find any documentation on how best to handle the incoming call as a "transfer target".

We have full ACS logs for this call if required.

Any help in this matter will be gratefully received. Many thanks in advance, cheers Dave

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
895 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 21,766 Reputation points
    2024-09-23T06:02:19.22+00:00

    @Dr Dave H Thanks for asking question! Clarifying questions-

    1. You say this is similar to 'consultative transfer' - to me it sounds exactly the same, question is, why are you not doing the consult transfer ? 
    2. Is this "Teams bot" a graph bot ?  Graph supports transfer, so the bot should be able to transfer Teams user 2 to Teams user 1.
    3. Ideally, transferor ( in this case bot) hangs up the call with transferee (#2) when the transfer is successfully completed - you can follow the 'transfer to call a.k.a consult transfer' quickstart here on how to handle this from ACS SDK  https://learn.microsoft.com/en-us/azure/communication-services/how-tos/calling-sdk/transfer-calls#transfer-to-call
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.