sipuni

package
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 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DDMMYYYY = "02.01.2006"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoCallAddResponse

type AutoCallAddResponse struct {
	ID string `json:"id"`
}

type AutocallService

type AutocallService struct {
	// contains filtered or unexported fields
}

AutocallService - service for autocall management

func (*AutocallService) AddNumber

func (s *AutocallService) AddNumber(again int, number string, autocallID int) (AutoCallAddResponse, error)

AddNumbder - add number to autocall, doc: https://help.sipuni.com/articles/134-182-466--avtoobzvon-api/

func (*AutocallService) AddOperator

func (s *AutocallService) AddOperator(operator string, autocallID int) error

AddOperator - add operator to autocall, doc: https://help.sipuni.com/articles/134-182-466--avtoobzvon-api/

func (*AutocallService) DeleteNumber

func (s *AutocallService) DeleteNumber(number string, autocallID int) error

DeleteNumber - delete number from autocall, doc: https://help.sipuni.com/articles/134-182-466--avtoobzvon-api/

func (*AutocallService) DeleteOperator

func (s *AutocallService) DeleteOperator(operator string, autocallID int) error

DeleteOperator - delete operator from autocall, doc: https://help.sipuni.com/articles/134-182-466--avtoobzvon-api/

func (*AutocallService) GetStatistic

func (s *AutocallService) GetStatistic(autocallID int) (string, error)

GetStatistic - get statistic from autocall, doc: https://help.sipuni.com/articles/134-182-466--avtoobzvon-api/

func (*AutocallService) SetUserStatus

func (s *AutocallService) SetUserStatus(sipnumber string, status int) error

type AuxiliaryService

type AuxiliaryService struct {
	// contains filtered or unexported fields
}

AuxiliaryService - service for manager aux data

func (*AuxiliaryService) GetUserSchemas

func (s *AuxiliaryService) GetUserSchemas(type_ string) (SchemaResponse, error)

type CallResponse

type CallResponse struct {
	ID     string `json:"id,omitempty"`
	CallID string `json:"callId,omitempty"`
}

type CallService

type CallService struct {
	// contains filtered or unexported fields
}

CallService : service for calls management

func (*CallService) CallSpyMode

func (s *CallService) CallSpyMode(callID string, sipnumber string, whisper string) error

CallSpyMode doc: https://help.sipuni.com/articles/134-182-464--suflirovanie/

func (*CallService) HangUpCall

func (s *CallService) HangUpCall(callID string) error

HangUpCall - hungup call, doc: https://help.sipuni.com/articles/134-182-108--zapros-na-zavershenie-zvonka/

func (*CallService) MakeCall

func (s *CallService) MakeCall(phone string, sipnumber string, reverse int, antiaon int) (CallResponse, error)

MakeCall - make basic call, doc: https://help.sipuni.com/articles/134-182-113--sozdanie-zvonka-na-nomer-s-pomoshyu-api/

func (*CallService) MakeExternalCall

func (s *CallService) MakeExternalCall(phoneFrom string, phoneTo string, sipnumber string, sipnumber2 string) (CallResponse, error)

MakeExternalCall - make external call, doc: https://help.sipuni.com/articles/134-182-113--sozdanie-zvonka-na-nomer-s-pomoshyu-api/

func (*CallService) MakeTreeCall

func (s *CallService) MakeTreeCall(phone string, sipnumber string, tree string, reverse int, callAttemptTime int) (CallResponse, error)

MakeTreeCall - make tree call, doc: https://help.sipuni.com/articles/134-182-113--sozdanie-zvonka-na-nomer-s-pomoshyu-api/

func (*CallService) MakeVoiceCall

func (s *CallService) MakeVoiceCall(phone string, message string, voice string, sipnumber string) (CallResponse, error)

MakeVoiceCall - make voice call, doc: https://help.sipuni.com/articles/134-182-107--generaciya-golosovogo-zvonka-s-pomoshyu-api/

type Client

type Client struct {
	Call      *CallService
	Auxiliary *AuxiliaryService
	Autocall  *AutocallService
	Statistic *StatisticService
	// contains filtered or unexported fields
}

Client : main client for Sipuni management

func NewClient

func NewClient(user string, secretKey string) *Client

NewClient creates new Client to Sipuni

type ExportRequest

type ExportRequest struct {
	DtmfUserAnswer  int
	From            time.Time
	To              time.Time
	Type            int
	State           int
	Tree            string
	ShowTreeID      int
	FromNumber      string
	ToNumber        string
	NumbersRinged   int
	NumbersInvolved int
	Names           int
	OutgoingLine    int
	ToAnswer        string
	Anonymous       int
	FirstTime       int
}

ExportRequest - struct for statistic export query

type Schema

type Schema struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Type      int    `json:"type"`
	CreatedAt int    `json:"createdAt"`
}

type SchemaResponse

type SchemaResponse struct {
	Data []*Schema `json:"data"`
}

type SipuniError

type SipuniError struct {
	HTTPCode     int
	Endpoint     string
	ErrorMessage string
}

SipuniError

func (*SipuniError) Error

func (e *SipuniError) Error() string

Error returns string representation of the YandexWebmasterError

type StatisticService

type StatisticService struct {
	// contains filtered or unexported fields
}

StatisticService - service for statistic management

func (*StatisticService) GetOperatorsStats

func (s *StatisticService) GetOperatorsStats() (string, error)

GetOperatorsStats - get statistic by operators, doc: https://help.sipuni.com/articles/134-182-112--poluchenie-statistiki-po-zvonkam-zapisej-razgovorov-i-statusov-sotrudnikov/

func (*StatisticService) GetRecord

func (s *StatisticService) GetRecord(ID string) ([]byte, error)

GetRecord - get mp3 file record from stats, doc: https://help.sipuni.com/articles/134-182-112--poluchenie-statistiki-po-zvonkam-zapisej-razgovorov-i-statusov-sotrudnikov/

Jump to

Keyboard shortcuts

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