1 Star 0 Fork 0

kennyzhu2015 / go-sip-ua

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
leg.go 1009 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhuwei6 提交于 2022-12-09 11:55 . 替换成gitee代码
package ua
import (
"gitee.com/kennyzw/go-sip-ua/pkg/session"
"gitee.com/kennyzw/go-sip-ua/pkg/stack"
"gitee.com/kennyzw/gosip/log"
"gitee.com/kennyzw/gosip/sip"
"sync"
)
// leg代表一路呼叫相关实例.
// SessionKey - Session Key for Session Storage
type LegKey struct {
CallID sip.CallID
FromTag sip.MaybeString
ToTag sip.MaybeString
}
// NewSessionKey - Build a Session Key quickly
func NewLegKey(callID sip.CallID, from sip.MaybeString, to sip.MaybeString) LegKey {
return LegKey{
CallID: callID,
FromTag: from,
ToTag: to,
}
}
// UserAgentConfig .
type UserLegConfig struct {
SipStack *stack.SipStack
}
// SessionHandler:所有基于session的sip消息handler处理.
type SessionHandler func(s *session.Session, req *sip.Request, resp *sip.Response, status session.Status)
//UserLeg : 对应协议栈的一路通话.
type UserLeg struct {
// InviteStateHandler InviteSessionHandler
config *UserAgentConfig
iss sync.Map /*Invite Session*/
log log.Logger
}
Go
1
https://gitee.com/kennyzw/go-sip-ua.git
git@gitee.com:kennyzw/go-sip-ua.git
kennyzw
go-sip-ua
go-sip-ua
1df5730d3bdc

搜索帮助