Azure Communication Services: March 2024 Updates You Need to Know

Alright, folks, buckle up because Azure Communication Services (ACS) just dropped a batch of updates that’ll make your dev life a little smoother and your apps a lot smarter. Whether you’re building chat, voice, or video features, ACS has some shiny new tools to simplify your workflows and impress your users.

Let’s break it down.


Limited Access User Tokens: Now Generally Available

Ever wanted to give your users just enough access to get the job done without opening the floodgates? Meet Limited Access User Tokens. These beauties let you control what users can and can’t do—like joining a call but not starting one.

Think of it like a VIP pass that only gets you into the lounge, not backstage. Perfect for scenarios where security and controlled participation are a must. And yes, it’s available right now for you to play with.


“Try Phone Calling” (Public Preview)

Imagine this: you’re setting up telephony in your app, but you’re not 100% sure the setup actually works. Enter “Try Phone Calling”, now in public preview. This feature lets you make test calls directly from the Azure portal. No code. No app. Just you, a test call, and sweet, sweet confirmation that everything’s running smoothly.

This works with both PSTN (Public Switched Telephone Network) and direct routing setups. It’s like a “Hello, World” for phone calling.


UI Native Library Gets a Boost

The Native UI Library just got a couple of upgrades that’ll make your users love you even more (or at least blame you less when something goes wrong):

  1. User Facing Diagnostics (UFD): Think of this as your app whispering helpful tips to users. Muted mic? Bad network? UFD lets users know in real-time so they can fix issues themselves. No more “I can’t hear you” panic in the middle of a call. It’s available now, so start showing off your polished UX skills.
  2. iOS CallKit Integration: For all the Apple fans out there, ACS now integrates with iOS CallKit (in public preview). Your calls will feel native, with built-in notifications, call history, and even call hold. It’s like giving your app a little iOS magic wand.

PSTN Direct Offers Expanded

PSTN Direct Offers just leveled up with availability in 42 countries. That’s 400+ new cross-country offers, making it easier to integrate phone calling into your app no matter where your users are.

If you’ve been dreaming of adding PSTN calling for global users, this update is basically your green light.


Why These Updates Matter

Azure Communication Services just made it a lot easier to build reliable, secure, and scalable communication features into your apps. From tighter access controls to test calls and diagnostics, these tools are all about making your life easier and your apps better.

You can dive into the nitty-gritty here: Azure Communication Services Updates. Or just fire up the portal and start playing around. You’ll thank yourself later.

Now, go forth and communicate like the app-building rockstar you are.

PowerShell’s Pseudo-Terminal Support: A Hidden Gem for the Command Line

Ah, PowerShell—the Swiss Army knife of scripting languages. Just when you think you’ve explored all its tools, it unveils a new feature that makes you wonder how you ever lived without it. Today, we’re diving into one such feature that might have flown under your radar: pseudo-terminal support. If you’re moderately skilled in PowerShell, prepare to have your command-line experience elevated.

What on Earth Is Pseudo-Terminal Support?

In the realm of command-line interfaces, a pseudo-terminal (PTY) acts as a mediator between a user and the system, emulating a physical terminal. This allows for more sophisticated interactions with native commands, enhancing how input and output are handled within PowerShell.

Why Should You Care?

Traditionally, PowerShell has had limitations in capturing and managing the output of native commands. This often led to challenges in scripting and automation, especially when dealing with complex command-line tools. With pseudo-terminal support, these limitations are addressed, offering:

  • Improved Output Handling
  • Enhanced Interactivity
  • Streamlined Automation

How Does It Work?

Pseudo-terminal support allows PowerShell to create a virtual terminal session for native commands. This means that when you execute a command, PowerShell can interact with it as if it were running in a standalone terminal, capturing all output and managing input more effectively.

Before Pseudo-Terminal Support

Imagine trying to run a command that requires interactive input, like ssh or cmd.exe /c pause. Before PTY support, PowerShell struggled to manage interactive commands cleanly. Here’s an example:

# Before PTY Support
Start-Process -FilePath "cmd.exe" -ArgumentList "/c pause" -NoNewWindow -Wait

In this case, interactive prompts might not behave as expected, or the output could be garbled, making automation difficult.

After Pseudo-Terminal Support

With PTY support enabled, PowerShell now handles such scenarios seamlessly, making it much more robust for interactive use cases. Here’s the improved approach:

# After PTY Support (Requires PowerShell 7.5+ and PTY enabled)
$session = New-Object System.Management.Automation.Host.PseudoTerminalSession
$session.StartProcess("cmd.exe", "/c pause")
$session.WaitForExit()

Now, PowerShell interacts directly with the pseudo-terminal, meaning smooth execution and proper handling of inputs and outputs.


Enabling Pseudo-Terminal Support

As of PowerShell 7.5, pseudo-terminal support is available as an experimental feature. To enable it:

  1. Update PowerShell: Ensure you’re running PowerShell 7.5 or later.
  2. Enable the Feature: Use the following command to turn on PTY support:
Enable-ExperimentalFeature -Name PseudoTerminalSupport

3. Restart PowerShell: Close and reopen your PowerShell session to apply the changes.

By leveraging pseudo-terminal support, PowerShell scripts become more capable of managing interactive commands and complex workflows, unlocking new possibilities for automation. Experiment with it and see how it fits into your toolkit!