Documentation ¶
Overview ¶
Package voicemail implements support for retrieving voicemails sent to mailboxes. It's possible to extract caller and target numbers from mail content and downloads attached audio files for later local playback.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AddToSchema = configBuilder.AddToSchema
)
View Source
var Spec = conf.SectionSpec(append([]conf.OptionSpec{ { Name: "Name", Type: conf.StringType, Description: "The name of the voicemail", Required: true, }, { Name: "Disabled", Type: conf.BoolType, Default: "no", Description: "Whether or not the watching of the specified mailbox is disabled.", }, { Name: "ExtractCallerRegexp", Type: conf.StringType, Required: true, }, { Name: "ExtractTargetRegexp", Type: conf.StringType, }, }, mailbox.MailboxInfoSpec...))
Spec defines the configuration stanzas used to configure a VoiceMail mailbox.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct { Name string Disabled bool ExtractCallerRegexp string ExtractTargetRegexp string mailbox.Config }
Definition describes a mailbox that receives voice-mails.
type Mailbox ¶
type Mailbox struct {
// contains filtered or unexported fields
}
Mailbox handles voicmails.
func New ¶
func New( ctx context.Context, customers customerdb.Database, voicemails voicemaildb.Database, country string, cfg Definition, mng *mailsync.Manager, ) (*Mailbox, error)
New creates a new voicmail mailbox. TODO(ppacher): move most parts of the setup routine into voicemail.Manager.
func (*Mailbox) HandleMail ¶
HandleMail implements mailsync.MessageHandler.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(ctx context.Context, country string, syncManager *mailsync.Manager, customers customerdb.Database, voicemails voicemaildb.Database, rtcfg *runtime.ConfigSchema) (*Manager, error)
func (*Manager) NotifyChange ¶
Click to show internal directories.
Click to hide internal directories.