ua

package
v1.0.1-0...-c50d641 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAgent

type UserAgent struct {
	InviteStateHandler   invite.InviteSessionHandler
	RegisterStateHandler account.RegisterHandler
	// contains filtered or unexported fields
}

UserAgent .

func NewUserAgent

func NewUserAgent(config *UserAgentConfig, logger log.Logger) *UserAgent

NewUserAgent .

func (*UserAgent) BuildRequest

func (ua *UserAgent) BuildRequest(
	method sip.RequestMethod,
	from *sip.Address,
	to *sip.Address,
	contact *sip.Address,
	target sip.SipUri,
	callID *sip.CallID) (*sip.Request, error)

func (*UserAgent) Invite

func (ua *UserAgent) Invite(profile *account.Profile, target sip.SipUri, body *string) (*invite.Session, error)

func (*UserAgent) RemoveSess

func (ua *UserAgent) RemoveSess(callID *sip.CallID)

func (*UserAgent) Request

func (ua *UserAgent) Request(req *sip.Request)

func (*UserAgent) RequestWithContext

func (ua *UserAgent) RequestWithContext(ctx context.Context, request sip.Request, authorizer sip.Authorizer) (sip.Response, error)

RequestWithContext .

func (*UserAgent) SendBye

func (ua *UserAgent) SendBye(profile *account.Profile, callID *sip.CallID, target sip.SipUri)

func (*UserAgent) SendRegister

func (ua *UserAgent) SendRegister(profile *account.Profile, target sip.SipUri, expires uint32)

func (*UserAgent) Shutdown

func (ua *UserAgent) Shutdown()

type UserAgentConfig

type UserAgentConfig struct {
	UserAgent string
	Endpoint  *endpoint.EndPoint
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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