1
0
Форкнуть 0
Перейти к файлу
Sander van Leeuwen 59bcde587e Updated documentation 2022-10-06 18:00:51 +02:00
.github Fixed web config settings 2022-10-06 17:03:49 +02:00
Client Fixed web config settings 2022-10-06 17:03:49 +02:00
Server Updated documentation 2022-10-06 18:00:51 +02:00
deploy Make ready for automatic deployment 2022-10-06 17:39:45 +02:00
.gitignore Update phone numbers dependency 2022-09-13 12:02:42 +02:00
CHANGELOG.md Initial CHANGELOG.md commit 2020-10-02 14:33:01 -07:00
CONTRIBUTING.md Initial CONTRIBUTING.md commit 2020-10-02 14:33:04 -07:00
LICENSE.md Initial LICENSE.md commit 2020-10-02 14:33:03 -07:00
README.md Updated documentation 2022-10-06 18:00:51 +02:00
SECURITY.md Create SECURITY.md 2020-10-07 15:40:01 -05:00

README.md

page_type languages products
sample
typescript
C# (ASP Core)
azure
azure-communication-services

Deploy To Azure Deploy To Azure US Gov Visualize

PSTN Calling Example

This is a sample application to show how one can setup a calling architecture and setup SIP trunks using the Azure.Communication.PhoneNumbers SDK. Also, it showcases how the Azure.Communication.CallingServer can be used to support inbound calling. Lastly, azure@communication-calling package is be used to build the a calling experience. The client-side application is a Typescript React based user interface. Alongside this front-end is a C# ASP Core web server application that generates new user tokens, gets and sets sip trunk configurations and voice routes, redirects inbound calls to the client application, and retrieves purchased phone numbers for each Client participant. This separate server is necessary as you do not not want to make the connection string public, which gives everyone access to your Azure Communication Service resource.

Prerequisites

  1. npm
  2. Node.js (v14)
  3. Create an Azure account with an active subscription. For details, see Create an account for free.
  4. Create an Azure Communication Services resource. For details, see Create an Azure Communication Resource. You'll need to record your resource connection string for this quickstart.

Code structure

Before running the sample for the first time

  1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
  2. git clone https://github.com/t-sanderv/communication-services-web-calling-tutorial
  3. cd communication-services-web-calling-tutorial
  4. Get a connection string by creating an Azure Communication Services resource from the Azure portal. Use the connection string as value for key ConnectionString in Server/appsettings.json file.

Local Run

  1. Set your connection string in Server/appsettings.json
  2. Open Server/PSTNServerApp.csproj with Visual Studio
  3. Click IIS Express to start the server-side app.
  4. Run npm install from the Client directory
  5. Run npm run start from the Client directory
  6. Open http://localhost:5000 in a browser. (Supported browsers are Chrome, Edge Chromium, and Safari)

Resources

  1. Documentation on how to use the ACS Calling SDK for Javascript can be found on https://docs.microsoft.com/en-gb/azure/communication-services/quickstarts/voice-video-calling/calling-client-samples?pivots=platform-web
  2. ACS Calling SDK for Javascript API reference documentation can be found on https://docs.microsoft.com/en-us/javascript/api/azure-communication-services/@azure/communication-calling/?view=azure-communication-services-js