Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build server-side call automation workflows including IVR systems, call routing, recording, and AI-powered interactions.
.claude/skills/azure-communication-callautomation-java/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | — | — |
| case-18 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-15 | ✗→✓ | ▲ Improved | — | — |
Build server-side call automation workflows including IVR systems, call routing, recording, and AI-powered interactions.
xml<dependency> <groupId>com.azure</groupId> <artifactId>azure-communication-callautomation</artifactId> <version>1.6.0</version> </dependency>
javaimport com.azure.communication.callautomation.CallAutomationClient; import com.azure.communication.callautomation.CallAutomationClientBuilder; import com.azure.identity.DefaultAzureCredentialBuilder; // With DefaultAzureCredential CallAutomationClient client = new CallAutomationClientBuilder() .endpoint("https://<resource>.communication.azure.com") .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // With connection string CallAutomationClient client = new CallAutomationClientBuilder() .connectionString("<connection-string>") .buildClient();
| 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 |
javaimport 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"); PhoneNumberIdentifier caller = new PhoneNumberIdentifier("+14255550100"); CreateCallOptions options = new CreateCallOptions( new CommunicationUserIdentifier("<user-id>"), // Source List.of(target)) // Targets .setSourceCallerId(caller) .setCallbackUrl("https://your-app.com/api/callbacks"); CreateCallResult result = client.createCall(options); String callConnectionId = result.getCallConnectionProperties().getCallConnectionId();
java// From Event Grid webhook - IncomingCall event String incomingCallContext = "<incoming-call-context-from-event>"; AnswerCallOptions options = new AnswerCallOptions( incomingCallContext, "https://your-app.com/api/callbacks"); AnswerCallResult result = client.answerCall(options); CallConnection callConnection = result.getCallConnection();
javaCallConnection callConnection = client.getCallConnection(callConnectionId); CallMedia callMedia = callConnection.getCallMedia(); // Play text-to-speech TextSource textSource = new TextSource() .setText("Welcome to Contoso. Press 1 for sales, 2 for support.") .setVoiceName("en-US-JennyNeural"); PlayOptions playOptions = new PlayOptions( List.of(textSource), List.of(new CommunicationUserIdentifier("<target-user>"))); callMedia.play(playOptions); // Play audio file FileSource fileSource = new FileSource() .setUrl("https://storage.blob.core.windows.net/audio/greeting.wav"); callMedia.play(new PlayOptions(List.of(fileSource), List.of(target)));
java// Recognize DTMF tones DtmfTone stopTones = DtmfTone.POUND; CallMediaRecognizeDtmfOptions recognizeOptions = new CallMediaRecognizeDtmfOptions( new CommunicationUserIdentifier("<target-user>"), 5) // Max tones to collect .setInterToneTimeout(Duration.ofSeconds(5)) .setStopTones(List.of(stopTones)) .setInitialSilenceTimeout(Duration.ofSeconds(15)) .setPlayPrompt(new TextSource().setText("Enter your account number followed by pound.")); callMedia.startRecognizing(recognizeOptions);
java// Speech recognition with AI CallMediaRecognizeSpeechOptions speechOptions = new CallMediaRecognizeSpeechOptions( new CommunicationUserIdentifier("<target-user>")) .setEndSilenceTimeout(Duration.ofSeconds(2)) .setSpeechLanguage("en-US") .setPlayPrompt(new TextSource().setText("How can I help you today?")); callMedia.startRecognizing(speechOptions);
javaCallRecording callRecording = client.getCallRecording(); // Start recording StartRecordingOptions recordingOptions = new StartRecordingOptions( new ServerCallLocator("<server-call-id>")) .setRecordingChannel(RecordingChannel.MIXED) .setRecordingContent(RecordingContent.AUDIO_VIDEO) .setRecordingFormat(RecordingFormat.MP4); RecordingStateResult recordingResult = callRecording.start(recordingOptions); String recordingId = recordingResult.getRecordingId(); // Pause/resume/stop callRecording.pause(recordingId); callRecording.resume(recordingId); callRecording.stop(recordingId); // Download recording (after RecordingFileStatusUpdated event) callRecording.downloadTo(recordingUrl, Paths.get("recording.mp4"));
javaCallConnection callConnection = client.getCallConnection(callConnectionId); CommunicationUserIdentifier participant = new CommunicationUserIdentifier("<user-id>"); AddParticipantOptions addOptions = new AddParticipantOptions(participant) .setInvitationTimeout(Duration.ofSeconds(30)); AddParticipantResult result = callConnection.addParticipant(addOptions);
java// Blind transfer PhoneNumberIdentifier transferTarget = new PhoneNumberIdentifier("+14255559999"); TransferCallToParticipantResult result = callConnection.transferCallToParticipant(transferTarget);
javaimport com.azure.communication.callautomation.CallAutomationEventParser; import com.azure.communication.callautomation.models.events.*; // In your webhook endpoint public void handleCallback(String requestBody) { List<CallAutomationEventBase> events = CallAutomationEventParser.parseEvents(requestBody); for (CallAutomationEventBase event : events) { if (event instanceof CallConnected) { CallConnected connected = (CallConnected) event; System.out.println("Call connected: " + connected.getCallConnectionId()); } else if (event instanceof RecognizeCompleted) { RecognizeCompleted recognized = (RecognizeCompleted) event; // Handle DTMF or speech recognition result DtmfResult dtmfResult = (DtmfResult) recognized.getRecognizeResult(); String tones = dtmfResult.getTones().stream() .map(DtmfTone::toString) .collect(Collectors.joining()); System.out.println("DTMF received: " + tones); } else if (event instanceof PlayCompleted) { System.out.println("Audio playback completed"); } else if (event instanceof CallDisconnected) { System.out.println("Call ended"); } } }
java// Hang up for all participants callConnection.hangUp(true); // Hang up only this leg callConnection.hangUp(false);
javaimport com.azure.core.exception.HttpResponseException; try { client.answerCall(options); } catch (HttpResponseException e) { if (e.getResponse().getStatusCode() == 404) { System.out.println("Call not found or already ended"); } else if (e.getResponse().getStatusCode() == 400) { System.out.println("Invalid request: " + e.getMessage()); } }
bashAZURE_COMMUNICATION_ENDPOINT=https://<resource>.communication.azure.com AZURE_COMMUNICATION_CONNECTION_STRING=endpoint=https://...;accesskey=... CALLBACK_BASE_URL=https://your-app.com/api/callbacks
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.