# springboot-freeswitch
**Repository Path**: Ch3nnnnnnnnnn/springboot-freeswitch
## Basic Information
- **Project Name**: springboot-freeswitch
- **Description**: 🌟  这是如何在springboot freeswitch结合的简单示例 
包括 inbound outbound两个服务
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 5
- **Forks**: 8
- **Created**: 2021-11-08
- **Last Updated**: 2025-03-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Java, Freeswitch, SpringBoot, esl
## README
# 说明文档
## inbound 代码示例
### pom依赖
```xml
    4.0.0
    
        freeswitch-esl-all
        link.thingscloud
        1.6.4.RELEASE
    
    
        UTF-8
        UTF-8
        4.1.65.Final
        2.3.1.RELEASE
        1.8
        
        1.8
        1.8
    
    freeswitch-esl-spring-boot-starter-example
    freeswitch-esl-spring-boot-starter-example-${project.version}
    Example project for Freeswitch Esl Spring Boot Starter
    
        
            ${project.groupId}
            freeswitch-esl-spring-boot-starter
            ${project.version}
        
        
            org.springframework.boot
            spring-boot-starter-web
        
        
            link.thingscloud
            spring-boot-common-aop
            1.0.0-RELEASE
        
        
            org.springframework.boot
            spring-boot-devtools
            runtime
            true
        
        
            org.projectlombok
            lombok
            true
        
        
            org.springframework.boot
            spring-boot-starter-test
            test
        
        
            org.freeswitch.esl.client
            org.freeswitch.esl.client
            0.9.2
        
        
        
            com.alibaba
            fastjson
            1.2.78
        
        
        
            org.springframework.boot
            spring-boot-starter-data-redis
            2.2.6.RELEASE
        
        
            org.apache.commons
            commons-pool2
            2.6.2
        
        
        
            com.fasterxml.jackson.core
            jackson-core
        
        
            com.fasterxml.jackson.core
            jackson-databind
        
        
            com.fasterxml.jackson.core
            jackson-annotations
        
    
```
## outbound示例
### 修改dialplan配置
出于演示目的,这里修改/usr/local/freeswitch/conf/dialplan/default.xml,在文件开头部分添加一段:
```
      
            
      
```
即:当来电的被叫号码为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)