How zhouhailin/freeswitch-externals works
This repository provides a Java FreeSWITCH Event Socket Layer (ESL) client plus a Spring Boot starter. Its main workflow configures one or more FreeSWITCH servers, creates and starts an inbound client, connects over Netty, then exchanges commands and delivers parsed events to listeners or handlers. The README also documents cluster connections and dynamic server add/remove. Source excerpts establish some runtime calls; starter auto-wiring and several implementation details are represented only where the README documents them.
Main entry points: InboundClient.java Inbound client API · InboundChannelHandler.java Channel handler · AbstractInboundClient.java Client lifecycle · InboundClientOption.java Client options
Components 20
Spring Boot Starter
- Starter properties
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/properties/InboundClientProperties.java - Auto-configuration
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/config/FreeswitchEslAutoConfiguration.java - Option handler
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/handler/AbstractInboundClientOptionHandler.java - Event handlers
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/handler/DefaultEslEventHandler.java - Listener templates
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/template/IEslEventListenerTemplate.java
Client Configuration
- Inbound client API
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/InboundClient.java - Client factory
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/InboundClientFactory.java - Client options
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/option/InboundClientOption.java - Server options
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/option/ServerOption.java
Connection Runtime
- Client lifecycle
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/AbstractInboundClient.java - Netty client
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/NettyInboundClient.java - Channel handler
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/handler/InboundChannelHandler.java - Connection listener
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/ServerConnectionListener.java
ESL Protocol
- Frame decoder
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/transport/message/EslFrameDecoder.java - ESL message
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/transport/message/EslMessage.java - Event parser
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/transport/event/EslEvent.java - Command response
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/transport/CommandResponse.java - ESL event listener
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/IEslEventListener.java
Other components
- Application developer
- FreeSWITCH server
Connections 24
- Application developer → Starter properties: sets properties
README.md - Starter properties → Option handler: builds options
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/handler/AbstractInboundClientOptionHandler.java - Option handler → Client options: creates options
freeswitch-esl-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/esl/spring/boot/starter/handler/AbstractInboundClientOptionHandler.java - Auto-configuration → Inbound client API: configures starter
README.md - Inbound client API → Client factory: creates client
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/InboundClient.java - Client factory → Netty client: instantiates
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/InboundClientFactory.java - Inbound client API → Client options: uses options
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/InboundClient.java - Client options → Server options: stores servers
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/option/InboundClientOption.java - Inbound client API → Client lifecycle: starts client
README.md - Client lifecycle → Client options: reads options
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/AbstractInboundClient.java - Client lifecycle → Server options: manages connections
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/AbstractInboundClient.java - Client lifecycle → Channel handler: closes handlers
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/AbstractInboundClient.java - Netty client → Channel handler: sends commands
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/NettyInboundClient.java - FreeSWITCH server → Channel handler: sends ESL frames
- Channel handler → ESL message: handles messages
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/handler/InboundChannelHandler.java - Frame decoder → ESL message: decodes frames
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/transport/message/EslMessage.java - Event parser → ESL message: parses message
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/transport/event/EslEvent.java - Channel handler → Event parser: dispatches events
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/handler/InboundChannelHandler.java - Channel handler → ESL event listener: calls listener
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/handler/InboundChannelHandler.java - Netty client → Command response: returns responses
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/NettyInboundClient.java - ESL event listener → Event handlers: adapts events
README.md - Application developer → Inbound client API: uses API
README.md - Connection listener → Application developer: reports state
README.md - Inbound client API → Server options: adds or removes
README.md