Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outbound Call Automation sound does not play during a call and recognize issue #165

Open
anasalhafez opened this issue Jun 5, 2024 · 0 comments

Comments

@anasalhafez
Copy link

anasalhafez commented Jun 5, 2024

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<RecognitionChoice> GetChoices()
{
    return new List<RecognitionChoice> {
            new RecognitionChoice("Confirm", new List<string> {
                "Confirm",
                "First",
                "One"
            }) {
                Tone = DtmfTone.One
            },
            new RecognitionChoice("Cancel", new List<string> {
                "Cancel",
                "Second",
                "Two"
            }) {
                Tone = DtmfTone.Two
            }
        };
}

Repository

communication-services-dotnet-quickstarts-main/CallAutomation_OutboundCalling.


Thanks! We'll be in touch soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant