Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.1k stars 1.21k forks source link

Error when trying to use Cognitive Services with Call Automation SDK with API 2023-10-03-preview #27966

Closed Tolsto closed 12 months ago

Tolsto commented 1 year ago

Describe the bug I was trying to use the playToAll() function with a TextSource. ACS was linked with Cognitive services following this guide. REST API always returns Request not allowed when Cognitive Service Configuration not set during call setup although I pass the endpoint via callIntelligenceOptions in answerCall() I was able to get it working by replacing the API version in the SDK (2023-10-03-preview) with 2023-10-15

minwoolee-msft commented 1 year ago

I can take a look at this - will update by EoD.

minwoolee-msft commented 12 months ago

Hi @Tolsto , I am trying to replicate the issue with latest 1.2 SDK for JS (1.2.0-alpha.20231201.1), but I am not sure if I can. I used the following code:

const callIntOption: CallIntelligenceOptions = { cognitiveServicesEndpoint: "https://contoso.cognitiveservices.azure.com/" } const answerOption: AnswerCallOptions = { callIntelligenceOptions: callIntOption } await caclient.answerCall(incomingCallContext, "https://contoso/Events", answerOption)

Is it possible to provide with either CorelationId of the problematic call, or your code snippet that may be causing the issue? I can try on my end to replicate the issue.

Tolsto commented 12 months ago

Hi @Tolsto , I am trying to replicate the issue with latest 1.2 SDK for JS (1.2.0-alpha.20231201.1), but I am not sure if I can. I used the following code:

const callIntOption: CallIntelligenceOptions = { cognitiveServicesEndpoint: "https://contoso.cognitiveservices.azure.com/" } const answerOption: AnswerCallOptions = { callIntelligenceOptions: callIntOption } await caclient.answerCall(incomingCallContext, "https://contoso/Events", answerOption)

Is it possible to provide with either CorelationId of the problematic call, or your code snippet that may be causing the issue? I can try on my end to replicate the issue.

Thanks for looking into this @minwoolee-msft. I attempted to again replicate the issue by resetting my fork of the SDK to version 1.2.0-alpha.20231201.1, but it now appears to work correctly with this version as well. I have verified that it uses the API version 2023-10-03-preview. Could it be that some changes were made on the backend recently? Regardless, the issue seems resolved now, so this thread can be closed.

minwoolee-msft commented 12 months ago

Hi @Tolsto , I am trying to replicate the issue with latest 1.2 SDK for JS (1.2.0-alpha.20231201.1), but I am not sure if I can. I used the following code: const callIntOption: CallIntelligenceOptions = { cognitiveServicesEndpoint: "https://contoso.cognitiveservices.azure.com/" } const answerOption: AnswerCallOptions = { callIntelligenceOptions: callIntOption } await caclient.answerCall(incomingCallContext, "https://contoso/Events", answerOption) Is it possible to provide with either CorelationId of the problematic call, or your code snippet that may be causing the issue? I can try on my end to replicate the issue.

Thanks for looking into this @minwoolee-msft. I attempted to again replicate the issue by resetting my fork of the SDK to version 1.2.0-alpha.20231201.1, but it now appears to work correctly with this version as well. I have verified that it uses the API version 2023-10-03-preview. Could it be that some changes were made on the backend recently? Regardless, the issue seems resolved now, so this thread can be closed.

I am glad it worked out - and I think it could very well be as you suggested. I will close the issue.