小樱桃在用的Go语言SDK 1.4,API更规范,推荐升级。
关于Go语言SDK 旧版的代码和说明文档:
以下是其他相关链接:
- 依赖 https://github.com/xswitch-cn/proto
- SDK使用和开发文档
- 协议参考文档参见:https://github.com/xswitch-cn/proto/tree/main/docs
- 示例:https://git.xswitch.cn/xswitch/xcc-examples/src/branch/master/go
- XCC API文档:https://docs.xswitch.cn/xcc-api/
目录结构:
- ctrl:节点管理
- tboy 是一个冒牌的的FreeSWITCH,用于测试
- consitent 多节点一致性hash管理器,用于多个FreeSWITCH的hash节点获取,文档参见hash节点文档
go mod init main
go get github.com/xswitch-cn/proto/go/proto/xctrl
go get github.com/xswitch-cn/xctrl
# 创建 main.go,并运行
go run main.go- 克隆该项目到本地:
git clone https://github.com/xswitch-cn/xctrl.git
cd xctrlgo run main.go
make test