Show / Hide Table of Contents

Interface IIvrBaseLine

This interface provides methods to control the selected IVR plugin. It is primarily used by the ivrToolkit.Core.Util.LineWrapper class.

Inherited Members
IDisposable.Dispose()
Namespace: ivrToolkit.Core.Interfaces
Assembly: ivrToolkit.Core.dll
Syntax
public interface IIvrBaseLine : IDisposable

Properties

| Edit this page View Source

LastTerminator

Gets or sets the last terminator key that was pressed.

Declaration
string LastTerminator { get; set; }
Property Value
Type Description
string
| Edit this page View Source

LineNumber

Gets the attached line number.

Declaration
int LineNumber { get; }
Property Value
Type Description
int
| Edit this page View Source

Management

Provides functionality for managing the line from another thread.

Declaration
IIvrLineManagement Management { get; }
Property Value
Type Description
IIvrLineManagement
| Edit this page View Source

Volume

Gets or sets the volume level. Valid range: -10 to 10 (0 is default volume).

Declaration
int Volume { get; set; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Dial(string, int)

Dials a phone number using call progress analysis.

Declaration
CallAnalysis Dial(string phoneNumber, int answeringMachineLengthInMilliseconds)
Parameters
Type Name Description
string phoneNumber

The phone number to call.

int answeringMachineLengthInMilliseconds

The threshold for determining an answering machine. Detects the callee's greeting duration.0 = no answering machine detection.

Returns
Type Description
CallAnalysis

A CallAnalysis object containing call results.

| Edit this page View Source

DialAsync(string, int, CancellationToken)

Asynchronously dials a phone number using call progress analysis.

Declaration
Task<CallAnalysis> DialAsync(string phoneNumber, int answeringMachineLengthInMilliseconds, CancellationToken cancellationToken)
Parameters
Type Name Description
string phoneNumber

The phone number to call.

int answeringMachineLengthInMilliseconds

The threshold for determining an answering machine. Detects the callee's greeting duration.0 = no answering machine detection.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

Returns
Type Description
Task<CallAnalysis>

A task representing the asynchronous operation, returning a CallAnalysis object.

| Edit this page View Source

FlushDigitBuffer()

Clears the digit buffer and returns all previously collected digits, including terminators.

Declaration
string FlushDigitBuffer()
Returns
Type Description
string

All digits in the buffer.

| Edit this page View Source

GetCallStateProgress()

A bitwise collection of call out state progress. You can use this to help decide how you want to handle NoRingBack calls. It is currently only for the Dialogic SIP plugin.

Declaration
CallStateProgressEnum GetCallStateProgress()
Returns
Type Description
CallStateProgressEnum
| Edit this page View Source

GetDigits(int, string, int)

Collects digits from the user until the specified number is reached or a terminator is pressed.

Declaration
string GetDigits(int numberOfDigits, string terminators, int interDigitTimeoutMilliseconds = 0)
Parameters
Type Name Description
int numberOfDigits

The maximum number of digits to capture.

string terminators

The valid terminator keys.

int interDigitTimeoutMilliseconds

The timeout duration between keypresses in milliseconds (0 to use default).

Returns
Type Description
string

The collected digits, excluding the terminator if used.

| Edit this page View Source

GetDigitsAsync(int, string, CancellationToken, int)

Asynchronously collects digits from the user until the specified number is reached or a terminator is pressed.

Declaration
Task<string> GetDigitsAsync(int numberOfDigits, string terminators, CancellationToken cancellationToken, int interDigitTimeoutMilliseconds = 0)
Parameters
Type Name Description
int numberOfDigits

The maximum number of digits to capture.

string terminators

The valid terminator keys.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

int interDigitTimeoutMilliseconds

The timeout duration between keypresses in milliseconds (0 to use default).

Returns
Type Description
Task<string>

The collected digits, excluding the terminator if used.

| Edit this page View Source

Hangup()

Forces a hangup on the current line.

Declaration
void Hangup()
| Edit this page View Source

PlayFile(string)

Plays a WAV file (8000Hz, mono, signed 16-bit PCM).

Declaration
void PlayFile(string filename)
Parameters
Type Name Description
string filename

The path to the WAV file.

| Edit this page View Source

PlayFileAsync(string, CancellationToken)

Asynchronously plays a WAV file (8000Hz, mono, signed 16-bit PCM).

Declaration
Task PlayFileAsync(string filename, CancellationToken cancellationToken)
Parameters
Type Name Description
string filename

The path to the WAV file.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

Returns
Type Description
Task
| Edit this page View Source

PlayWavStream(WavStream)

Plays a WAV audio stream.

Declaration
void PlayWavStream(WavStream audioStream)
Parameters
Type Name Description
WavStream audioStream

The audio stream, including the WAV header.

| Edit this page View Source

PlayWavStreamAsync(WavStream, CancellationToken)

Asynchronously plays a WAV audio stream.

Declaration
Task PlayWavStreamAsync(WavStream audioStream, CancellationToken cancellationToken)
Parameters
Type Name Description
WavStream audioStream

The audio stream, including the WAV header.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

Returns
Type Description
Task
| Edit this page View Source

RecordToFile(string)

Records a WAV file (8000Hz, mono, signed 16-bit PCM) to disk.

Declaration
void RecordToFile(string filename)
Parameters
Type Name Description
string filename

The output file path.

| Edit this page View Source

RecordToFile(string, int)

Records a WAV file with a specified timeout (8000Hz, mono, signed 16-bit PCM) to disk.

Declaration
void RecordToFile(string filename, int timeoutMilliseconds)
Parameters
Type Name Description
string filename

The output file path.

int timeoutMilliseconds

The maximum recording duration in milliseconds.

| Edit this page View Source

RecordToFileAsync(string, int, CancellationToken)

Asynchronously records a WAV file with a specified timeout (8000Hz, mono, signed 16-bit PCM) to disk.

Declaration
Task RecordToFileAsync(string filename, int timeoutMilliseconds, CancellationToken cancellationToken)
Parameters
Type Name Description
string filename

The output file path.

int timeoutMilliseconds

The maximum recording duration in milliseconds.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

Returns
Type Description
Task
| Edit this page View Source

RecordToFileAsync(string, CancellationToken)

Asynchronously records a WAV file (8000Hz, mono, signed 16-bit PCM) to disk.

Declaration
Task RecordToFileAsync(string filename, CancellationToken cancellationToken)
Parameters
Type Name Description
string filename

The output file path.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

Returns
Type Description
Task
| Edit this page View Source

Reset()

Disposes of the line and re-initializes it.

Declaration
void Reset()
| Edit this page View Source

StartIncomingListener(Func<IIvrLine, CancellationToken, Task>, IIvrLine, CancellationToken)

Starts an incoming call listener with a callback function.

Declaration
void StartIncomingListener(Func<IIvrLine, CancellationToken, Task> callback, IIvrLine line, CancellationToken cancellationToken)
Parameters
Type Name Description
Func<IIvrLine, CancellationToken, Task> callback

The function to execute when a call is received.

IIvrLine line

The line instance.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

| Edit this page View Source

TakeOffHook()

Takes the line off hook.

Declaration
void TakeOffHook()
| Edit this page View Source

WaitRings(int)

Waits for a specified number of rings before answering.

Declaration
void WaitRings(int rings)
Parameters
Type Name Description
int rings

The number of rings to wait.

| Edit this page View Source

WaitRingsAsync(int, CancellationToken)

Asynchronously waits for a specified number of rings before answering.

Declaration
Task WaitRingsAsync(int rings, CancellationToken cancellationToken)
Parameters
Type Name Description
int rings

The number of rings to wait.

CancellationToken cancellationToken

A token to monitor for cancellation requests.

Returns
Type Description
Task

Extension Methods

ValidationExtensions.ThrowIfNull<T>(T, string)
  • View Source
In this article
Back to top Generated by DocFX