Skip to content

TeleSign/csharp_voice_server_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

csharp_voice_server_demo

Set up a simple C# web server and see the play and collect digits feature of the TeleSign Voice API.

Notes

The simple C# web server is great for getting started with development right away, with a minimum of effort. If you plan to put the TeleSign Voice API into production, you should choose something more robust.

Resources

You can learn more about the TeleSign Voice API here: https://enterprise.telesign.com/api-reference/apis/voice

Requirements

To use this demo:

If you already have your account, there's a few things you'll need:

  • Customer ID and API key - available from TeleSign through your Customer Success Manager.
  • TeleSign phone number - you must purchase a TeleSign phone number to use as a callerID. You can do this using the Phone Numbers API. Ask your Customer Success Manager to grant access to the Phone Numbers API, and then check out the Get Started with the Phone Numbers API page.
  • Customer event URL on your server for TeleSign to post event information to. For more details, refer to the Set up the Customer Event URL section on the Voice API reference page.

Get Started

If you are all set with the requirements, you are ready to get started:

  1. Download this repository to your computer. The project was built using Visual Studio Code.
  2. Open the CSharpServer folder.
  3. In the Program.cs file, scroll to the internal class Program section. The demo code for TeleSign's Voice API is added here in the SendResponse method.
  4. You will need to set a few phone numbers. In the if (postBodyEvent == SPEAK_COMPLETED) section where it says Your CallerID number. Keep the quotes and put the appropriate number between them for callerIdNum, customerServiceNum, and financeDeptNum.
  5. The code shows how you receive a request from TeleSign's API and process it. Included are the Dial, Speak, and Speak and Collect Digits commands. Using these, the sample takes an incoming request, plays a message for the caller using Text-to-Speech, collects a choice from the caller and then connects them to either the Customer Service or Finance Department.
  6. To see the calls demonstrated, you will need to have your customer event URL set up with TeleSign, and a TeleSign purchased callerID assigned to your system.

Thanks

This project uses a simple web server that's described here - https://codehosting.net/blog/BlogEngine/post/Simple-C-Web-Server. The TeleSign code is added to the SendResponse method of this sample server.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages