ua

package
v1.1.7-0...-d08fa44 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InviteSessionHandler

type InviteSessionHandler func(s *session.Session, req *sip.Request, resp *sip.Response, status session.Status)

InviteSessionHandler .

type Register

type Register struct {
	// contains filtered or unexported fields
}

func NewRegister

func NewRegister(ua *UserAgent, profile *account.Profile, recipient sip.SipUri, data interface{}) *Register

func (*Register) SendRegister

func (r *Register) SendRegister(expires uint32) error

func (*Register) Stop

func (r *Register) Stop()

type RegisterHandler

type RegisterHandler func(regState account.RegisterState)

RegisterHandler .

type SessionKey

type SessionKey struct {
	CallID sip.CallID
	TagID  sip.MaybeString
}

SessionKey - Session Key for Session Storage

func NewSessionKey

func NewSessionKey(callID sip.CallID, tagID sip.MaybeString) SessionKey

NewSessionKey - Build a Session Key quickly

type UserAgent

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

UserAgent .

func NewUserAgent

func NewUserAgent(config *UserAgentConfig) *UserAgent

NewUserAgent .

func (*UserAgent) Invite

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

func (*UserAgent) InviteWithContext

func (ua *UserAgent) InviteWithContext(ctx context.Context, profile *account.Profile, target sip.Uri, recipient sip.SipUri, body *string) (*session.Session, error)

func (*UserAgent) Log

func (ua *UserAgent) Log() log.Logger

func (*UserAgent) Request

func (ua *UserAgent) Request(req *sip.Request) (sip.ClientTransaction, error)

func (*UserAgent) RequestWithContext

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

RequestWithContext .

func (*UserAgent) SendRegister

func (ua *UserAgent) SendRegister(profile *account.Profile, recipient sip.SipUri, expires uint32, userdata interface{}) (*Register, error)

func (*UserAgent) Shutdown

func (ua *UserAgent) Shutdown()

type UserAgentConfig

type UserAgentConfig struct {
	SipStack *stack.SipStack
}

UserAgentConfig .

Jump to

Keyboard shortcuts

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