update channels/douyin: add 212 mod 5 files

This commit is contained in:
jack ning
2025-06-08 13:55:43 +08:00
parent 73fe4a42ec
commit 7d79e2be6f
79 changed files with 269453 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2025-05-24 10:14:52
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-06-08 13:15:20
* @LastEditTime: 2025-06-08 13:42:52
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -19,7 +19,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -33,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
public class FreeSwitchConfig {
private final FreeSwitchProperties freeSwitchProperties;
@Lazy
private final FreeSwitchEventListener freeSwitchEventListener;
/**
@@ -59,10 +58,20 @@ public class FreeSwitchConfig {
// 订阅所有事件
client.setEventSubscriptions("plain", "all");
//这里必须检查,防止网络抖动时,连接断开
if (client.canSend()) {
log.info("连接成功,准备发起呼叫...");
//异步向1000用户发起呼叫用户接通后播放音乐/tmp/demo1.wav
String callResult = client.sendAsyncApiCommand("originate", "user/1000 &playback(/tmp/demo.wav)");
log.info("api uuid:" + callResult);
}
log.info("FreeSwitch ESL连接成功");
} catch (InboundConnectionFailure e) {
log.error("FreeSwitch ESL连接失败: {}", e.getMessage(), e);
// 处理连接失败的情况
e.printStackTrace();
log.error("FreeSwitch ESL连接失败: {}, {}", e.getMessage(), e);
}
return client;

View File

@@ -113,6 +113,7 @@ public class FreeSwitchEslInboundConfig {
*/
private void handleEvent(EslEvent event) {
String eventName = event.getEventName();
log.trace("处理事件: {} / {}", eventName, event.getEventHeaders());
switch(eventName) {
case "CHANNEL_CREATE":

View File

@@ -31,9 +31,8 @@ public class FreeSwitchEventListener implements IEslEventListener {
@Override
public void eventReceived(EslEvent eslEvent) {
String eventName = eslEvent.getEventName();
// String eventSubclass = eslEvent.getEventSubclass();
log.debug("收到FreeSwitch事件: {} / {}", eventName);
log.debug("收到FreeSwitch事件: {} / {}", eventName, eslEvent.getEventHeaders());
// 处理不同类型的事件
switch(eventName) {