Try for free Book a demo

Azure Communication Services – an overview

Microsoft Azure

5 Mins Read

Azure Communication Services

There are such cloud services that can drastically accelerate your innovation and reduce your time to market by providing you with functionalities that are simple, ready-to-use and that allow you to add a real added-value to your users.

Azure Communication Services is one of those.

In this article, we’ll have an overview of what Azure Communication Services (“ACS” for short) is, what functionalities it provides and what are some of the use cases in which it can be leveraged.

Communication is everywhere

In today’s world, many (if not most) of applications leverage communication functionalities. Whether it is through sending emails, text messages, making or receiving phone calls, chatting (one-on-one or in a group), sharing screen, or making voice or video calls over IP, these functionalities are adding a social aspect to our applications.

Communication at the core of your business

Communication should be at the core of any business because (and this might sound obvious) business is first and foremost about people and people need to communicate with each other. Having communication functionalities built into your applications can certainly boost your business.

What is ACS?

Azure Communication Services is a managed cloud service that provides you with communication capabilities, including the ability to make and/or receive phone calls, sending and/or receiving text messages, making audio and video calls over IP and hosting group meetings and chat.

If you’ve ever used Microsoft Teams, then you’re already familiar with some of the functionalities brought by ACS. In fact, ACS is the foundation of the Microsoft Communication Offerings:

Azure Communication Services

Why should I care?

Setting up communication functionalities on your own require you to be an expert in telecommunications and that you acquire, set up, configure, and maintain complex hardware and software.

ACS is actually a serverless offering. Hence, no need for complex hardware nor software and no need to plan for usage capacity: ACS will scale as needed in response to the demand. You’re basically charged for the number of minutes per user that you consume.

Also, ACS being an Azure service, you can benefit from centralized management portal (the Azure Portal) and tools where you can rely on your existing management techniques, including RBAC, and a centralized billing cycle and platform.

Some use cases

There are plenty of use cases that may come to mind. You simply need to pause and think for a second to imagine a few.

One of these use cases is the ability to send reminders for upcoming events through text messages.

However, the pandemic worldwide situation we’re living in has generated other use cases. Telemedicine is one of them: the ability to have a virtual appointment with a doctor can be life changing for some people.

A similar approach can be applied to maintaining or repairing your devices (home appliances, for example).

How do I use ACS in my application?

There are two parts: (1) creating an ACS instance in Azure and (2) leveraging the ACS SDK to integrate these communication capabilities into your application.

It’s worth mentioning here that, at the time of this writing, the ability to acquire a phone number in order to make/receive phone calls along with sending/receiving SMS messages is not yet available worldwide. It is in the US and will continue to rollout to other countries over time.

1. Creating an ACS instance

From the Azure portal, look for “Azure Communication Services” in the search bar at the top center of the Azure portal then hit “Create”.

If you reside in the US or in a country where the ability to acquire phone numbers is available, you can do so by heading to the “Phone numbers” section under “Voice calling – PSTN”. Once a phone number is acquired, it will be listed on that screen as follows:

Creating an ACS instance

Since I’m in Canada (where phone number can’t yet be acquired), I see this:

ACS

2. Leveraging the ACS SDK in your application

In order to integrate ACS functionalities into our application, we first need to grab the ACS instance’s connection string. This can be done by going to “Keys” under “Tools”:

Leveraging the ACS SDK

As you can see, for security reasons, the connection strings and their corresponding keys aren’t shown. We can of course see their values, but we can also copy these values without showing them.

Let’s see how to make our application send an SMS message (imagine the event reminder use case we discussed earlier).

We first need to create an SMS client:

SmsClient smsClient = new SmsClient(connectionString);

We then send the SMS message as follows:

SmsSendResult sendResult = smsClient.Send(
    from: "",
    to: "",
    message: "Hello World via SMS"
);

Console.WriteLine($"Sms id: {sendResult.MessageId}");

And that’s it! That’s all what it takes! If you’ve ever written code to send an email using some sort of SMTP client, you’ll have a feeling of déjà vu here.

To sum it up…

Communication is and will continue to be a distinctive factor for businesses. Communication nurtures the relationship between a business and its customers. That’s why relying on services like Azure Communication Services is important: it helps you infuse communication functionalities into your application easily and without either having to be experts in telecommunications nor setting up and maintain complex hardware and software.

This article was published on Feb 18, 2022.

Related Articles