Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# Api client for sipuni telephony

## Install

go get -u github.com/bzdvdn/sipuni-go/sipuni

## Usage

=======

```go
package main

import (
"encoding/json"
"fmt"

"github.com/bzdvdn/sipuni-go/sipuni"
)

func main() {
client := sipuni.NewClient("", "")
}
```

#### Make calls

- Documentation

```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

- Documentation

```go

client.Call.MakeVoiceCall("79379992", "text 123", "Anna_n", "201")

```

#### Hangup call

- Documentation

```go
client.Call.HangUpCall("0286966c7e35e1ec2565e9d37e77edb1")

```

#### Statistic

- Documentation

```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