10 Star 41 Fork 16

北京小程科技有限公司 / SIP协议

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 704 Bytes
一键复制 编辑 原始数据 按行查看 历史
shallot 提交于 2020-04-05 12:24 . 添加SIP协议的解析代码。

sip

这是使用Go实现的RFC3261-SIP协议。

主要结构体为Message,对应一条完整的SDP信息。

使用方法

在Go中引用本库:

import "gitee.com/xiaochengtech/sip"

生成一个消息对象,解析外部收到的字符串:

sipMsg, err := sip.NewMessage(ioReader)

根据请求消息,生成一个应答消息对象:

rspMsg = sip.NewResponse(sip.StatusXXX, rspMsg)

将消息对象转换为字符串用于传输:

transferString := sipMsg.String()

TODO

  • 完善字段支持。

参考资料

Go
1
https://gitee.com/xiaochengtech/sip.git
git@gitee.com:xiaochengtech/sip.git
xiaochengtech
sip
SIP协议
master

搜索帮助