command

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * Contributor(s): * Andrew Querol <aquerol@percipia.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHeaderString

func FormatHeaderString(headers textproto.MIMEHeader) string

FormatHeaderString - Writes headers in a FreeSWITCH ESL friendly format. Converts headers containing \r\n to \n

Types

type API

type API struct {
	Command    string
	Arguments  string
	Background bool
}

func (API) BuildMessage

func (api API) BuildMessage() string

type Auth

type Auth struct {
	User     string
	Password string
}

func (Auth) BuildMessage

func (auth Auth) BuildMessage() string

type Command

type Command interface {
	BuildMessage() string
}

Command - A basic interface for FreeSWITCH ESL commands. Implement this if you want to send your own raw data to FreeSIWTCH over the ESL connection. Do not add the eslgo.EndOfMessage(\r\n\r\n) marker, eslgo does that for you.

type Connect

type Connect struct{}

func (Connect) BuildMessage

func (Connect) BuildMessage() string

type DisableEvents

type DisableEvents struct{}

func (DisableEvents) BuildMessage

func (DisableEvents) BuildMessage() string

type DivertEvents

type DivertEvents struct {
	Enabled bool
}

The divert_events command is available to allow events that an embedded script would expect to get in the inputcallback to be diverted to the event socket.

func (DivertEvents) BuildMessage

func (d DivertEvents) BuildMessage() string

type Event

type Event struct {
	Ignore bool
	Format string
	Listen []string
}

func (Event) BuildMessage

func (e Event) BuildMessage() string

type Exit

type Exit struct{}

func (Exit) BuildMessage

func (Exit) BuildMessage() string

type Filter

type Filter struct {
	Delete      bool
	EventHeader string
	FilterValue string
}

func (Filter) BuildMessage

func (f Filter) BuildMessage() string

type Linger

type Linger struct {
	Enabled bool
}

func (Linger) BuildMessage

func (l Linger) BuildMessage() string

type Log

type Log struct {
	Enabled bool
	Level   int
}

func (Log) BuildMessage

func (l Log) BuildMessage() string

type MyEvents

type MyEvents struct {
	Format string
	UUID   string
}

func (MyEvents) BuildMessage

func (m MyEvents) BuildMessage() string

type SendEvent

type SendEvent struct {
	Name    string
	Headers textproto.MIMEHeader
	Body    string
}

func (*SendEvent) BuildMessage

func (s *SendEvent) BuildMessage() string

type SendMessage

type SendMessage struct {
	UUID    string
	Headers textproto.MIMEHeader
	Body    string
	Sync    bool
	SyncPri bool
}

func (*SendMessage) BuildMessage

func (s *SendMessage) BuildMessage() string

Directories

Path Synopsis
* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v.
* Copyright (c) 2020 Percipia * * This Source Code Form is subject to the terms of the Mozilla Public * License, v.

Jump to

Keyboard shortcuts

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