2 Star 4 Fork 5

chentong-dev/springboot-freeswitch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0
# 说明文档 ## inbound 代码示例 ### pom依赖 ```xml <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one or more ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ The ASF licenses this file to You under the Apache License, Version 2.0 ~ (the "License"); you may not use this file except in compliance with ~ the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>freeswitch-esl-all</artifactId> <groupId>link.thingscloud</groupId> <version>1.6.4.RELEASE</version> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <netty.version>4.1.65.Final</netty.version> <spring-boot.version>2.3.1.RELEASE</spring-boot.version> <java.version>1.8</java.version> <!-- Compiler settings properties --> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <artifactId>freeswitch-esl-spring-boot-starter-example</artifactId> <name>freeswitch-esl-spring-boot-starter-example-${project.version}</name> <description>Example project for Freeswitch Esl Spring Boot Starter</description> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>freeswitch-esl-spring-boot-starter</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>link.thingscloud</groupId> <artifactId>spring-boot-common-aop</artifactId> <version>1.0.0-RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.freeswitch.esl.client</groupId> <artifactId>org.freeswitch.esl.client</artifactId> <version>0.9.2</version> </dependency> <!-- JSON格式数据结构 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.78</version> </dependency> <!-- redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <version>2.2.6.RELEASE</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> <version>2.6.2</version> </dependency> <!--Jackson包--> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> </dependency> </dependencies> </project> ``` ## outbound示例 ### 修改dialplan配置 出于演示目的,这里修改/usr/local/freeswitch/conf/dialplan/default.xml,在文件开头部分添加一段: ``` <extension name="socket_400_example"> <condition field="destination_number" expression="^400\d+$"> <action application="socket" data="localhost:8040 async full"/> </condition> </extension> ``` 即:当来电的被叫号码为400开头时,fs将利用socket,连接到localhost:8040 ## 接口文档 ### 一、机器人外呼发起 * 接口地址: /callcenter/api/startOutbound * 请求方法: POST * 请求参数: * 返回数据: ``` { code: 200, message: "success" data: null } message: 请求处理消息 code = 200 请求处理成功 code != 200 请求处理失败,警告消息提示:message内容 ``` ## 相关资料 [freeswitch笔记(3)-esl入门](https://www.cnblogs.com/yjmyzz/p/freeswitch-esl-java-client-turorial.html) [github: freeswitch 事件套接字基于 netty 4 并具有一些新功能](https://github.com/zhouhailin/freeswitch-esl-all)

简介

🌟 这是如何在springboot freeswitch结合的简单示例 包括 inbound outbound两个服务 展开 收起
Java
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/Ch3nnnnnnnnnn/springboot-freeswitch.git
git@gitee.com:Ch3nnnnnnnnnn/springboot-freeswitch.git
Ch3nnnnnnnnnn
springboot-freeswitch
springboot-freeswitch
master

搜索帮助