sipuni-go

module
v0.0.0-...-4b70eb0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT

README

Api client for sipuni telephony

Install

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

Usage

=======

package main

import (
	"encoding/json"
	"fmt"

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

func main() {
	client := sipuni.NewClient("<id>", "<secreteKey>")
}
Make calls
// 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

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

Hangup call
client.Call.HangUpCall("0286966c7e35e1ec2565e9d37e77edb1")

Statistic

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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