Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerAMI ¶
func HandlerAMI(w http.ResponseWriter, r *http.Request)
HandlerAMI asterisk manager interface handler
func HandlerARI ¶
func HandlerARI(w http.ResponseWriter, r *http.Request)
HandlerARI asterisk restful interface handler
func HandlerCDR ¶
func HandlerCDR(w http.ResponseWriter, r *http.Request)
HandlerCDR asterisk call detail records handler
Types ¶
type ActionAMI ¶
type ActionAMI struct { Action string `json:"Action"` Channel string `json:"Channel"` Application string `json:"Application,omitemti"` Context string `json:"Context,omitemti"` Exten string `json:"Exten,omitemti"` Data string `json:"Data,omitemti"` Priority int `json:"Priority,omitemti"` Callerid int `json:"Callerid,omitemti"` Variable string `json:"Variable,omitemti"` }
ActionAMI - ami action structure
type CDR ¶
type CDR struct { CallDate time.Time `json:"calldate"` Src string `json:"src"` Dst string `json:"dst"` Dcontext string `json:"dcontext"` Channel string `json:"channel"` Disposition string `json:"disposition"` Dstchannel string `json:"dstchannel"` Lastapp string `json:"lastapp"` Duration int `json:"duration"` Billsec int `json:"billsec"` Sequence int `json:"sequence"` UniqueID string `json:"uniqueid"` ActionID string `json:"actionid"` RecordingFile string `json:"recordingfile,omitempty"` }
CDR structure
type Config ¶
type Config struct { Server struct { Host string `yaml:"host"` Port string `yaml:"port"` MaxHeaderBytes int `yaml:"maxHeaderBytes"` Timeout struct { Server time.Duration `yaml:"server"` Write time.Duration `yaml:"write"` Read time.Duration `yaml:"read"` Idle time.Duration `yaml:"idle"` } `yaml:"timeout"` } `yaml:"server"` ARI struct { Enable bool `yaml:"enable"` Application string `yaml:"application"` URL string `yaml:"url"` WS string `yaml:"ws"` UserName string `yaml:"username"` Password string `yaml:"password"` } `yaml:"ari"` AMI struct { Enable bool `yaml:"enable"` Host string `yaml:"host"` Port string `yaml:"port"` UserName string `yaml:"username"` Password string `yaml:"password"` } `yaml:"ami"` CDR struct { Enable bool `yaml:"enable"` Recname string `yaml:"recname"` } `yaml:"cdr"` CEL struct { Enable bool `yaml:"enable"` } `yaml:"CEL"` DB struct { DrvName string `yaml:"drvname"` Host string `yaml:"host"` Port string `yaml:"port"` Database string `yaml:"database"` UserName string `yaml:"username"` Password string `yaml:"password"` } `yaml:"db"` FilePath string `yaml:"filepath"` LogLevel *logrus.Level `yaml:"loglevel"` Log *logrus.Entry //*logrus.Logger }
Config struct
Click to show internal directories.
Click to hide internal directories.