Versions in this module Expand all Collapse all v0 v0.0.1 Jul 31, 2023 Changes in this version + const DefaultHost + const DefaultProtocol + const DefaultTcpPort + const DefaultTlsPort + const DefaultUdpPort + const DefaultWsPort + const DefaultWssPort + const EncodeHost + const EncodeQueryComponent + const EncodeUserPassword + const EncodeZone + const MTU + const RFC3261BranchMagicCookie + func AuthorizeRequest(request Request, response Response, user, password MaybeString) error + func CopyHeaders(name string, from, to Message) + func Escape(s string, mode encoding) string + func GenerateBranch() string + func MakeDialogID(callID, innerID, externalID string) string + func MakeDialogIDFromMessage(msg Message) (string, error) + func PrependCopyHeaders(name string, from, to Message) + func Unescape(s string, mode encoding) (string, error) + type Accept string + func (ct *Accept) Clone() Header + func (ct *Accept) Equals(other interface{}) bool + func (ct *Accept) Name() string + func (ct *Accept) String() string + func (ct Accept) Value() string + type Address struct + DisplayName MaybeString + Params Params + Uri Uri + func NewAddressFromContactHeader(cnt *ContactHeader) *Address + func NewAddressFromFromHeader(from *FromHeader) *Address + func NewAddressFromToHeader(to *ToHeader) *Address + func (addr *Address) AsContactHeader() *ContactHeader + func (addr *Address) AsFromHeader() *FromHeader + func (addr *Address) AsToHeader() *ToHeader + func (addr *Address) Clone() *Address + func (addr *Address) Equals(other interface{}) bool + func (addr *Address) String() string + type AllowHeader []RequestMethod + func (allow AllowHeader) Clone() Header + func (allow AllowHeader) Equals(other interface{}) bool + func (allow AllowHeader) Name() string + func (allow AllowHeader) String() string + func (allow AllowHeader) Value() string + type Authorization struct + func AuthFromValue(value string) *Authorization + func (auth *Authorization) Algorithm() string + func (auth *Authorization) CNonce() string + func (auth *Authorization) CalcResponse() string + func (auth *Authorization) Nc() string + func (auth *Authorization) Nonce() string + func (auth *Authorization) Qop() string + func (auth *Authorization) Realm() string + func (auth *Authorization) Response() string + func (auth *Authorization) SetCNonce(cnonce string) + func (auth *Authorization) SetMethod(method string) *Authorization + func (auth *Authorization) SetNc(nc string) + func (auth *Authorization) SetPassword(password string) *Authorization + func (auth *Authorization) SetQop(qop string) + func (auth *Authorization) SetResponse(response string) + func (auth *Authorization) SetUri(uri string) *Authorization + func (auth *Authorization) SetUsername(username string) *Authorization + func (auth *Authorization) String() string + func (auth *Authorization) Uri() string + func (auth *Authorization) Username() string + type Authorizer interface + AuthorizeRequest func(request Request, response Response) error + type BrokenMessageError struct + Err error + Msg string + func (err *BrokenMessageError) Broken() bool + func (err *BrokenMessageError) Error() string + func (err *BrokenMessageError) Malformed() bool + type CSeq struct + MethodName RequestMethod + SeqNo uint32 + func (cseq *CSeq) Clone() Header + func (cseq *CSeq) Equals(other interface{}) bool + func (cseq *CSeq) Name() string + func (cseq *CSeq) String() string + func (cseq *CSeq) Value() string + type CallID string + func (callId *CallID) Clone() Header + func (callId *CallID) Equals(other interface{}) bool + func (callId *CallID) Name() string + func (callId CallID) String() string + func (callId CallID) Value() string + type CancelError interface + Canceled func() bool + type ClientTransaction interface + Cancel func() error + Responses func() <-chan Response + type ContactHeader struct + Address ContactUri + DisplayName MaybeString + Params Params + func (contact *ContactHeader) Clone() Header + func (contact *ContactHeader) Equals(other interface{}) bool + func (contact *ContactHeader) Name() string + func (contact *ContactHeader) String() string + func (contact *ContactHeader) Value() string + type ContactUri interface + type ContentLength uint32 + func (contentLength *ContentLength) Clone() Header + func (contentLength *ContentLength) Equals(other interface{}) bool + func (contentLength *ContentLength) Name() string + func (contentLength ContentLength) String() string + func (contentLength ContentLength) Value() string + type ContentType string + func (ct *ContentType) Clone() Header + func (ct *ContentType) Equals(other interface{}) bool + func (ct *ContentType) Name() string + func (ct *ContentType) String() string + func (ct ContentType) Value() string + type DefaultAuthorizer struct + Password MaybeString + User MaybeString + func (auth *DefaultAuthorizer) AuthorizeRequest(request Request, response Response) error + type EscapeError string + func (e EscapeError) Error() string + type Event string + func (et *Event) Clone() Header + func (et *Event) Equals(other interface{}) bool + func (et *Event) Name() string + func (et *Event) String() string + func (et Event) Value() string + type ExpireError interface + Expired func() bool + type Expires uint32 + func (expires *Expires) Clone() Header + func (expires *Expires) Equals(other interface{}) bool + func (expires *Expires) Name() string + func (expires *Expires) String() string + func (expires Expires) Value() string + type FromHeader struct + Address Uri + DisplayName MaybeString + Params Params + func (from *FromHeader) Clone() Header + func (from *FromHeader) Equals(other interface{}) bool + func (from *FromHeader) Name() string + func (from *FromHeader) String() string + func (from *FromHeader) Value() string + type GenericHeader struct + Contents string + HeaderName string + func (header *GenericHeader) Clone() Header + func (header *GenericHeader) Equals(other interface{}) bool + func (header *GenericHeader) Name() string + func (header *GenericHeader) String() string + func (header *GenericHeader) Value() string + type Header interface + Clone func() Header + Equals func(other interface{}) bool + Name func() string + String func() string + Value func() string + type InvalidHostError string + func (e InvalidHostError) Error() string + type MalformedMessageError struct + Err error + Msg string + func (err *MalformedMessageError) Broken() bool + func (err *MalformedMessageError) Error() string + func (err *MalformedMessageError) Malformed() bool + type MaxForwards uint32 + func (maxForwards *MaxForwards) Clone() Header + func (maxForwards *MaxForwards) Equals(other interface{}) bool + func (maxForwards *MaxForwards) Name() string + func (maxForwards MaxForwards) String() string + func (maxForwards MaxForwards) Value() string + type MaybeString interface + Equals func(other interface{}) bool + String func() string + type Message interface + AppendHeader func(header Header) + Body func() string + CSeq func() (*CSeq, bool) + CallID func() (*CallID, bool) + Clone func() Message + Contact func() (*ContactHeader, bool) + ContentLength func() (*ContentLength, bool) + ContentType func() (*ContentType, bool) + Destination func() string + Fields func() log.Fields + From func() (*FromHeader, bool) + GetHeaders func(name string) []Header + Headers func() []Header + IsAck func() bool + IsCancel func() bool + MessageID func() MessageID + PrependHeader func(header Header) + PrependHeaderAfter func(header Header, afterName string) + RemoveHeader func(name string) + ReplaceHeaders func(name string, headers []Header) + SetBody func(body string, setContentLength bool) + SetDestination func(dest string) + SetSipVersion func(version string) + SetSource func(src string) + SetTransport func(tp string) + Short func() string + SipVersion func() string + Source func() string + StartLine func() string + String func() string + To func() (*ToHeader, bool) + Transport func() string + Via func() (ViaHeader, bool) + ViaHop func() (*ViaHop, bool) + WithFields func(fields log.Fields) Message + type MessageError interface + Broken func() bool + Malformed func() bool + type MessageID string + func NextMessageID() MessageID + type MessageMapper func(msg Message) Message + type Params interface + Add func(key string, val MaybeString) Params + Clone func() Params + Equals func(params interface{}) bool + Get func(key string) (MaybeString, bool) + Has func(key string) bool + Items func() map[string]MaybeString + Keys func() []string + Length func() int + Remove func(key string) Params + String func() string + ToString func(sep uint8) string + func NewParams() Params + type Port uint16 + func DefaultPort(protocol string) Port + func (port *Port) Clone() *Port + func (port *Port) Equals(other interface{}) bool + func (port *Port) String() string + type ProxyRequireHeader struct + Options []string + func (proxyRequire *ProxyRequireHeader) Clone() Header + func (proxyRequire *ProxyRequireHeader) Equals(other interface{}) bool + func (proxyRequire *ProxyRequireHeader) Name() string + func (proxyRequire *ProxyRequireHeader) String() string + func (proxyRequire *ProxyRequireHeader) Value() string + type RecordRouteHeader struct + Addresses []Uri + func (route *RecordRouteHeader) Clone() Header + func (route *RecordRouteHeader) Equals(other interface{}) bool + func (route *RecordRouteHeader) Name() string + func (route *RecordRouteHeader) String() string + func (route *RecordRouteHeader) Value() string + type Request interface + IsInvite func() bool + Method func() RequestMethod + Recipient func() Uri + SetMethod func(method RequestMethod) + SetRecipient func(recipient Uri) + func CopyRequest(req Request) Request + func NewAckRequest(ackID MessageID, inviteRequest Request, inviteResponse Response, body string, ...) Request + func NewCancelRequest(cancelID MessageID, requestForCancel Request, fields log.Fields) Request + func NewRequest(messID MessageID, method RequestMethod, recipient Uri, sipVersion string, ...) Request + type RequestBuilder struct + func NewRequestBuilder() *RequestBuilder + func (rb *RequestBuilder) AddHeader(header Header) *RequestBuilder + func (rb *RequestBuilder) AddVia(via *ViaHop) *RequestBuilder + func (rb *RequestBuilder) Build() (Request, error) + func (rb *RequestBuilder) RemoveHeader(headerName string) *RequestBuilder + func (rb *RequestBuilder) SetAccept(accept *Accept) *RequestBuilder + func (rb *RequestBuilder) SetAllow(methods []RequestMethod) *RequestBuilder + func (rb *RequestBuilder) SetBody(body string) *RequestBuilder + func (rb *RequestBuilder) SetCallID(callID *CallID) *RequestBuilder + func (rb *RequestBuilder) SetContact(address *Address) *RequestBuilder + func (rb *RequestBuilder) SetContentType(contentType *ContentType) *RequestBuilder + func (rb *RequestBuilder) SetExpires(expires *Expires) *RequestBuilder + func (rb *RequestBuilder) SetFrom(address *Address) *RequestBuilder + func (rb *RequestBuilder) SetHost(host string) *RequestBuilder + func (rb *RequestBuilder) SetMaxForwards(maxForwards *MaxForwards) *RequestBuilder + func (rb *RequestBuilder) SetMethod(method RequestMethod) *RequestBuilder + func (rb *RequestBuilder) SetRecipient(uri Uri) *RequestBuilder + func (rb *RequestBuilder) SetRequire(options []string) *RequestBuilder + func (rb *RequestBuilder) SetRoutes(routes []Uri) *RequestBuilder + func (rb *RequestBuilder) SetSeqNo(seqNo uint) *RequestBuilder + func (rb *RequestBuilder) SetSupported(options []string) *RequestBuilder + func (rb *RequestBuilder) SetTo(address *Address) *RequestBuilder + func (rb *RequestBuilder) SetTransport(transport string) *RequestBuilder + func (rb *RequestBuilder) SetUserAgent(userAgent *UserAgentHeader) *RequestBuilder + type RequestError struct + Code uint + Reason string + Request Request + Response Response + func NewRequestError(code uint, reason string, request Request, response Response) *RequestError + func (err *RequestError) Error() string + type RequestMethod string + const ACK + const BYE + const CANCEL + const INFO + const INVITE + const MESSAGE + const NOTIFY + const OPTIONS + const PRACK + const PUBLISH + const REFER + const REGISTER + const SUBSCRIBE + const UPDATE + func (method *RequestMethod) Equals(other *RequestMethod) bool + type RequireHeader struct + Options []string + func (require *RequireHeader) Clone() Header + func (require *RequireHeader) Equals(other interface{}) bool + func (require *RequireHeader) Name() string + func (require *RequireHeader) String() string + func (require *RequireHeader) Value() string + type Response interface + IsClientError func() bool + IsGlobalError func() bool + IsProvisional func() bool + IsRedirection func() bool + IsServerError func() bool + IsSuccess func() bool + Previous func() []Response + Reason func() string + SetPrevious func(responses []Response) + SetReason func(reason string) + SetStatusCode func(code StatusCode) + StatusCode func() StatusCode + func CopyResponse(res Response) Response + func NewResponse(messID MessageID, sipVersion string, statusCode StatusCode, reason string, ...) Response + func NewResponseFromRequest(resID MessageID, req Request, statusCode StatusCode, reason string, ...) Response + type RouteHeader struct + Addresses []Uri + func (route *RouteHeader) Clone() Header + func (route *RouteHeader) Equals(other interface{}) bool + func (route *RouteHeader) Name() string + func (route *RouteHeader) String() string + func (route *RouteHeader) Value() string + type ServerHeader string + func (srv *ServerHeader) Clone() Header + func (srv *ServerHeader) Equals(other interface{}) bool + func (srv *ServerHeader) Name() string + func (srv *ServerHeader) String() string + func (srv ServerHeader) Value() string + type ServerTransaction interface + Acks func() <-chan Request + Cancels func() <-chan Request + Respond func(res Response) error + type SipUri struct + FHeaders Params + FHost string + FIsEncrypted bool + FPassword MaybeString + FPort *Port + FUriParams Params + FUser MaybeString + func (uri *SipUri) Clone() Uri + func (uri *SipUri) Equals(val interface{}) bool + func (uri *SipUri) Headers() Params + func (uri *SipUri) Host() string + func (uri *SipUri) IsEncrypted() bool + func (uri *SipUri) IsWildcard() bool + func (uri *SipUri) Password() MaybeString + func (uri *SipUri) Port() *Port + func (uri *SipUri) SetEncrypted(flag bool) + func (uri *SipUri) SetHeaders(params Params) + func (uri *SipUri) SetHost(host string) + func (uri *SipUri) SetPassword(pass MaybeString) + func (uri *SipUri) SetPort(port *Port) + func (uri *SipUri) SetUriParams(params Params) + func (uri *SipUri) SetUser(user MaybeString) + func (uri *SipUri) String() string + func (uri *SipUri) UriParams() Params + func (uri *SipUri) User() MaybeString + type StatusCode uint16 + type String struct + Str string + func (str String) Equals(other interface{}) bool + func (str String) String() string + type SupportedHeader struct + Options []string + func (support *SupportedHeader) Clone() Header + func (support *SupportedHeader) Equals(other interface{}) bool + func (support *SupportedHeader) Name() string + func (support *SupportedHeader) String() string + func (support *SupportedHeader) Value() string + type ToHeader struct + Address Uri + DisplayName MaybeString + Params Params + func (to *ToHeader) Clone() Header + func (to *ToHeader) Equals(other interface{}) bool + func (to *ToHeader) Name() string + func (to *ToHeader) String() string + func (to *ToHeader) Value() string + type Transaction interface + Done func() <-chan bool + Errors func() <-chan error + Key func() TransactionKey + Origin func() Request + String func() string + type TransactionKey string + func (key TransactionKey) String() string + type Transport interface + IsReliable func(network string) bool + IsStreamed func(network string) bool + Messages func() <-chan Message + Send func(msg Message) error + type UnexpectedMessageError struct + Err error + Msg string + func (err *UnexpectedMessageError) Broken() bool + func (err *UnexpectedMessageError) Error() string + func (err *UnexpectedMessageError) Malformed() bool + type UnsupportedHeader struct + Options []string + func (unsupported *UnsupportedHeader) Clone() Header + func (unsupported *UnsupportedHeader) Equals(other interface{}) bool + func (unsupported *UnsupportedHeader) Name() string + func (unsupported *UnsupportedHeader) String() string + func (unsupported *UnsupportedHeader) Value() string + type UnsupportedMessageError struct + Err error + Msg string + func (err *UnsupportedMessageError) Broken() bool + func (err *UnsupportedMessageError) Error() string + func (err *UnsupportedMessageError) Malformed() bool + type Uri interface + Clone func() Uri + Equals func(other interface{}) bool + Headers func() Params + Host func() string + IsEncrypted func() bool + IsWildcard func() bool + Password func() MaybeString + Port func() *Port + SetEncrypted func(flag bool) + SetHeaders func(params Params) + SetHost func(host string) + SetPassword func(pass MaybeString) + SetPort func(port *Port) + SetUriParams func(params Params) + SetUser func(user MaybeString) + String func() string + UriParams func() Params + User func() MaybeString + type UserAgentHeader string + func (ua *UserAgentHeader) Clone() Header + func (ua *UserAgentHeader) Equals(other interface{}) bool + func (ua *UserAgentHeader) Name() string + func (ua *UserAgentHeader) String() string + func (ua UserAgentHeader) Value() string + type ViaHeader []*ViaHop + func (via ViaHeader) Clone() Header + func (via ViaHeader) Equals(other interface{}) bool + func (via ViaHeader) Name() string + func (via ViaHeader) String() string + func (via ViaHeader) Value() string + type ViaHop struct + Host string + Params Params + Port *Port + ProtocolName string + ProtocolVersion string + Transport string + func (hop *ViaHop) Clone() *ViaHop + func (hop *ViaHop) Equals(other interface{}) bool + func (hop *ViaHop) SentBy() string + func (hop *ViaHop) String() string + type WildcardUri struct + func (uri WildcardUri) Clone() Uri + func (uri WildcardUri) Equals(other interface{}) bool + func (uri WildcardUri) Headers() Params + func (uri WildcardUri) Host() string + func (uri WildcardUri) IsEncrypted() bool + func (uri WildcardUri) IsWildcard() bool + func (uri WildcardUri) Password() MaybeString + func (uri WildcardUri) Port() *Port + func (uri WildcardUri) SetEncrypted(flag bool) + func (uri WildcardUri) SetHeaders(params Params) + func (uri WildcardUri) SetHost(host string) + func (uri WildcardUri) SetPassword(pass MaybeString) + func (uri WildcardUri) SetPort(port *Port) + func (uri WildcardUri) SetUriParams(params Params) + func (uri WildcardUri) SetUser(user MaybeString) + func (uri WildcardUri) String() string + func (uri WildcardUri) UriParams() Params + func (uri WildcardUri) User() MaybeString