We are using the Azure Communication Calling client library for JavaScript 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).
Since moving to the 1.22.3 (or 1.22.1) stable SDK (from 1.20.1) we have noticed an issue with the proactive token renewal mechanism which previously worked fine. In our code we don't specify an initial token, just a token refresher function, and set "refreshProactively" to true. Since there is no initial token, the refresher callback function is called immediately, our code provides a suitable token, and everything works as expected.
However, when the token is due to expire and the refresher callback is called again, the SDK appears to ignore the new token we return, resulting in subsequent operations failing (such as answering incoming calls or making outbound calls). The refresher mechanism itself seems happy that the token we've provided is ok, as it doesn't trigger a new refresher callback until the new token is about to expire. The issue appears to be that the SDK is continuing to use the original (now stale) token.
The release notes don't appear to suggest that anything has changed in this specific area but tests using various SDK versions show that something has been altered which is causing this issue somewhere between SDK version 1.21.1 (works ok) and version 1.22.1 (has issue).
Any help in this matter will be gratefully received. Many thanks in advance, cheers Dave
To Reproduce
- Start ACS softphone
- Check can make outgoing calls ok
- Wait for approximately 1 hour
- Try to make outgoing call - Dial should fail
Details
- Package Name: @azure/communication-calling
- Package Version: Stable (v1.22.3)
- Operating system: Windows