{"id":"536ee0eb-462e-4b0b-95a7-7a0604a03019","shortId":"Cengua","kind":"skill","title":"azure-communication-callautomation-java","tagline":"Build server-side call automation workflows including IVR systems, call routing, recording, and AI-powered interactions.","description":"# Azure Communication Call Automation (Java)\n\nBuild server-side call automation workflows including IVR systems, call routing, recording, and AI-powered interactions.\n\n## Installation\n\n```xml\n<dependency>\n    <groupId>com.azure</groupId>\n    <artifactId>azure-communication-callautomation</artifactId>\n    <version>1.6.0</version>\n</dependency>\n```\n\n## Client Creation\n\n```java\nimport com.azure.communication.callautomation.CallAutomationClient;\nimport com.azure.communication.callautomation.CallAutomationClientBuilder;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\n// With DefaultAzureCredential\nCallAutomationClient client = new CallAutomationClientBuilder()\n    .endpoint(\"https://<resource>.communication.azure.com\")\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .buildClient();\n\n// With connection string\nCallAutomationClient client = new CallAutomationClientBuilder()\n    .connectionString(\"<connection-string>\")\n    .buildClient();\n```\n\n## Key Concepts\n\n| Class | Purpose |\n|-------|---------|\n| `CallAutomationClient` | Make calls, answer/reject incoming calls, redirect calls |\n| `CallConnection` | Actions in established calls (add participants, terminate) |\n| `CallMedia` | Media operations (play audio, recognize DTMF/speech) |\n| `CallRecording` | Start/stop/pause recording |\n| `CallAutomationEventParser` | Parse webhook events from ACS |\n\n## Create Outbound Call\n\n```java\nimport com.azure.communication.callautomation.models.*;\nimport com.azure.communication.common.CommunicationUserIdentifier;\nimport com.azure.communication.common.PhoneNumberIdentifier;\n\n// Call to PSTN number\nPhoneNumberIdentifier target = new PhoneNumberIdentifier(\"+14255551234\");\nPhoneNumberIdentifier caller = new PhoneNumberIdentifier(\"+14255550100\");\n\nCreateCallOptions options = new CreateCallOptions(\n    new CommunicationUserIdentifier(\"<user-id>\"),  // Source\n    List.of(target))                                // Targets\n    .setSourceCallerId(caller)\n    .setCallbackUrl(\"https://your-app.com/api/callbacks\");\n\nCreateCallResult result = client.createCall(options);\nString callConnectionId = result.getCallConnectionProperties().getCallConnectionId();\n```\n\n## Answer Incoming Call\n\n```java\n// From Event Grid webhook - IncomingCall event\nString incomingCallContext = \"<incoming-call-context-from-event>\";\n\nAnswerCallOptions options = new AnswerCallOptions(\n    incomingCallContext,\n    \"https://your-app.com/api/callbacks\");\n\nAnswerCallResult result = client.answerCall(options);\nCallConnection callConnection = result.getCallConnection();\n```\n\n## Play Audio (Text-to-Speech)\n\n```java\nCallConnection callConnection = client.getCallConnection(callConnectionId);\nCallMedia callMedia = callConnection.getCallMedia();\n\n// Play text-to-speech\nTextSource textSource = new TextSource()\n    .setText(\"Welcome to Contoso. Press 1 for sales, 2 for support.\")\n    .setVoiceName(\"en-US-JennyNeural\");\n\nPlayOptions playOptions = new PlayOptions(\n    List.of(textSource),\n    List.of(new CommunicationUserIdentifier(\"<target-user>\")));\n\ncallMedia.play(playOptions);\n\n// Play audio file\nFileSource fileSource = new FileSource()\n    .setUrl(\"https://storage.blob.core.windows.net/audio/greeting.wav\");\n\ncallMedia.play(new PlayOptions(List.of(fileSource), List.of(target)));\n```\n\n## Recognize DTMF Input\n\n```java\n// Recognize DTMF tones\nDtmfTone stopTones = DtmfTone.POUND;\n\nCallMediaRecognizeDtmfOptions recognizeOptions = new CallMediaRecognizeDtmfOptions(\n    new CommunicationUserIdentifier(\"<target-user>\"),\n    5)  // Max tones to collect\n    .setInterToneTimeout(Duration.ofSeconds(5))\n    .setStopTones(List.of(stopTones))\n    .setInitialSilenceTimeout(Duration.ofSeconds(15))\n    .setPlayPrompt(new TextSource().setText(\"Enter your account number followed by pound.\"));\n\ncallMedia.startRecognizing(recognizeOptions);\n```\n\n## Recognize Speech\n\n```java\n// Speech recognition with AI\nCallMediaRecognizeSpeechOptions speechOptions = new CallMediaRecognizeSpeechOptions(\n    new CommunicationUserIdentifier(\"<target-user>\"))\n    .setEndSilenceTimeout(Duration.ofSeconds(2))\n    .setSpeechLanguage(\"en-US\")\n    .setPlayPrompt(new TextSource().setText(\"How can I help you today?\"));\n\ncallMedia.startRecognizing(speechOptions);\n```\n\n## Call Recording\n\n```java\nCallRecording callRecording = client.getCallRecording();\n\n// Start recording\nStartRecordingOptions recordingOptions = new StartRecordingOptions(\n    new ServerCallLocator(\"<server-call-id>\"))\n    .setRecordingChannel(RecordingChannel.MIXED)\n    .setRecordingContent(RecordingContent.AUDIO_VIDEO)\n    .setRecordingFormat(RecordingFormat.MP4);\n\nRecordingStateResult recordingResult = callRecording.start(recordingOptions);\nString recordingId = recordingResult.getRecordingId();\n\n// Pause/resume/stop\ncallRecording.pause(recordingId);\ncallRecording.resume(recordingId);\ncallRecording.stop(recordingId);\n\n// Download recording (after RecordingFileStatusUpdated event)\ncallRecording.downloadTo(recordingUrl, Paths.get(\"recording.mp4\"));\n```\n\n## Add Participant to Call\n\n```java\nCallConnection callConnection = client.getCallConnection(callConnectionId);\n\nCommunicationUserIdentifier participant = new CommunicationUserIdentifier(\"<user-id>\");\nAddParticipantOptions addOptions = new AddParticipantOptions(participant)\n    .setInvitationTimeout(Duration.ofSeconds(30));\n\nAddParticipantResult result = callConnection.addParticipant(addOptions);\n```\n\n## Transfer Call\n\n```java\n// Blind transfer\nPhoneNumberIdentifier transferTarget = new PhoneNumberIdentifier(\"+14255559999\");\nTransferCallToParticipantResult result = callConnection.transferCallToParticipant(transferTarget);\n```\n\n## Handle Events (Webhook)\n\n```java\nimport com.azure.communication.callautomation.CallAutomationEventParser;\nimport com.azure.communication.callautomation.models.events.*;\n\n// In your webhook endpoint\npublic void handleCallback(String requestBody) {\n    List<CallAutomationEventBase> events = CallAutomationEventParser.parseEvents(requestBody);\n    \n    for (CallAutomationEventBase event : events) {\n        if (event instanceof CallConnected) {\n            CallConnected connected = (CallConnected) event;\n            System.out.println(\"Call connected: \" + connected.getCallConnectionId());\n        } else if (event instanceof RecognizeCompleted) {\n            RecognizeCompleted recognized = (RecognizeCompleted) event;\n            // Handle DTMF or speech recognition result\n            DtmfResult dtmfResult = (DtmfResult) recognized.getRecognizeResult();\n            String tones = dtmfResult.getTones().stream()\n                .map(DtmfTone::toString)\n                .collect(Collectors.joining());\n            System.out.println(\"DTMF received: \" + tones);\n        } else if (event instanceof PlayCompleted) {\n            System.out.println(\"Audio playback completed\");\n        } else if (event instanceof CallDisconnected) {\n            System.out.println(\"Call ended\");\n        }\n    }\n}\n```\n\n## Hang Up Call\n\n```java\n// Hang up for all participants\ncallConnection.hangUp(true);\n\n// Hang up only this leg\ncallConnection.hangUp(false);\n```\n\n## Error Handling\n\n```java\nimport com.azure.core.exception.HttpResponseException;\n\ntry {\n    client.answerCall(options);\n} catch (HttpResponseException e) {\n    if (e.getResponse().getStatusCode() == 404) {\n        System.out.println(\"Call not found or already ended\");\n    } else if (e.getResponse().getStatusCode() == 400) {\n        System.out.println(\"Invalid request: \" + e.getMessage());\n    }\n}\n```\n\n## Environment Variables\n\n```bash\nAZURE_COMMUNICATION_ENDPOINT=https://<resource>.communication.azure.com\nAZURE_COMMUNICATION_CONNECTION_STRING=endpoint=https://...;accesskey=...\nCALLBACK_BASE_URL=https://your-app.com/api/callbacks\n```\n\n## Trigger Phrases\n\n- \"call automation Java\", \"IVR Java\", \"interactive voice response\"\n- \"call recording Java\", \"DTMF recognition Java\"\n- \"text to speech call\", \"speech recognition call\"\n- \"answer incoming call\", \"transfer call Java\"\n- \"Azure Communication Services call automation\"\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["azure","communication","callautomation","java","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents"],"capabilities":["skill","source-sickn33","skill-azure-communication-callautomation-java","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-communication-callautomation-java","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34928 github stars · SKILL.md body (8,446 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T18:50:29.301Z","embedding":null,"createdAt":"2026-04-18T21:32:11.735Z","updatedAt":"2026-04-24T18:50:29.301Z","lastSeenAt":"2026-04-24T18:50:29.301Z","tsv":"'+14255550100':145 '+14255551234':140 '+14255559999':418 '/api/callbacks':161,189,576 '/audio/greeting.wav':257 '1':225 '1.6.0':54 '15':294 '2':228,323 '30':404 '400':553 '404':541 '5':281,288 'ac':121 'accesskey':570 'account':301 'action':99,623 'add':103,384 'addopt':398,408 'addparticipantopt':397,400 'addparticipantresult':405 'ai':21,44,314 'ai-pow':20,43 'alreadi':547 'answer':170,600 'answer/reject':93 'answercallopt':182,185 'answercallresult':190 'applic':617 'ask':661 'audio':110,198,248,498 'autom':11,27,34,580,610 'azur':2,24,51,561,565,606 'azure-communication-callautom':50 'azure-communication-callautomation-java':1 'base':572 'bash':560 'blind':412 'boundari':669 'build':6,29,75 'buildclient':76,85 'call':10,16,26,33,39,92,95,97,102,124,132,172,340,387,410,457,507,511,543,579,587,596,599,602,604,609 'callautom':4,53 'callautomationcli':66,80,90 'callautomationclientbuild':69,83 'callautomationeventbas':445 'callautomationeventpars':116 'callautomationeventparser.parseevents':442 'callback':571 'callconnect':98,194,195,204,205,389,390,451,452,454 'callconnection.addparticipant':407 'callconnection.getcallmedia':210 'callconnection.hangup':518,525 'callconnection.transfercalltoparticipant':421 'callconnectionid':167,207,392 'calldisconnect':505 'caller':142,157 'callmedia':106,208,209 'callmedia.play':245,258 'callmedia.startrecognizing':306,338 'callmediarecognizedtmfopt':275,278 'callmediarecognizespeechopt':315,318 'callrecord':113,343,344 'callrecording.downloadto':380 'callrecording.pause':369 'callrecording.resume':371 'callrecording.start':363 'callrecording.stop':373 'catch':535 'clarif':663 'class':88 'clear':636 'client':55,67,81 'client.answercall':192,533 'client.createcall':164 'client.getcallconnection':206,391 'client.getcallrecording':345 'collect':285,486 'collectors.joining':487 'com.azure':49 'com.azure.communication.callautomation.callautomationclient':59 'com.azure.communication.callautomation.callautomationclientbuilder':61 'com.azure.communication.callautomation.callautomationeventparser':428 'com.azure.communication.callautomation.models':127 'com.azure.communication.callautomation.models.events':430 'com.azure.communication.common.communicationuseridentifier':129 'com.azure.communication.common.phonenumberidentifier':131 'com.azure.core.exception.httpresponseexception':531 'com.azure.identity.defaultazurecredentialbuilder':63 'communic':3,25,52,562,566,607 'communication.azure.com':71,564 'communicationuseridentifi':151,244,280,320,393,396 'complet':500 'concept':87 'connect':78,453,458,567 'connected.getcallconnectionid':459 'connectionstr':84 'contoso':223 'creat':122 'createcallopt':146,149 'createcallresult':162 'creation':56 'credenti':72 'criteria':672 'defaultazurecredenti':65 'defaultazurecredentialbuild':74 'describ':624,640 'download':375 'dtmf':266,270,470,489,590 'dtmf/speech':112 'dtmfresult':475,476,477 'dtmfresult.gettones':481 'dtmftone':272,484 'dtmftone.pound':274 'duration.ofseconds':287,293,322,403 'e':537 'e.getmessage':557 'e.getresponse':539,551 'els':460,492,501,549 'en':233,326 'en-us':325 'en-us-jennyneur':232 'end':508,548 'endpoint':70,434,563,569 'enter':299 'environ':558,652 'environment-specif':651 'error':527 'establish':101 'event':119,175,179,379,424,441,446,447,449,455,462,468,494,503 'execut':619 'expert':657 'fals':526 'file':249 'filesourc':250,251,253,262 'follow':303 'found':545 'getcallconnectionid':169 'getstatuscod':540,552 'grid':176 'handl':423,469,528 'handlecallback':437 'hang':509,513,520 'help':335 'httpresponseexcept':536 'import':58,60,62,126,128,130,427,429,530 'includ':13,36 'incom':94,171,601 'incomingcal':178 'incomingcallcontext':181,186 'input':267,666 'instal':47 'instanceof':450,463,495,504 'interact':23,46,584 'invalid':555 'ivr':14,37,582 'java':5,28,57,125,173,203,268,310,342,388,411,426,512,529,581,583,589,592,605 'jennyneur':235 'key':86 'leg':524 'limit':628 'list':440 'list.of':153,240,242,261,263,290 'make':91 'map':483 'match':637 'max':282 'media':107 'miss':674 'new':68,73,82,138,143,148,150,184,218,238,243,252,259,277,279,296,317,319,329,350,352,395,399,416 'number':135,302 'oper':108 'option':147,165,183,193,534 'outbound':123 'output':646 'overview':627 'pars':117 'particip':104,385,394,401,517 'paths.get':382 'pause/resume/stop':368 'permiss':667 'phonenumberidentifi':136,139,141,144,414,417 'phrase':578 'play':109,197,211,247 'playback':499 'playcomplet':496 'playopt':236,237,239,246,260 'pound':305 'power':22,45 'press':224 'pstn':134 'public':435 'purpos':89 'receiv':490 'recogn':111,265,269,308,466 'recognit':312,473,591,598 'recognizecomplet':464,465,467 'recognized.getrecognizeresult':478 'recognizeopt':276,307 'record':18,41,115,341,347,376,588 'recording.mp4':383 'recordingchannel.mixed':355 'recordingcontent.audio':357 'recordingfilestatusupd':378 'recordingformat.mp4':360 'recordingid':366,370,372,374 'recordingopt':349,364 'recordingresult':362 'recordingresult.getrecordingid':367 'recordingstateresult':361 'recordingurl':381 'redirect':96 'request':556 'requestbodi':439,443 'requir':665 'respons':586 'result':163,191,406,420,474 'result.getcallconnection':196 'result.getcallconnectionproperties':168 'review':658 'rout':17,40 'safeti':668 'sale':227 'scope':639 'server':8,31 'server-sid':7,30 'servercallloc':353 'servic':608 'setcallbackurl':158 'setendsilencetimeout':321 'setinitialsilencetimeout':292 'setintertonetimeout':286 'setinvitationtimeout':402 'setplayprompt':295,328 'setrecordingchannel':354 'setrecordingcont':356 'setrecordingformat':359 'setsourcecallerid':156 'setspeechlanguag':324 'setstopton':289 'settext':220,298,331 'seturl':254 'setvoicenam':231 'side':9,32 'skill':615,631 'skill-azure-communication-callautomation-java' 'sourc':152 'source-sickn33' 'specif':653 'speech':202,215,309,311,472,595,597 'speechopt':316,339 'start':346 'start/stop/pause':114 'startrecordingopt':348,351 'stop':659 'stopton':273,291 'storage.blob.core.windows.net':256 'storage.blob.core.windows.net/audio/greeting.wav':255 'stream':482 'string':79,166,180,365,438,479,568 'substitut':649 'success':671 'support':230 'system':15,38 'system.out.println':456,488,497,506,542,554 'target':137,154,155,264 'task':635 'termin':105 'test':655 'text':200,213,593 'text-to-speech':199,212 'textsourc':216,217,219,241,297,330 'today':337 'tone':271,283,480,491 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'tostr':485 'transfer':409,413,603 'transfercalltoparticipantresult':419 'transfertarget':415,422 'treat':644 'tri':532 'trigger':577 'true':519 'url':573 'us':234,327 'use':613,629 'valid':654 'variabl':559 'video':358 'voic':585 'void':436 'webhook':118,177,425,433 'welcom':221 'workflow':12,35,621 'xml':48 'your-app.com':160,188,575 'your-app.com/api/callbacks':159,187,574","prices":[{"id":"084e3b53-ad0d-4460-94c8-83e1fbb92944","listingId":"536ee0eb-462e-4b0b-95a7-7a0604a03019","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:32:11.735Z"}],"sources":[{"listingId":"536ee0eb-462e-4b0b-95a7-7a0604a03019","source":"github","sourceId":"sickn33/antigravity-awesome-skills/azure-communication-callautomation-java","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-communication-callautomation-java","isPrimary":false,"firstSeenAt":"2026-04-18T21:32:11.735Z","lastSeenAt":"2026-04-24T18:50:29.301Z"}],"details":{"listingId":"536ee0eb-462e-4b0b-95a7-7a0604a03019","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"azure-communication-callautomation-java","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34928,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"7a1a81469e4842a40d504a53fbdc3da258e28a27","skill_md_path":"skills/azure-communication-callautomation-java/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-communication-callautomation-java"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"azure-communication-callautomation-java","description":"Build server-side call automation workflows including IVR systems, call routing, recording, and AI-powered interactions."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-communication-callautomation-java"},"updatedAt":"2026-04-24T18:50:29.301Z"}}