Skip to content

Commit

Permalink
[database-exporter] added more voip call states
Browse files Browse the repository at this point in the history
  • Loading branch information
DictumMortuum committed Feb 15, 2024
1 parent 01c2790 commit f50ac64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion cmd/database-exporter/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ func (c *Client) getStatistics() error {
VoipStatus.WithLabelValues(stats.Host).Set(float64(isVoipEnabled))

var isInVoipCall int = 0
if stats.VoipCallStatus != "idle" {
if stats.VoipCallStatus == "incall" {
isInVoipCall = 1
} else if stats.VoipCallStatus == "disconnecting" {
isInVoipCall = 0
} else if stats.VoipCallStatus == "idle" {
isInVoipCall = 0
} else if stats.VoipCallStatus == "connecting" {
isInVoipCall = 1
} else if stats.VoipCallStatus == "calling" {
isInVoipCall = 1
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/database-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ func main() {
case <-serverDead:
}

version := "0.0.5"
version := "0.0.6"
fmt.Printf("database-exporter v%s HTTP server stopped\n", version)
}

0 comments on commit f50ac64

Please sign in to comment.