ua

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 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 Refer added in v1.1.8

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

func NewRefer added in v1.1.8

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

func (*Refer) SendRefer added in v1.1.8

func (r *Refer) SendRefer(expires uint32, headers []sip.Header, fromTag string, toTag string, callID string, referTo string, referredBy string, cseqVal int) error

func (*Refer) Stop added in v1.1.8

func (r *Refer) Stop()

type ReferTo added in v1.1.8

type ReferTo string

func (*ReferTo) Clone added in v1.1.8

func (callId *ReferTo) Clone() sip.Header

func (*ReferTo) Equals added in v1.1.8

func (callId *ReferTo) Equals(other interface{}) bool

func (*ReferTo) Name added in v1.1.8

func (callId *ReferTo) Name() string

func (ReferTo) String added in v1.1.8

func (callId ReferTo) String() string

func (ReferTo) Value added in v1.1.8

func (callId ReferTo) Value() string

type ReferredBy added in v1.1.8

type ReferredBy string

func (*ReferredBy) Clone added in v1.1.8

func (callId *ReferredBy) Clone() sip.Header

func (*ReferredBy) Equals added in v1.1.8

func (callId *ReferredBy) Equals(other interface{}) bool

func (*ReferredBy) Name added in v1.1.8

func (callId *ReferredBy) Name() string

func (ReferredBy) String added in v1.1.8

func (callId ReferredBy) String() string

func (ReferredBy) Value added in v1.1.8

func (callId ReferredBy) Value() string

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 UserAgent

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

UserAgent .

func NewUserAgent

func NewUserAgent(config *UserAgentConfig) *UserAgent

NewUserAgent .

func (*UserAgent) HandleBye added in v1.1.12

func (ua *UserAgent) HandleBye(request sip.Request, tx sip.ServerTransaction)

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) InviteWithCustomHeaders

func (ua *UserAgent) InviteWithCustomHeaders(profile *account.Profile, target sip.Uri, recipient sip.SipUri, headers []sip.Header, 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) SendRefer added in v1.1.8

func (ua *UserAgent) SendRefer(profile *account.Profile, recipient sip.SipUri, expires uint32, userdata interface{}, headers []sip.Header, fromTag string, toTag string, callID string, referTo string, referredBy string, cseq int) (*Refer, error)

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