Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alias ¶
type Alias struct {
ID float64 `json:"id"`
IP string `json:"ip"`
Port float64 `json:"port"`
Mask float64 `json:"mask"`
Alias string `json:"alias"`
Status bool `json:"status"`
CaptureID string `json:"captureID"`
}
Alias represents a Homer IP/port alias
type CallRecord ¶
type CallRecord struct {
ID float64 `json:"id"`
Date int64 `json:"create_date"`
MicroTS int64 `json:"micro_ts"`
Protocol float64 `json:"protocol"`
SourceIP string `json:"srcIp"`
SourcePort float64 `json:"srcPort"`
DestIP string `json:"dstIp"`
DestPort float64 `json:"dstPort"`
CallID string `json:"sid"`
Method string `json:"method"`
MethodText string `json:"method_text"`
FromUser string `json:"from_user"`
ToUser string `json:"to_user"`
RuriUser string `json:"ruri_user"`
Status float64 `json:"status"`
AliasSrc string `json:"aliasSrc"`
AliasDst string `json:"aliasDst"`
Table string `json:"table"`
}
CallRecord represents a single call in search results
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Homer 7.x REST API
func (*Client) Authenticate ¶
Authenticate logs in to Homer and stores the JWT token
func (*Client) ExportPCAP ¶
func (c *Client) ExportPCAP(params SearchParams) ([]byte, error)
ExportPCAP exports call messages as a PCAP file
func (*Client) ListAliases ¶
ListAliases returns all configured IP/port aliases
func (*Client) SearchCalls ¶
func (c *Client) SearchCalls(params SearchParams) (*SearchResult, error)
SearchCalls searches for SIP calls matching the given parameters
func (*Client) TestConnection ¶
TestConnection verifies the Homer API is reachable (unauthenticated health check)
type SearchParams ¶
type SearchParams struct {
From time.Time
To time.Time
Caller string
Callee string
CallID string
Limit int
}
SearchParams holds search query parameters for Homer API calls
type SearchResult ¶
type SearchResult struct {
Data []CallRecord `json:"data"`
}
SearchResult holds the response from a call search
Click to show internal directories.
Click to hide internal directories.