👋 Hi! This app is outdated and uses an old version of WebRTC.
CSS C# HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nuget
Content
Lib
Models
Modules
Properties
Views
.editorconfig
.gitattributes
.gitignore
Bootstrapper.cs
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
PULLREQUEST.md
PULL_REQUEST_TEMPLATE.md
README.md
VoiceApp.csproj
VoiceApp.sln
Web.Debug.config
Web.Release.config
Web.config
azuredeploy.json
packages.config

README.md

dotnet-reference-app-voice

This application is outdated, but will be updated soon!

⚠️ Bandwidth is no longer Supporting WebRTC per rtcpMuxPolicy until further notice. Some older browsers may still work.

This application demonstrates how to implement voice calling for mobile devices, browsers (WebRTC), and any SIP client using the Catapult API. This reference application makes creating, registering, and implementing voice calling for endpoints (mobile, web, or any SIP client) easy. This application implements the steps documented here.

You can open up the web page at the root of the deployed project for more instructions and for example of voice calling in your web browser using WebRTC. Current browser supported: Chrome and Opera.

Uses the:

Prerequisites

Build and Deploy

Azure One Click

Settings Required To Run

  • Catapult User Id
  • Catapult Api Token
  • Catapult Api Secret
  • Domain Name

Deploy to Azure

Locally

Clone the web application.

$ git clone https://github.com/BandwidthExamples/csharp-voice-reference-app.git

Install

Before run them fill config files (Web.config) with right values:

domain - domain name (it will be created by the app if need),

catapultUserId, catapultApiToken, catapultApiSecret - auth data for Catapult API (to search and reserve a phone number, etc),

Open solution file in Visual Studio and build it.

You can run compiled C# code with IIS Express on local machine if you have ability to handle external requests or use any external hosting (like Azure).

Deploy on Azure

Open solution in Visual Studio. Click right button on this project in solution explorer and select "Publish". Select "Microsoft Azure Websites" in opened dialog, then sign in on Azure and select exisitng website to deploy this project or create new (button "New"). If you create new site enter site name, select subscription and region. Database is not required. Change site profile options if need and press "Publish" to upload it on Azure. Now you can open it in the browser.

Http routes

GET /users/{userName} with json response

PUT /users/{userName}

DELETE /users/{userName}

POST /users with required json payload {"userName": "", "password": "" }  and with json response (register an user)

POST /users/{userName}/callback with json payload (handle Catapult call events)

Diagnostic

Open url http://this-site-url/_Nancy. Enter password 123456 (you can change it in Bootstrapper.cs) and go to tab "Request Tracing". Here you can monitor HTTP requests to server, see requests and resposnses data.