Specifying a list of Playsources to the PlayToAll method generates ERROR Status code 400, "{"error":{"code":"8523","message":"Invalid Request, more than one play source detected."}}"] #37908
JohnMelody
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
SDK: azure-communication-callautomation V1.1.0
I have set up a list of play sources as follows:
List<PlaySource> lPlaySourceList = new ArrayList<PlaySource>();
Then I created a list of audio files to play
"prompt1.wav;prompt2.wav;prompt3.wav"
Then build an array list of prompts to play using the audio files.
List<String> lPromptList = Arrays.asList(lPrompts.split(";",-1)); lPromptList.forEach((s) -> { log.info(s); PlaySource lPlaySource = new FileSource().setUrl(mAppConfig.getBasecallbackuri() + "/folder-name/" + s + ".wav"); lPlaySourceList.add(lPlaySource); }); log.info("Number of PlaySources = " + lPlaySourceList.size());
then I try to play them with the following
mClient.getCallConnectionAsync(callConnectionId) .getCallMediaAsync().playToAll(lPlaySourceList).block();
However, I get the following error:
com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException: Status code 400, "{"error":{"code":"8523","message":"Invalid Request, more than one play source detected."}}"
Why is it an invalid request? Yes, there are more than one playsource but that's what the API call expects i.e. a List of PlaySources.
What am I doing wrong? My "PlaySource"s are "FileSource"s.
Beta Was this translation helpful? Give feedback.
All reactions