Versions in this module Expand all Collapse all v0 v0.0.1 Oct 19, 2022 Changes in this version + const DefaultPNTimeout + type ContactInstance struct + Contact *sip.ContactHeader + LastUpdated uint32 + RegExpires uint32 + Source string + Transport string + UserAgent string + func NewContactInstanceForRequest(request sip.Request) *ContactInstance + func (c *ContactInstance) GetPNParams() *PNParams + type ExpiredMap struct + func NewExpiredMap() *ExpiredMap + func (e *ExpiredMap) Clear() + func (e *ExpiredMap) Close() + func (e *ExpiredMap) Delete(key interface{}) + func (e *ExpiredMap) DoForEach(handler func(interface{}, interface{})) + func (e *ExpiredMap) DoForEachWithBreak(handler func(interface{}, interface{}) bool) + func (e *ExpiredMap) Get(key interface{}) (found bool, value interface{}) + func (e *ExpiredMap) Length() int + func (e *ExpiredMap) Remove(key interface{}) + func (e *ExpiredMap) Set(key, value interface{}, expireSeconds int64) + func (e *ExpiredMap) Size() int + func (e *ExpiredMap) Stop() + func (e *ExpiredMap) TTL(key interface{}) int64 + type MemoryRegistry struct + func NewMemoryRegistry() *MemoryRegistry + func (mr *MemoryRegistry) AddAor(aor sip.Uri, instance *ContactInstance) error + func (mr *MemoryRegistry) AorIsRegistered(aor sip.Uri) bool + func (mr *MemoryRegistry) GetAllContacts() map[sip.Uri]map[string]*ContactInstance + func (mr *MemoryRegistry) GetContacts(aor sip.Uri) (*map[string]*ContactInstance, bool) + func (mr *MemoryRegistry) HandleConnectionError(connError *transport.ConnectionError) bool + func (mr *MemoryRegistry) RemoveAor(aor sip.Uri) error + func (mr *MemoryRegistry) RemoveContact(aor sip.Uri, instance *ContactInstance) error + func (mr *MemoryRegistry) UpdateContact(aor sip.Uri, instance *ContactInstance) error + type PNParams struct + Expires uint32 + PRID string + PURR string + Param string + Provider string + func (p *PNParams) Disabled() bool + func (p *PNParams) Equals(other *PNParams) bool + func (p *PNParams) String() string + type PushCallback func(pn *PNParams, payload map[string]string) error + type Pusher struct + CH chan *ContactInstance + func NewPusher() *Pusher + func (pn *Pusher) Abort() + func (pn *Pusher) WaitContactOnline() (*ContactInstance, error) + type RFC8599 struct + PushCallback PushCallback + func NewRFC8599(callback PushCallback) *RFC8599 + func (r *RFC8599) HandleContactInstance(aor sip.Uri, instance *ContactInstance) + func (r *RFC8599) PNRecords() map[PNParams]sip.Uri + func (r *RFC8599) TryPush(aor sip.Uri, from *sip.FromHeader) (*Pusher, bool) + type Registry interface + AddAor func(aor sip.Uri, instance *ContactInstance) error + AorIsRegistered func(aor sip.Uri) bool + GetAllContacts func() map[sip.Uri]map[string]*ContactInstance + GetContacts func(aor sip.Uri) (*map[string]*ContactInstance, bool) + HandleConnectionError func(connError *transport.ConnectionError) bool + RemoveAor func(aor sip.Uri) error + RemoveContact func(aor sip.Uri, instance *ContactInstance) error + UpdateContact func(aor sip.Uri, instance *ContactInstance) error