Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



84 Commits

Repository files navigation


This .net library is an open source tool built to simplify interaction with the Avaya CPaaS telephony platform. Avaya CPaaS makes adding voice and SMS to applications fun and easy.

For more information about Avaya CPaaS, please visit: Avaya OneCloud™️ CPaaS

To read the official documentation, please visit: Avaya CPaaS Docs


Using Visual Studio and NuGet Package Manager
  • In Solution Explorer, right click on References and choose Manage NuGet Packages.
  • Choose as the Package source, click the Browse tab, search for AvayaCPaaS, select that package in the list, and click Install
  • Right-click the solution in Solution Explorer and click Build Solution



See the Avaya CPaaS REST API documentation for more information.

Make call Example

using System;
using AvayaCPaaS;
using AvayaCPaaS.Configuration;
using AvayaCPaaS.Exceptions;

public class Program
    static void Main(string[] args)
        var configuration = new APIConfiguration({AccountSid}, {AuthToken});
	var service = new CPaaSService(configuration);

            // Make call using calls connector
            var call = service.CallsConnector.MakeCall("+12345", "+12678", "", playDtmf: "ww12w3221", timeout: 100);
        catch (CPaaSException e)

Configuration (3 ways)

First, a configuration must be created by using provided configuration class APIConfiguration or by creating your own implementation of IAPIConfiguration interface.

1. Create APIConfiguration with parameters AccountSid and AuthToken

Normally you'll want to just enter your Avaya CPaaS Platform AccountSid and AuthToken, but you can also define a proxy server or change the base API URL. The default value for base API URL is set to "".

The base API URL and api version for US(new) and EU deployments are: US: EU:

Basic configuration:

var configuration = new APIConfiguration({AccountSid}, {AuthToken});

or if you want to define a proxy server:

var configuration = new APIConfiguration({AccountSid}, {AuthToken});
configuration.UseProxy = true;
configuration.ProxyHost = {ProxyHost}
configuration.ProxyPort = {ProxyPort}

or if you want to change the base API URL:

configuration.BaseUrl = {BaseUrl}

Next, you'll have to create a CPaaSService and pass the configuration

var service = new CPaaSService(configuration)
2. Use a custom HttpManager

Another way to create CPaaSService is to pass a custom HttpManager which implements IHttpManager.

var service = new CPaaSService(myHttpManager)
3. Use configuration parameters from app.config file

Create CPaaSService with empty APIConfiguration

var service = new CPaaSService(new APIConfiguration("", ""));

Configure service


Request parameters

Request parameters are passed as parameters to connector object methods as shown previously in Send SMS Example. All methods have convenience overloads which use the AccountSid parameter specified in the configuration automatically.

Explicit accountSid

var usage = service.UsagesConnector.ViewUsage({accountSid}, {UsageSid});

AccountSid from configuration used automatically

var usage = service.UsagesConnector.ViewUsage({UsageSid});
Methods with optional parameters

Optional parameters are used as named parameters like transcribe:true, e.g:

var call = service.CallsConnector.MakeCall("+12345", "+112233", "testUrl", transcribe:true, transcribeCallback:"transcribeCallback");

Response data

The received data can be an object, e.g.:

var usage = service.UsagesConnector.ViewUsage({UsageSid});

Or a list of objects in which case the list is iterable, e.g.:

var usages = service.UsagesConnector.ListUsages(year:2017, month:5, product:Product.INBOUND_CALL, page: 3, pageSize: 40);

foreach (var usage in usages.Elements)


InboundXML is an XML dialect which enables you to control phone call flow. For more information please visit the Avaya CPaaS InboundXML documentation.

Example of using InboundXML builder:

using System;
using AvayaCPaaS.InboundXml;
using AvayaCPaaS.Exceptions;

public class Program
    static void Main(string[] args)
            var builder = new InboundXmlBuilder();
		        .Dial("(555)555-5555", hideCallerId:false, dialMusic:"dial music", confirmSound:"dial confirm sound",                              digitsMatch:"ww12w3221", record:false, recordDirection:RecordDirectionEnum.@out)
		            .Sip("", "username", "password")
		            .Say(language: LanguageEnum.en, loop: 3, value: "Welcome to Avaya CPaaS!", voice: VoiceEnum.female)
		            .Pause(length: 2)
		        .Hangup(schedule: 4, reason: HangupReasonEnum.rejected);

            var result = builder.Build();
        catch (CPaaSException e)

will render

  <Dial dialMusic="dial music" confirmSound="dial confirm sound" digitsMatch="ww12w3221" hideCallerId="False" record="False" recordDirection="out">
    <Sip username="username" password="password"></Sip>
    <Say loop="3" voice="female" language="en">Welcome to Avaya CPaaS!</Say>
    <Pause length="2" />
  <Hangup schedule="4" reason="rejected" />


No description, website, or topics provided.







No releases published


No packages published