{"id":15074207,"url":"https://github.com/zhouhailin/freeswitch-externals","last_synced_at":"2025-04-12T19:43:50.400Z","repository":{"id":47318817,"uuid":"194874820","full_name":"zhouhailin/freeswitch-externals","owner":"zhouhailin","description":"FreeSWITCH externals projects","archived":false,"fork":false,"pushed_at":"2025-03-31T06:01:46.000Z","size":432,"stargazers_count":177,"open_issues_count":8,"forks_count":95,"subscribers_count":6,"default_branch":"v2.2-dev-alpha","last_synced_at":"2025-04-03T23:09:08.812Z","etag":null,"topics":["esl","esl-client","event-socket","freeswitch","freeswitch-esl","freeswitch-event-socket","java","spring-boot","voip"],"latest_commit_sha":null,"homepage":"https://zhouhailin.github.io/freeswitch-externals/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhouhailin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-02T14:02:44.000Z","updated_at":"2025-04-02T13:07:13.000Z","dependencies_parsed_at":"2024-03-26T08:30:16.344Z","dependency_job_id":"759e22d5-7df0-4ce0-8ef3-25fd4920838e","html_url":"https://github.com/zhouhailin/freeswitch-externals","commit_stats":null,"previous_names":["zhouhailin/freeswitch-externals","zhouhailin/freeswitch-esl-all"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouhailin%2Ffreeswitch-externals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouhailin%2Ffreeswitch-externals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouhailin%2Ffreeswitch-externals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouhailin%2Ffreeswitch-externals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhouhailin","download_url":"https://codeload.github.com/zhouhailin/freeswitch-externals/tar.gz/refs/heads/v2.2-dev-alpha","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625479,"owners_count":21135512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esl","esl-client","event-socket","freeswitch","freeswitch-esl","freeswitch-event-socket","java","spring-boot","voip"],"created_at":"2024-09-25T03:31:04.868Z","updated_at":"2025-04-12T19:43:50.368Z","avatar_url":"https://github.com/zhouhailin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FreeSWITCH ESL ALL\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/23fb13f7487f4ccd985f09c96341dfab)](https://app.codacy.com/gh/zhouhailin/freeswitch-esl-all?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=zhouhailin/freeswitch-esl-all\u0026utm_campaign=Badge_Grade_Settings)\n[![Jdk Version](https://img.shields.io/badge/JDK-8-green.svg)](https://img.shields.io/badge/JDK-8-green.svg)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://img.shields.io/maven-central/v/link.thingscloud/freeswitch-esl-all)](https://mvnrepository.com/artifact/link.thingscloud/freeswitch-esl-all)\n[![Gitter](https://badges.gitter.im/freeswitch-esl-all/community.svg)](https://gitter.im/freeswitch-esl-all/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n## Summary\n\n    JDK 1.8 +\n\n    Netty used 4.1.x, 5.x is not supported\n\n## Features\n\n    1. Support to connect FreeSWITCH Cluster\n    2. Easy to integrate with FreeSWITCH ESL\n    3. Support spring boot starter\n    4. Support to dynamic add or remove remote server\n\n## Maven\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003elink.thingscloud\u003c/groupId\u003e\n        \u003cartifactId\u003efreeswitch-esl\u003c/artifactId\u003e\n        \u003cversion\u003e${freeswitch-esl.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\n## Quick Start\n\n### freeswitch-esl-spring-boot-starter\n\n[Maven Central](https://mvnrepository.com/artifact/link.thingscloud/freeswitch-esl-spring-boot-starter)\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003elink.thingscloud\u003c/groupId\u003e\n    \u003cartifactId\u003efreeswitch-esl-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e${freeswitch-esl.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\napplication.properties\n\n```properties\nlink.thingscloud.freeswitch.esl.inbound.servers[0].host=127.0.0.1\nlink.thingscloud.freeswitch.esl.inbound.servers[0].port=8021\nlink.thingscloud.freeswitch.esl.inbound.servers[0].timeout-seconds=5\nlink.thingscloud.freeswitch.esl.inbound.servers[0].password=ClueCon\nlink.thingscloud.freeswitch.esl.inbound.servers[2].host=127.0.0.2\nlink.thingscloud.freeswitch.esl.inbound.servers[2].port=8021\nlink.thingscloud.freeswitch.esl.inbound.servers[2].timeout-seconds=5\nlink.thingscloud.freeswitch.esl.inbound.events=CHANNEL_CREATE CHANNEL_DESTORY \n# performance monitor - event driven - business logic processing time\nlink.thingscloud.freeswitch.esl.inbound.performance=true \nlink.thingscloud.freeswitch.esl.inbound.performanceCostTime=200 \n# event performance monitor - event driven - event generate time and event receive time\nlink.thingscloud.freeswitch.esl.inbound.eventPerformance=false \nlink.thingscloud.freeswitch.esl.inbound.eventPerformanceCostTime=200\n```\n\napplication.yml\n\n```yaml\nlink:\n  thingscloud:\n    freeswitch:\n      esl:\n        inbound:\n          defaultPassword: ClueCon\n          performance: false\n          performanceCostTime: 200\n          #read-timeout-seconds: 0\n          servers:\n            - host: 127.0.0.1\n              port: 8021\n              timeoutSeconds: 5\n            - host: 127.0.0.2\n            - host: 127.0.0.3\n          events:\n            - CHANNEL_CREATE\n            - CHANNEL_DESTORY\n```\n\n```java\n\n@Slf4j\n@Component\npublic class ExampleInboundClient {\n    @Autowired\n    private InboundClient inboundClient;\n\n    @Autowired\n    private InboundClientBootstrap inboundClientBootstrap;\n\n    @PostConstruct\n    public void startup() {\n        System.out.println(inboundClientBootstrap);\n    }\n\n}\n```\n\n```java\n\n@Slf4j\n@Component\npublic class InboundClientOptionHandlerExample extends AbstractInboundClientOptionHandler {\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    protected void intercept(InboundClientOption inboundClientOption) {\n        List\u003cServerOption\u003e serverOptions = inboundClientOption.serverOptions();\n        log.info(\"serverOptions before : {}\", serverOptions);\n        serverOptions.clear();\n        serverOptions.add(new ServerOption(\"127.0.0.8\", 8021));\n        log.info(\"serverOptions after  : {}\", serverOptions);\n    }\n}\n```\n\n```java\n\n@Slf4j\n@Component\n@EslEventName(EventNames.HEARTBEAT)\npublic class HeartbeatEslEventHandler implements EslEventHandler {\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void handle(String addr, EslEvent event) {\n        log.info(\"HeartbeatEslEventHandler handle addr[{}] EslEvent[{}].\", addr, event);\n    }\n}\n```\n\n```java\n\n@Slf4j\n@Service\npublic class ServerConnectionListenerImpl implements ServerConnectionListener {\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void onOpened(ServerOption serverOption) {\n        log.info(\"onOpened serverOption : {}\", serverOption);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void onClosed(ServerOption serverOption) {\n        log.info(\"onClosed serverOption : {}\", serverOption);\n    }\n}\n```\n\n### freeswitch-esl\n\n[Maven Central](https://mvnrepository.com/artifact/link.thingscloud/freeswitch-esl)\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003elink.thingscloud\u003c/groupId\u003e\n    \u003cartifactId\u003efreeswitch-esl\u003c/artifactId\u003e\n    \u003cversion\u003e${freeswitch-esl.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n```\nInboundClientOption option = new InboundClientOption();\n\n// set default esl password, if ServerOption not set password, use this default value\noption.defaultPassword(\"ClueCon\")\n    .addServerOption(new ServerOption(\"127.0.0.1\", 8021));\n\n// set esl subscribe events\noption.addEvents(\"all\");\n\n// ESL event listener\noption.addListener(new IEslEventListener() {\n    @Override\n    public void eventReceived(String addr, EslEvent event) {\n        System.out.println(addr);\n        System.out.println(event);\n    }\n\n    @Override\n    public void backgroundJobResultReceived(String addr, EslEvent event) {\n        System.out.println(addr);\n        System.out.println(event);\n    }\n});\n\noption.serverConnectionListener(new ServerConnectionListener() {\n    @Override\n    public void onOpened(ServerOption serverOption) {\n        System.out.println(\"---onOpened--\");\n    }\n\n    @Override\n    public void onClosed(ServerOption serverOption) {\n        System.out.println(\"---onClosed--\");\n    }\n});\n\nInboundClient inboundClient = InboundClient.newInstance(option);\n\n// start client\ninboundClient.start();\n\n// shutdown client, after shutdown, can't start again, shutdown with JVM\ninboundClient.shutdown();\n```\n\n```\n// Get InboundClient Instance\nInboundClient inboundClient = InboundClient.getInstance();\n\n// Get InboundClient FreeSWITCH API\nInboundClient.getBootstrap()\n```\n\n```\n// add server option\ninboundClient.option().addServerOption(new ServerOption(host, port));\n// InboundClient.getInstance().option().addServerOption(new ServerOption(host, port));\n\n// remove server option\nServerOption serverOption = inboundClient.option().serverOptions().get(0);\ninboundClient.option().removeServerOption(serverOption);\n// InboundClient.getInstance().option().removeServerOption(serverOption);\n\n```\n\n## Star history\n\n[![Star History Chart](https://api.star-history.com/svg?repos=zhouhailin/freeswitch-externals\u0026type=Date)](https://star-history.com/#zhouhailin/freeswitch-externals\u0026Date)\n\n## Notice\n\n    1. Send api is recommended to use asynchronous operation, especially the originate command\n    2. There is a message timeout mechanism at present to deal with the false death of the connection caused by the direct shutdown of the server. Set the value of readTimeoutSeconds parameter to 0 to turn off this feature\n    3. In order to improve performance, when processing EslEvent, use Netty's worker thread. If the processing logic involves IO or time-consuming operation, the processing logic must be put in a new thread to process, and the disablePublicExecutor parameter is set\n\n## WeChat User Groups - Please note the source\n\n![WeChat](https://gitee.com/zhouhailin/images/raw/master/a0eb627b9b6bc1c6da8f19d3292ebce.jpg)\n\n## LICENSE\n\n[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) Copyright (C) Apache Software Foundation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhouhailin%2Ffreeswitch-externals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhouhailin%2Ffreeswitch-externals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhouhailin%2Ffreeswitch-externals/lists"}