audiouri

package
v4.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package audiouri provides conversions for common sounds to asterisk-supported audio URIs

Index

Constants

This section is empty.

Variables

View Source
var SupportedPlaybackPrefixes = []string{
	"sound", "recording", "number", "digits", "characters", "tone",
}

SupportedPlaybackPrefixes is a list of valid prefixes for media URIs.

Functions

func Check

func Check(uri string) error

Check checks if the audio URI is formatted properly

func DateTimeURI

func DateTimeURI(t time.Time) (ret []string)

DateTimeURI returns the set of media URIs for playing the current date and time.

func DigitsURI

func DigitsURI(digits string, hash string) []string

DigitsURI returns the set of media URIs to play the given digits.

func DurationURI

func DurationURI(dur time.Duration) (ret []string)

DurationURI returns the set of media URIs for playing the given duration, in human terms (days, hours, minutes, seconds). If any of these terms are zero, they will not be spoken.

func NumberURI

func NumberURI(number int) string

NumberURI returns the media URI to play the given number.

func RecordingURI

func RecordingURI(name string) string

RecordingURI returns the media URI for playing an Asterisk StoredRecording

func ToneURI

func ToneURI(name string) string

ToneURI returns the media URI for playing the given tone, which may be a system-defined indication or an explicit tone pattern construction.

func WaitURI

func WaitURI(t time.Duration) []string

WaitURI returns the set of media URIs for the given period of silence.

Types

This section is empty.

Jump to

Keyboard shortcuts

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