mango

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 6 Imported by: 0

README

##Обертка для работы с апи https://www.mango-office.ru/

описание api: https://www.mango-office.ru/upload/api/MangoOffice_VPBX_API_v1.9.pdf

работа с библиотекой:
1 вызвать метод инициализации и вернется клиент с помощью которого можно отдавать команды и гетать информацию InitMangoCallHandle("Порт внешней системы:", "Уникальный код вашей АТС:", "Ключ для создания подписи:", "Адрес API Виртуальной АТС:")

2 Получать события из mango_events.Events

Например:

func readerEvents() {
	for {
		call := <-mango_events.Events.Calls
		println(call.CallID)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}
var ClientMango *Client

func InitMangoCallHandle

func InitMangoCallHandle(port, apiKey, sing, url string) *Client

func (*Client) EndCall

func (c *Client) EndCall(callID string) *mango_objects.Result

func (*Client) GetBalance

func (c *Client) GetBalance() *mango_client.Balance

func (*Client) InitCallOfGroup

func (c *Client) InitCallOfGroup(from, to, lineNumber string) *mango_objects.Result

func (*Client) InitCallOfUser

func (c *Client) InitCallOfUser(extension, callerNumber, toNumber, lineNumber, sipHeaders string) *mango_objects.Result

func (*Client) RoutingCall

func (c *Client) RoutingCall(callID, toNumber, sipHeaders string) *mango_objects.Result

func (*Client) SendSms

func (c *Client) SendSms(fromExtension, toNumber, smsSender, text string) *mango_objects.Result

func (*Client) SetApiKey

func (c *Client) SetApiKey(key string)

func (*Client) SetApiSing

func (c *Client) SetApiSing(sing string)

func (*Client) SetApiUrl

func (c *Client) SetApiUrl(url string)

func (*Client) TransferCall

func (c *Client) TransferCall(callID, method, toNumber, initiator string) *mango_objects.Result

func (*Client) TurnOnRecordingCall

func (c *Client) TurnOnRecordingCall(callID, callPartyNumber string) *mango_objects.Result

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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