Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bzdvdn/sipuni-go
api client for sipuni telephony at Golang
https://github.com/bzdvdn/sipuni-go
api-client golang sipuni
Last synced: 6 days ago
JSON representation
api client for sipuni telephony at Golang
- Host: GitHub
- URL: https://github.com/bzdvdn/sipuni-go
- Owner: bzdvdn
- License: mit
- Created: 2024-01-03T22:28:42.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-04T11:33:15.000Z (about 1 year ago)
- Last Synced: 2024-01-04T12:35:42.804Z (about 1 year ago)
- Topics: api-client, golang, sipuni
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Api client for sipuni telephony
## Install
go get -u github.com/bzdvdn/sipuni-go/sipuni
## Usage
=======
```go
package mainimport (
"encoding/json"
"fmt""github.com/bzdvdn/sipuni-go/sipuni"
)func main() {
client := sipuni.NewClient("", "")
}
```#### Make calls
```go
// make basic call
client.Call.MakeCall("79379992", "201", 0, 0)// make tree call
client.Call.MakeTreeCall("79379992", "201", "000658610", 0, 0)// make external call
client.Call.MakeExternalCall("79379992", "79379993", "201", "202")```
#### Make voice call
```go
client.Call.MakeVoiceCall("79379992", "text 123", "Anna_n", "201")
```
#### Hangup call
```go
client.Call.HangUpCall("0286966c7e35e1ec2565e9d37e77edb1")```
#### Statistic
```go
// export requests
exReq := sipuni.ExportRequest{
From: time.Now().AddDate(0, 0, -1),
To: time.Now(),
}
csvData, err := client.Statistic.Export(exReq)// export all
csvData, err := client.Statistic.ExportAll(10, "asc", 1)// get call record
record, err := client.Statistic.getRecord("123")```
### TODO
- examples
- tests### License
MIT