PLEASE NOTE THAT THIS LIBRARY IS NOT ACTIVELY MAINTAINED BY TELAPI
This .net library is an open source tool built to simplify interaction with the TelAPI telephony platform. TelAPI makes adding voice and SMS to applications fun and easy.
For this libraries full documentation visit: http://telapi.github.com/telapi-dotnet
For more information about TelAPI, please visit: telapi.com/features or telapi.com/docs
Download the zip of this repo and add the desired DLLs to your project.
Important!
-
If you are adding TelAPI functionality to a windows 8 metro app, you want the WinRT DLLs.
-
If you are using .NET to for web development or non-metro apps, you want the net-3.5-4 DLLs.
The easiest way to work with C# on Mac or Linux is to download Mono, a cross platform .NET development framework.
Once Mono is set up, you can simply clone this repository:
git clone git@github.com:TelAPI/telapi-dotnet.git
Put the cloned repository somewhere your .NET project can access it and then link the net-3.5-4 DLLs in Mono.
TelAPI REST API documenatation
using System;
using TelAPI;
namespace TelAPI.Example
{
public class SendSmsMessage
{
public static void Main(string[] args)
{
var client = new TelAPIRestClient(
"********************************",
"********************************"
);
try
{
var sms = client.SendSmsMessage(
"(XXX) XXX-XXXX",
"(XXX) XXX-XXXX",
"This is an SMS message sent from the TelAPI .NET helper! Easy as 1, 2, 3!",
);
Console.WriteLine("Sms Sid : {0}", sms.Sid);
}
catch (TelAPIException ex)
{
Console.WriteLine("{0}", ex.Message);
}
}
}
}
InboundXML is an XML dialect which enables you to control phone call flow. For more information please visit the TelAPI InboundXML documenatation
using System;
using TelAPI.InboundXML;
using TelAPI.InboundXML.Enum;
namespace TelAPI.InboundXML.Example
{
public class SayExample
{
static void Main(string[] args)
{
var response = new Response();
response.Say("Welcome to TelAPI. This is a sample InboundXML document.", Voice.man, null);
Console.WriteLine("{0}", response.CreateXml());
}
}
}
will render
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="man">Welcome to TelAPI. This is a sample InboundXML document.</Say>
</Response>