yealink

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCommandFailed = errors.New("action uri command failed")
View Source
var ErrCommandFailedBadCredentials = errors.New("bad credentials")
View Source
var ErrCommandFailedUnauthorized = errors.New("missing credentials")
View Source
var ErrCouldNotParseIpString = errors.New("invalid ip string given")

Functions

func Call

func Call(device *Device, number string) error

func ConfigureDND

func ConfigureDND(device *Device, toggle bool) error

func GetApiClient

func GetApiClient() *http.Client

func ReadPhoneConfigParam

func ReadPhoneConfigParam(device *Device)

func TriggerAutoProvision

func TriggerAutoProvision(device *Device) error

Types

type Account

type Account struct {
	Label        string // 1
	RegisterName string // 2
	DisplayName  string // 3
	OutgoingURI  string // 5
}

func ReadAccounts

func ReadAccounts(device *Device) ([]Account, error)

type Device

type Device struct {
	IP                 net.IP `yaml:"ip"`
	IsHTTPS            bool   `yaml:"https"`
	Username           string `yaml:"username"`
	Password           string `yaml:"password"`
	DefaultOutgoingURI string `yaml:"default_outgoing_uri"`
}

func NewDevice

func NewDevice(ip, username, password string) (*Device, error)

func (*Device) GetCallEndpointUrl

func (d *Device) GetCallEndpointUrl() (*url.URL, error)

func (*Device) GetRootUrl

func (d *Device) GetRootUrl(path string) (*url.URL, error)

func (*Device) SetIP

func (d *Device) SetIP(in string) error

Jump to

Keyboard shortcuts

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