Azure-Samples / Azure-Samples/communication-services-dotnet-quickstarts
Outbound Call Automation sound does not play during a call and recognize issue
- Dominant language
- C#
- Stars
- 114
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
### This issue is for a: (Outbound call no sound && recognize issue)
```
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```
### Minimal steps to reproduce
>
1- The azure communication service is connected to multi cognitive service.
2- The mobile number is linked to the Azure Communication Service.
3- TTS cognitive service is used.
### Any log messages given by the failure
> No failure Message
### Expected/desired behavior
>The audio must play during the call.
### OS and Version?
> Windows 10.
### Versions
> .Net7.0
### Mention any other details that might be useful
- After answer the call in the callbacks API :
```
if (parsedEvent is CallConnected callConnected) {
var welcomePlaySource = new TextSource(WelcomeMessage2)
{
VoiceName = "en-US-NancyNeural"
};
await callMedia.PlayToAllAsync(welcomePlaySource);
}
```
- The sound not played and the callback event after PlayToAllAsync is PlayCompleted without any error.
- There is issue too appear when DMTF Recognize the event callback is RecognizeFailed and the error is silence time out after 10 seconds.
```
var recognizeOptions = GetMediaRecognizeChoiceOptions(MainMenu, targetPhonenumber);
await callMedia.StartRecognizingAsync(recognizeOptions);
CallMediaRecognizeChoiceOptions GetMediaRecognizeChoiceOptions(string content, string targetParticipant, string context = "")
{
var playSource = new TextSource(content) { VoiceName = SpeechToTextVoice };
var recognizeOptions =
new CallMediaRecognizeChoiceOptions(targetParticipant: new PhoneNumberIdentifier(targetParticipant), GetChoices())
{
InterruptCallMediaOperation = false,
InterruptPrompt = false,
InitialSilenceTimeout = TimeSpan.FromSeconds(10),
Prompt = playSource,
OperationContext = context
};
return recognizeOptions;
}
List GetChoices()
{
return new List {
new RecognitionChoice("Confirm", new List {
"Confirm",
"First",
"One"
}) {
Tone = DtmfTone.One
},
new RecognitionChoice("Cancel", new List {
"Cancel",
"Second",
"Two"
}) {
Tone = DtmfTone.Two
}
};
}
```
### Repository
communication-services-dotnet-quickstarts-main/CallAutomation_OutboundCalling.
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.
Contributor guide
Assessment
This issue has not been assessed yet.