/plushcap/analysis/vonage/vonage-how-to-play-audio-into-a-call-with-asp-net-core-mvc-dr

How to Play Audio Into a Call With ASP.NET Core MVC

What's this blog post about?

When building voice-enabled applications, playing audio into calls programmatically is a fundamental requirement. This tutorial explores how to achieve this using Vonage's Voice API and ASP.NET Core MVC. To play audio into a call, an application needs to return an NCCO (Nexmo Call Control Object) telling Vonage what to play into the call. Two methods will be discussed: one involves returning an NCCO with a stream action, and the other involves using the Text-To-Speech API or websockets to play dynamic audio streams into a call. The tutorial guides through setting up the Nexmo CLI, running ngrok, creating a Vonage application, linking a Vonage number to the application, and configuring the ASP.NET Core MVC project. A basic form is added to the HomeController to make phone calls, and the configuration variables are set in appsettings.json. Finally, the application is tested by running dotnet run and calling the application on a Vonage number.

Company
Vonage

Date published
May 5, 2021

Author(s)
Steve Lorello

Word count
1519

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.