Add Voice Controller

Right-click on the Controllers folder and select add->Controller. Select "Add Empty MVC Controller" and name it VoiceController.

Add using statements for Vonage.Voice, Vonage.Voice.Nccos, Vonage.Voice.Nccos.Endpoints, Vonage.Request, and Microsoft.Extensions.Configuration at the top of this file.

Inject Configuration

Dependency inject an IConfiguration object via the constructor:

private readonly IConfiguration _config { get; set; }

public VoiceController(IConfiguration config)
{
    _config = config;
}