FreeSWITCH及VOIP,Openser,电话机器人等产品中文技术资讯、交流、沟通、培训、咨询、服务一体化网络。QQ群:293697898
这些数据是预先从数据库中加载到内存中,基本是不常变化的,故而采用读写锁进行mutex同步,以便在平时的路由等过程中减少和外部打交道的时间,通过内存加快响应速度
package nwaypbxdefine
const (
AutoTrans = "***"
Format_Date = "2006-01-02"
Format_DateTime = "2006-01-02 15:04:05"
)
type Ring struct {
Id int64
Path string
Name string
}
type Operator struct {
Id int64
Name string
}
type DialplanDetail struct {
Id int64
DialplanId int64
DialplanDetailTag string
DialplanDetailData string
DialplanDetailInline string
DialplanDetailBreak bool
DialplanDetailTypeId int64
RingId int64
OutlineGateway int64
Orderid int
IsCallOut bool
GatewayGroupId int64
}
type Dialplan struct {
Id int64
DialplanName string
DialplanContext string
DialplanNumber string
DialplanOrder int
DialplanEnabled bool
DialplanContinue bool
IsCallOutline bool
Details map[int64]DialplanDetail
}
type IvrOption struct {
Id int64
IvrOptionDigits string
IvrOptionParam string
IvrOptionOrder int
IvrOptionActionId int
IvrOptionRingId int64
}
type Ivr struct {
Id int64
IvrName string
IvrExtension string
IvrConfirmKey string
IvrConfirmAttempts int
IvrTimeout int
IvrInterDigitTimeout int
IvrMaxFailures int
IvrMaxTimeout int
IvrDigitLen int
IvrCallCrycleOrder int //循环模式下,当前所属位置
IvrEnabled bool
IvrLongId int64
IvrShortId int64
IvrInvalidId int64
IvrRingbackId int64
IvrParentId int64 //父节点ID
IvrCallOrderId int64 //下一级如果是号码,分配方式,如随机,顺序,循环等
Options map[int64]IvrOption
}
type Gateway struct {
Id int64
Gateway_name string
Gateway_url string
Call_prefix string
Max_call int
Added_autodial bool
}
type Gateway_group struct {
Id int64
Gateway_group_name string
Gateways map[int64]Gateway
}
type Fifo struct {
Id int64
FifoName string
FifoExtension string
FifoType int
FifoCrycleId int
Extensions []string
}