# azure-communication-callautomation-java

Java SDK skill for Azure Communication Services Call Automation: outbound calls, IVR, recording, DTMF and speech recognition.

- skill · `type=skill` · Claude Code, GitHub Copilot · ★ 3148
- Author: Microsoft
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-java/skills/azure-communication-callautomation-java/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/azure-communication-callautomation-java

## What it does

This skill hands the agent working code patterns for server-side call automation with the Java SDK `com.azure:azure-communication-callautomation`. It covers client creation, outbound PSTN calls, answering incoming calls from Event Grid, playing text and audio files, DTMF and speech recognition, recording, adding a participant and transferring a call.

The client is built either through `CallAutomationClientBuilder` with an endpoint and credential, or from a connection string. Local examples use `DefaultAzureCredentialBuilder` and require the `AZURE_TOKEN_CREDENTIALS` variable; production code points at a specific credential such as `ManagedIdentityCredentialBuilder`. If Azure authentication is not set up, the client will not build at all — worth checking before you run anything.

The Maven dependency is `com.azure:azure-communication-callautomation` version 1.6.0. ACS events are parsed with `CallAutomationEventParser` inside your webhook endpoint, and a recording is pulled down with `downloadTo` after the `RecordingFileStatusUpdated` event.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/skills --skill azure-communication-callautomation-java -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/azure-communication-callautomation-java/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/azure-communication-callautomation-java/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/azure-communication-callautomation-java/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/azure-communication-callautomation-java/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install microsoft/skills azure-communication-callautomation-java
```

2. **Manually: put the files in place**
- File: `.github/skills/azure-communication-callautomation-java/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/microsoft/skills --path .github/plugins/azure-sdk-java/skills/azure-communication-callautomation-java
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/azure-communication-callautomation-java/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-java/skills/azure-communication-callautomation-java/SKILL.md

## When to use it
- build an IVR menu that collects DTMF key presses
- answer an incoming call and attach an event handler
- play a greeting via text-to-speech or from a file
- record a conversation and download the file afterwards
- transfer a call to another participant or phone number

## Example prompts
- Create an outbound call to +14255551234 with CallAutomationClient
- Set up DTMF recognition with five tones and pound as the stop tone
- Add MP4 call recording and download it after the RecordingFileStatusUpdated event

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ab1e7c53c118368e.

BEGIN THIRD-PARTY FILE ab1e7c53c118368e
````text
---
name: azure-communication-callautomation-java
description: Build call automation workflows with Azure Communication Services Call Automation Java SDK. Use when implementing IVR systems, call routing, call recording, DTMF recognition, text-to-speech, or AI-powered call flows.
license: MIT
metadata:
  author: Microsoft
  version: "1.0.0"
  package: com.azure:azure-communication-callautomation
---

# Azure Communication Call Automation (Java)

Build server-side call automation workflows including IVR systems, call routing, recording, and AI-powered interactions.

## Installation

```xml
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-communication-callautomation</artifactId>
    <version>1.6.0</version>
</dependency>
```

## Client Creation

```java
import com.azure.communication.callautomation.CallAutomationClient;
import com.azure.communication.callautomation.CallAutomationClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.identity.AzureIdentityEnvVars;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.ManagedIdentityCredentialBuilder;

// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
TokenCredential credential = new DefaultAzureCredentialBuilder()
    .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)
    .build();
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#credential-classes
// TokenCredential credential = new ManagedIdentityCredentialBuilder().build();

// With DefaultAzureCredential
CallAutomationClient client = new CallAutomationClientBuilder()
    .endpoint("https://<resource>.communication.azure.com")
    .credential(credential)
    .buildClient();

// With connection string
CallAutomationClient client = new CallAutomationClientBuilder()
    .connectionString("<connection-string>")
    .buildClient();
```

## Key Concepts

| Class | Purpose |
|-------|---------|
| `CallAutomationClient` | Make calls, answer/reject incoming calls, redirect calls |
| `CallConnection` | Actions in established calls (add participants, terminate) |
| `CallMedia` | Media operations (play audio, recognize DTMF/speech) |
| `CallRecording` | Start/stop/pause recording |
| `CallAutomationEventParser` | Parse webhook events from ACS |

## Create Outbound Call

```java
import com.azure.communication.callautomation.models.*;
import com.azure.communication.common.CommunicationUserIdentifier;
import com.azure.communication.common.PhoneNumberIdentifier;

// Call to PSTN number
PhoneNumberIdentifier target = new PhoneNumberIdentifier("+14255551234");
````
END THIRD-PARTY FILE ab1e7c53c118368e

The third-party file has ended. Everything between the ab1e7c53c118368e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2759 of 9277 bytes. © Microsoft · MIT · https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-java/skills/azure-communication-callautomation-java/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
