diff --git a/CallAutomation_LobbyCall_Sample/README.md b/CallAutomation_LobbyCall_Sample/README.md
new file mode 100644
index 0000000..8491db3
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/README.md
@@ -0,0 +1,163 @@
+|page_type| languages |products
+|---|---------------------------------------|---|
+|sample|
|| azure | azure-communication-services |
|
+
+# Call Automation - Lobby Call Sample
+
+This sample demonstrates how to utilize the Call Automation SDK to implement a Lobby Call scenario. Users join a lobby call and remain on hold until an user in the target call confirms their participation. Once approved, Call Automation (bot) automatically connects the lobby users to the designated target call.
+The sample uses a client application (java script sample) available in [Web Client Quickstart](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/users/v-kuppu/LobbyCallConfirmSample).
+
+## Features
+
+- **Lobby Call Management**: Automatically answer incoming calls and place them in a lobby
+- **Text-to-Speech**: Play waiting messages to lobby participants using Azure Cognitive Services
+- **Participant Management**: Move participants between lobby and target calls
+- **WebSocket Support**: Real-time communication for call state updates
+- **Event-Driven Architecture**: Handle Call Automation events via webhooks
+- **Dev Tunnel Integration**: Easy development with Azure Dev Tunnels for webhook delivery
+
+# Design
+
+
+
+
+## Prerequisites
+
+- Java 17 or later
+- Maven 3.6 or later
+- Azure Communication Services resource
+- Azure Cognitive Services resource (for text-to-speech)
+- Azure Dev Tunnels CLI (for local development)
+
+## Setup and Configuration
+
+### 1. Setup Azure Dev Tunnel
+
+[Azure DevTunnels](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/overview) enables you to expose your local development server to the internet for webhook delivery.
+
+```bash
+# Create a new dev tunnel
+devtunnel create --allow-anonymous
+
+# Create a port mapping for the application
+devtunnel port create -p 8443
+
+# Start the tunnel
+devtunnel host
+```
+
+Copy the HTTPS URL provided by dev tunnel (e.g., `https://abc123-8443.inc1.devtunnels.ms`) for use in configuration.
+
+### 2. Build and Run the Application
+
+Navigate to the project directory and run:
+
+```bash
+# Compile the application
+mvn compile
+
+# Build the package
+mvn package
+
+# Run the application
+mvn spring-boot:run
+```
+
+Alternative execution method:
+```bash
+mvn exec:java
+```
+
+The application will start on port 8443 and be accessible at:
+- **Local**: http://localhost:8443/swagger-ui/index.html
+- **Dev Tunnel**: https://your-tunnel-url/swagger-ui/index.html
+
+### 3. Configure Application Settings
+
+Use the Swagger UI to configure the application via the `/api/setConfiguration` endpoint:
+
+**Required Configuration Parameters:**
+
+1. **`acsConnectionString`**: Your Azure Communication Services connection string
+ - Format: `endpoint=https://your-acs-resource.communication.azure.com/;accesskey=your-access-key`
+
+2. **`cognitiveServiceEndpoint`**: Azure Cognitive Services endpoint for text-to-speech
+ - Format: `https://your-cognitive-service.cognitiveservices.azure.com/`
+
+3. **`callbackUriHost`**: Your application's base URL for webhook callbacks
+ - Local: `http://localhost:8443`
+ - Dev Tunnel: `https://your-tunnel-url` (without trailing slash)
+
+4. **`pmaEndpoint`**: Azure Communication Services endpoint
+ - Format: `https://your-acs-resource.communication.azure.com`
+
+5. **`acsGeneratedId`**: Communication user ID for receiving lobby calls
+ - Generate using ACS Identity SDK or Azure portal
+
+6. **`webSocketToken`**: Unique token for WebSocket endpoint security
+ - Use any unique string (e.g., UUID or custom token)
+
+## API Endpoints
+
+The application provides the following REST endpoints:
+
+### Core Endpoints
+- **`POST /api/setConfiguration`** - Configure application settings
+- **`POST /api/lobbyCallEventHandler`** - EventGrid webhook for incoming calls
+- **`POST /api/callbacks`** - Call Automation event callbacks
+- **`POST /targetCallToAcsUser`** - Create a target call to an ACS user
+- **`GET /getParticipants`** - List participants in the lobby call
+- **`GET /terminateCalls`** - Terminate all active calls
+
+### WebSocket Endpoint
+- **`/ws/{webSocketToken}`** - Real-time communication endpoint
+
+## Usage Flow
+
+1. **Configure the application** using `/api/setConfiguration`
+2. **Set up EventGrid webhook** to point to `/api/lobbyCallEventHandler`
+3. **Create a target call** using `/targetCallToAcsUser` with an ACS user ID
+4. **Incoming calls** are automatically answered and placed in lobby
+5. **Lobby participants** hear a waiting message via text-to-speech
+6. **Participants are automatically moved** to the target call after the message completes
+
+## Development Features
+
+### Environment Variables
+Configure dev tunnel support using environment variables:
+- `DEVTUNNEL_URL`: Your dev tunnel URL
+- `DEVTUNNEL_ENABLED`: Set to `true` to enable dev tunnel features
+
+### WebSocket Integration
+The application includes WebSocket support for real-time updates. WebSocket endpoints are dynamically configured based on the `webSocketToken` parameter.
+
+### Dynamic Server Configuration
+The Swagger UI automatically detects and displays available servers (local and dev tunnel) based on your configuration.
+
+## Technology Stack
+
+- **Spring Boot 3.0.6** - Web framework
+- **Azure Communication Services Call Automation SDK** - Call management
+- **Azure EventGrid** - Event handling
+- **WebSocket** - Real-time communication
+- **SpringDoc OpenAPI** - API documentation
+- **Maven** - Build tool
+- **Java 17** - Runtime environment
+
+## Troubleshooting
+
+### Common Issues
+
+1. **Dev Tunnel 502 Errors**: Ensure your application is running on port 8443 before starting the tunnel
+2. **Webhook Delivery Failures**: Verify your `callbackUriHost` matches your dev tunnel URL exactly
+3. **Audio Issues**: Confirm your Cognitive Services endpoint is correctly configured
+4. **Connection Issues**: Check that your ACS connection string is valid and has the required permissions
+
+### Logs and Monitoring
+The application provides detailed logging for all call events and operations. Check the console output for debugging information.
+
+## Additional Resources
+
+- [Azure Communication Services Documentation](https://docs.microsoft.com/en-us/azure/communication-services/)
+- [Call Automation SDK Reference](https://docs.microsoft.com/en-us/azure/communication-services/concepts/call-automation/)
+- [Azure Dev Tunnels Documentation](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/)
diff --git a/CallAutomation_LobbyCall_Sample/pom.xml b/CallAutomation_LobbyCall_Sample/pom.xml
new file mode 100644
index 0000000..318ea02
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/pom.xml
@@ -0,0 +1,195 @@
+
+
+ 4.0.0
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.0.6
+
+
+
+ com.communication.callautomation
+ CallAutomation_LobbyCallSample
+ 1.0-SNAPSHOT
+
+ CallAutomation_LobbyCallSample
+ CallAutomation Sample application for instructional usage
+
+
+ 17
+ 17
+ UTF-8
+ 1.18.26
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ com.vaadin.external.google
+ android-json
+
+
+
+
+ com.microsoft.azure
+ applicationinsights-spring-boot-starter
+ 2.6.4
+
+
+ junit
+ junit
+ 4.13.2
+ test
+
+
+ com.azure
+ azure-core
+ 1.42.0
+
+
+ com.azure
+ azure-identity
+ 1.10.4
+
+
+ com.azure
+ azure-communication-identity
+ 1.5.0
+
+
+ com.azure
+ azure-communication-callautomation
+ 1.6.0-beta.1
+
+
+ com.azure
+ azure-messaging-eventgrid
+ 4.16.0
+
+
+ com.azure
+ azure-communication-common
+ 1.5.0-beta.1
+
+
+ org.projectlombok
+ lombok
+ provided
+ ${lombok.version}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure-processor
+ true
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ 2.0.0
+
+
+ org.json
+ json
+ 20231013
+
+
+
+
+ azure-sdk-for-java
+ https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-java/maven/v1
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+ maven-clean-plugin
+ 3.2.0
+
+
+ maven-resources-plugin
+ 3.3.1
+
+
+ maven-compiler-plugin
+ 3.11.0
+
+
+ maven-surefire-plugin
+ 3.1.0
+
+
+ maven-jar-plugin
+ 3.3.0
+
+
+ maven-deploy-plugin
+ 3.1.1
+
+
+ maven-site-plugin
+ 3.12.1
+
+
+ maven-project-info-reports-plugin
+ 3.4.3
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 3.1.0
+
+
+
+ java
+
+
+
+
+ com.communication.callautomation.Main
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 3.2.5
+
+
+
+ repackage
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CallAutomation_LobbyCall_Sample/resources/Lobby_Call_Support_Scenario.jpg b/CallAutomation_LobbyCall_Sample/resources/Lobby_Call_Support_Scenario.jpg
new file mode 100644
index 0000000..92225d4
Binary files /dev/null and b/CallAutomation_LobbyCall_Sample/resources/Lobby_Call_Support_Scenario.jpg differ
diff --git a/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/ConfigurationRequest.java b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/ConfigurationRequest.java
new file mode 100644
index 0000000..4814912
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/ConfigurationRequest.java
@@ -0,0 +1,31 @@
+package com.communication.callautomation;
+
+import lombok.Getter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+
+@ConfigurationProperties(prefix = "acs")
+@Getter
+public class ConfigurationRequest {
+ private String acsConnectionString;
+ private String cognitiveServiceEndpoint;
+ private String callbackUriHost;
+ private String acsGeneratedIdForTargetCallSender;
+
+ // Getters and Setters
+ public void setAcsConnectionString(String acsConnectionString) {
+ this.acsConnectionString = acsConnectionString;
+ }
+
+ public void setCognitiveServiceEndpoint(String cognitiveServiceEndpoint) {
+ this.cognitiveServiceEndpoint = cognitiveServiceEndpoint;
+ }
+
+ public void setCallbackUriHost(String callbackUriHost) {
+ this.callbackUriHost = callbackUriHost;
+ }
+
+ public void setAcsGeneratedIdForTargetCallSender(String acsGeneratedIdForTargetCallSender) {
+ this.acsGeneratedIdForTargetCallSender = acsGeneratedIdForTargetCallSender;
+ }
+}
diff --git a/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/CorsConfig.java b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/CorsConfig.java
new file mode 100644
index 0000000..82a2fb1
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/CorsConfig.java
@@ -0,0 +1,25 @@
+package com.communication.callautomation;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.lang.NonNull;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class CorsConfig {
+
+ @Bean
+ public WebMvcConfigurer corsConfigurer() {
+ return new WebMvcConfigurer() {
+ @Override
+ public void addCorsMappings(@NonNull CorsRegistry registry) {
+ registry.addMapping("/**") // Allow all endpoints
+ .allowedOrigins("*") // Allow all origins
+ .allowedMethods("*") // Allow all HTTP methods
+ .allowedHeaders("*") // Allow all headers
+ .allowCredentials(false); // Disable credentials for security
+ }
+ };
+ }
+}
\ No newline at end of file
diff --git a/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/LobbyWebSocketHandler.java b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/LobbyWebSocketHandler.java
new file mode 100644
index 0000000..db1f25b
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/LobbyWebSocketHandler.java
@@ -0,0 +1,55 @@
+package com.communication.callautomation;
+
+import org.springframework.lang.NonNull;
+import org.springframework.stereotype.Component;
+import org.springframework.web.socket.TextMessage;
+import org.springframework.web.socket.WebSocketSession;
+import org.springframework.web.socket.handler.TextWebSocketHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component
+public class LobbyWebSocketHandler extends TextWebSocketHandler {
+ private final List sessions = new ArrayList<>();
+ private static final Logger log = LoggerFactory.getLogger(LobbyWebSocketHandler.class);
+
+ // Reference to ProgramSample for handling messages
+ private ProgramSample programSample;
+
+ public void setProgramSample(ProgramSample programSample) {
+ this.programSample = programSample;
+ }
+
+ @Override
+ public void afterConnectionEstablished(@NonNull WebSocketSession session) {
+ sessions.add(session);
+ log.info("WebSocket connection established: " + session.getId());
+ }
+
+ @Override
+ protected void handleTextMessage(@NonNull WebSocketSession session, @NonNull TextMessage message) throws Exception {
+ log.info("Received WebSocket message: " + message.getPayload());
+
+ // Delegate to ProgramSample if available
+ if (programSample != null) {
+ programSample.handleWebSocketMessage(session, message);
+ } else {
+ log.warn("ProgramSample not available, cannot process message");
+ }
+ }
+
+ @Override
+ public void handleTransportError(@NonNull WebSocketSession session, @NonNull Throwable exception) throws Exception {
+ log.error("WebSocket transport error: " + exception.getMessage());
+ }
+
+ @Override
+ public void afterConnectionClosed(@NonNull WebSocketSession session, @NonNull org.springframework.web.socket.CloseStatus status) throws Exception {
+ sessions.remove(session);
+ log.info("WebSocket connection closed: " + session.getId());
+ }
+}
diff --git a/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/Main.java b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/Main.java
new file mode 100644
index 0000000..85a3ed8
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/Main.java
@@ -0,0 +1,13 @@
+package com.communication.callautomation;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+
+@SpringBootApplication
+@EnableConfigurationProperties(value = ConfigurationRequest.class)
+public class Main {
+ public static void main(String[] args) {
+ SpringApplication.run(Main.class, args);
+ }
+}
\ No newline at end of file
diff --git a/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/OpenApiConfig.java b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/OpenApiConfig.java
new file mode 100644
index 0000000..6f53aa7
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/OpenApiConfig.java
@@ -0,0 +1,68 @@
+package com.communication.callautomation;
+
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+import io.swagger.v3.oas.models.servers.Server;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+import java.util.ArrayList;
+
+@Configuration
+public class OpenApiConfig {
+
+ @Value("${devtunnel.url:}")
+ private String devTunnelUrl;
+
+ @Value("${devtunnel.enabled:false}")
+ private boolean devTunnelEnabled;
+
+ @Value("${server.port:8443}")
+ private int serverPort;
+
+ @Bean
+ public OpenAPI customOpenAPI() {
+ List servers = new ArrayList<>();
+
+ // Local server
+ Server localServer = new Server();
+ localServer.setUrl("http://localhost:" + serverPort);
+ localServer.setDescription("Local Server (HTTP on port " + serverPort + ")");
+ servers.add(localServer);
+
+ // Dev Tunnel server (only if configured)
+ if (devTunnelEnabled && StringUtils.hasText(devTunnelUrl)) {
+ Server devTunnelServer = new Server();
+ devTunnelServer.setUrl(devTunnelUrl);
+ devTunnelServer.setDescription("Dev Tunnel Server (HTTPS via tunnel)");
+ servers.add(devTunnelServer);
+ }
+
+ String description = buildDescription();
+
+ return new OpenAPI()
+ .info(new Info()
+ .title("Call Automation Lobby Call Sample API")
+ .description(description)
+ .version("1.0.0"))
+ .servers(servers);
+ }
+
+ private String buildDescription() {
+ StringBuilder desc = new StringBuilder();
+ desc.append("Azure Communication Services Call Automation API for managing lobby calls.\n");
+ desc.append("**🚀 Server Access Information:**\n");
+ desc.append("- **Local**: [http://localhost:").append(serverPort).append("/swagger-ui/index.html](http://localhost:").append(serverPort).append("/swagger-ui/index.html)\n");
+
+ if (devTunnelEnabled && StringUtils.hasText(devTunnelUrl)) {
+ desc.append("- **Dev Tunnel**: [").append(devTunnelUrl).append("/swagger-ui/index.html](").append(devTunnelUrl).append("/swagger-ui/index.html)\n");
+ } else {
+ desc.append("- **Dev Tunnel**: Not configured (set DEVTUNNEL_URL environment variable)\n");
+ }
+
+ return desc.toString();
+ }
+}
diff --git a/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/ProgramSample.java b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/ProgramSample.java
new file mode 100644
index 0000000..7b76f43
--- /dev/null
+++ b/CallAutomation_LobbyCall_Sample/src/main/java/com/communication/callautomation/ProgramSample.java
@@ -0,0 +1,455 @@
+package com.communication.callautomation;
+
+import com.azure.communication.callautomation.CallAutomationClient;
+import com.azure.communication.callautomation.CallAutomationClientBuilder;
+import com.azure.communication.callautomation.CallAutomationEventParser;
+import com.azure.communication.callautomation.CallConnection;
+import com.azure.communication.callautomation.CallMedia;
+import com.azure.communication.callautomation.models.*;
+import com.azure.communication.callautomation.models.events.*;
+import com.azure.messaging.eventgrid.EventGridEvent;
+import com.azure.messaging.eventgrid.SystemEventNames;
+import com.azure.messaging.eventgrid.systemevents.SubscriptionValidationEventData;
+import com.azure.messaging.eventgrid.systemevents.SubscriptionValidationResponse;
+import com.azure.communication.common.CommunicationIdentifier;
+import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.PhoneNumberIdentifier;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+
+import io.swagger.v3.oas.annotations.tags.Tag;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.json.JSONObject;
+
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.socket.TextMessage;
+import org.springframework.web.socket.WebSocketSession;
+import org.springframework.http.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import jakarta.annotation.PostConstruct;
+import java.net.URI;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import java.util.Comparator;
+
+@RestController
+public class ProgramSample {
+
+ private CallAutomationClient acsClient;
+ private static final Logger log = LoggerFactory.getLogger(ProgramSample.class);
+
+ @Autowired
+ private LobbyWebSocketHandler lobbyWebSocketHandler;
+
+ // Configuration state variables
+ private ConfigurationRequest configuration = new ConfigurationRequest();
+ private String acsConnectionString = "";
+ private String cognitiveServiceEndpoint = "";
+ private String callbackUriHost = "";
+ private String acsGeneratedIdForTargetCallSender = "";
+ private String acsGeneratedIdForTargetCallReceiver = "";
+ private String acsGeneratedIdForLobbyCallReceiver = "";
+
+ private String textToPlayToLobbyUser = "You are currently in a lobby call, we will notify the admin that you are waiting.";
+ private String confirmMessageToTargetCall = "A user is waiting in lobby, do you want to add the lobby user to your call?";
+
+ private String lobbyCallConnectionId = "";
+ private String targetCallConnectionId = "";
+ private String lobbyCallerId = "";
+
+ @PostConstruct
+ public void init() {
+ // Set up the connection between ProgramSample and LobbyWebSocketHandler
+ if (lobbyWebSocketHandler != null) {
+ lobbyWebSocketHandler.setProgramSample(this);
+ }
+ }
+
+ // Method to handle WebSocket messages (called by LobbyWebSocketHandler)
+ public void handleWebSocketMessage(WebSocketSession session, TextMessage message) {
+ String jsResponse = message.getPayload();
+ log.info("Received from JS: " + jsResponse);
+
+ if ("yes".equalsIgnoreCase(jsResponse.trim())) {
+ log.info("TODO: Move Participant");
+ try {
+ log.info(
+ "\n~~~~~~~~~~~~ /api/callbacks ~~~~~~~~~~~~\n" +
+ "Move Participant operation started..\n" +
+ "Source Caller Id: " + lobbyCallerId + "\n" +
+ "Source Connection Id: " + lobbyCallConnectionId + "\n" +
+ "Target Connection Id: " + targetCallConnectionId + "\n"
+ );
+
+ CallConnection targetConnection = acsClient.getCallConnection(targetCallConnectionId);
+ // CallConnection sourceConnection = client.getCallConnection(lobbyConnectionId.get());
+
+ CommunicationIdentifier participantToMove;
+ if (lobbyCallerId.startsWith("+")) {
+ participantToMove = new PhoneNumberIdentifier(lobbyCallerId);
+ } else if (lobbyCallerId.startsWith("8:acs")) {
+ participantToMove = new CommunicationUserIdentifier(lobbyCallerId);
+ } else {
+ log.error("Invalid participant identifier");
+ return;
+ }
+
+ targetConnection.moveParticipants(java.util.Collections.singletonList(participantToMove), lobbyCallConnectionId);
+ // If no exception is thrown, the operation is considered successful
+ log.info("Move Participants operation completed successfully.");
+ } catch (Exception ex) {
+ log.info("Error in manual move participants operation: " + ex.getMessage());
+ }
+ }
+ }
+
+ private ResponseEntity