cdrdelivery

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 6 Imported by: 0

README

CDR Delivery

CDR data query application from multiple sources.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MysqlConnect

func MysqlConnect(options map[string]string) (db *sql.DB, err error)

MysqlConnect creates a MySQL connection

Types

type Call

type Call struct {
	Calldate    string `json:"calldate"`
	Clid        string `json:"clid"`
	Src         string `json:"src"`
	Dst         string `json:"dst"`
	Dcontext    string `json:"dcontext"`
	Channel     string `json:"channel"`
	Dstchannel  string `json:"dstchannel"`
	Lastapp     string `json:"lastapp"`
	Lastdata    string `json:"lastdata"`
	Duration    int    `json:"duration"`
	Billsec     int    `json:"billsec"`
	Disposition string `json:"disposition"`
	Amaflags    int    `json:"amaflags"`
	Accountcode string `json:"accountcode"`
	Userfield   string `json:"userfield"`
	Uniqueid    string `json:"uniqueid"`
	Linkedid    string `json:"linkedid"`
	Sequence    string `json:"sequence"`
	Peeraccount string `json:"peeraccount"`
}

Call represents a CDR row

type Source

type Source struct {
	Type    string
	Options map[string]string
}

Source represents the data source

func SetConnection

func SetConnection(sourceType string, options map[string]string) (source *Source)

SetConnection specifies the data source

func (*Source) GetCalls

func (source *Source) GetCalls(filters map[string]string) (calls []Call, err error)

GetCalls will search the calls according to the entered filters.

Directories

Path Synopsis
cmd
cdrdelivery command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL