Build telephony apps with .Net using ivrToolkit

An opensource project on Github

Design .Net Core apps using ivrToolkit.Core and a set of plugins of your choice. There are currently three plugins for you to choose from. They are:

GetStarted

ยท All releases

Example

This example uses the SipSorcery Plugin.

// this is one way to set up your properties, with a property file
var sipVoiceProperties = new SipVoiceProperties(loggerFactory, "voice.properties");

// instantiate the plugin you want to use
using var sipPlugin = new SipSorceryPlugin(loggerFactory, sipVoiceProperties);

// choose a TTS Engine (not a requirement, you could just play wav files)
var ttsFactory = new AzureTtsFactory(loggerFactory, sipVoiceProperties);

// create a line manager
using var lineManager = new LineManager(loggerFactory, sipVoiceProperties, sipPlugin, ttsFactory);

// grab a line
var line = lineManager.GetLine();

// dial out
var callAnalysis = await line.DialAsync(phoneNumber, 0, cancellationToken);
if (callAnalysis == CallAnalysis.Connected)
{
    // say something
    await line.PlayTextToSpeech("Hello World!", cancellationToken);
}