Manage phone numbers Quickstart
For full instructions on how to build this code sample from scratch, look at Quickstart: Look Up Phone Numbers
Prerequisites
- An Azure account with an active subscription. Create an account for free.
- Install Visual Studio
- The latest version .NET Core client library for your operating system.
- An active Communication Services resource and connection string. Create a Communication Services resource.
Code Structure
- ./LookupNumber/Program.cs: Core application code with phone number look up implementation.
- ./LookupNumber/NumberLookupQuickstart.csproj: Project configuration file.
Before running sample code
- 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.
git clone https://github.com/Azure-Samples/Communication-Services-dotnet-quickstarts.git
- With the
Connection String
procured in pre-requisites, add connection string as an environment variable namedCOMMUNICATION_SERVICES_CONNECTION_STRING
- Decide which lookup you would like to perform, and keep in mind that looking up all the operator details incurs a cost, while looking up only number formatting is free.
Warning
If you want to avoid incurring a charge, comment out lines 20-22
Run Locally
- Open
NumberLookupQuickstart.csproj
- Run the
NumberLookupQuickstart
project - Provide a phone number to look up when prompted