header

package
v0.0.0-...-9d926e1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/**
	 * One or more network protocols contained in the session description
	 * are not available.
	 */
	INCOMPATIBLE_NETWORK_PROTOCOL = 300

	/**
	 * One or more network address formats contained in the session
	 * description are not available.
	 */
	INCOMPATIBLE_NETWORK_ADDRESS_FORMATS = 301

	/**
	 * One or more transport protocols described in the session description
	 * are not available.
	 */
	INCOMPATIBLE_TRANSPORT_PROTOCOL = 302

	/**
	 * One or more bandwidth measurement units contained in the session
	 * description were not understood.
	 */
	INCOMPATIBLE_BANDWIDTH_UNITS = 303

	/**
	 * One or more media types contained in the session description are
	 * not available.
	 */
	MEDIA_TYPE_NOT_AVAILABLE = 304

	/**
	 * One or more media formats contained in the session description are
	 * not available.
	 */
	INCOMPATIBLE_MEDIA_FORMAT = 305

	/**
	 * One or more of the media attributes in the session description are
	 * not supported.
	 */
	ATTRIBUTE_NOT_UNDERSTOOD = 306

	/**
	 * A parameter other than those listed above was not understood.
	 */
	SESSION_DESCRIPTION_PARAMETER_NOT_UNDERSTOOD = 307

	/**
	 * The site where the user is located does not support multicast.
	 */
	MULTICAST_NOT_AVAILABLE = 330

	/**
	 * The site where the user is located does not support unicast
	 * communication (usually due to the presence of a firewall).
	 */
	UNICAST_NOT_AVAILABLE = 331

	/**
	 * The bandwidth specified in the session description or defined by the
	 * media exceeds that known to be available.
	 */
	INSUFFICIENT_BANDWIDTH = 370

	/**
	 * The warning text can include arbitrary information to be presented to
	 * a human user, or logged. A system receiving this warning MUST NOT
	 * take any automated action.
	 */
	MISCELLANEOUS_WARNING = 399
)
View Source
const ParameterNames_ACTION = "action"
View Source
const ParameterNames_ALERT = "alert"
View Source
const ParameterNames_ALGORITHM = "algorithm"
View Source
const ParameterNames_BRANCH = "branch"
View Source
const ParameterNames_CARD = "card"
View Source
const ParameterNames_CAUSE = "cause"
View Source
const ParameterNames_CNONCE = "cnonce"
View Source
const ParameterNames_COOKIE = "cookie"
View Source
const ParameterNames_DIGEST = "Digest"
View Source
const ParameterNames_DOMAIN = "domain"
View Source
const ParameterNames_DURATION = "duration"
View Source
const ParameterNames_EMERGENCY = "emergency"
View Source
const ParameterNames_EXPIRES = "expires"
View Source
const ParameterNames_HANDLING = "handling"
View Source
const ParameterNames_HIDDEN = "hidden"
View Source
const ParameterNames_ICON = "icon"
View Source
const ParameterNames_ID = "id"
View Source
const ParameterNames_INFO = "info"
View Source
const ParameterNames_MADDR = "maddr"
View Source
const ParameterNames_NC = "nc"
View Source
const ParameterNames_NEXT_NONCE = "nextnonce"
View Source
const ParameterNames_NONCE = "nonce"
View Source
const ParameterNames_NONCE_COUNT = "nc"
View Source
const ParameterNames_NON_URGENT = "non-urgent"
View Source
const ParameterNames_NORMAL = "normal"
View Source
const ParameterNames_OPAQUE = "opaque"
View Source
const ParameterNames_OPTIONAL = "optional"
View Source
const ParameterNames_PASSWORD = "password"
View Source
const ParameterNames_PROXY = "proxy"
View Source
const ParameterNames_PUBKEY = "pubkey"
View Source
const ParameterNames_PURPOSE = "purpose"
View Source
const ParameterNames_Q = "q"
View Source
const ParameterNames_QOP = "qop"
View Source
const ParameterNames_REALM = "realm"
View Source
const ParameterNames_RECEIVED = "received"
View Source
const ParameterNames_REDIRECT = "redirect"
View Source
const ParameterNames_RENDER = "render"
View Source
const ParameterNames_REQUIRED = "required"
View Source
const ParameterNames_RESPONSE = "response"
View Source
const ParameterNames_RESPONSE_AUTH = "rspauth"
View Source
const ParameterNames_SESSION = "session"
View Source
const ParameterNames_SIGNATURE = "signature"
View Source
const ParameterNames_SIGNED_BY = "signed-by"
View Source
const ParameterNames_STALE = "stale"
View Source
const ParameterNames_TAG = "tag"
View Source
const ParameterNames_TEXT = "text"
View Source
const ParameterNames_TRANSPORT = "transport"
View Source
const ParameterNames_TTL = "ttl"
View Source
const ParameterNames_URGENT = "urgent"
View Source
const ParameterNames_URI = "uri"
View Source
const ParameterNames_USERNAME = "username"
View Source
const ParameterNames_VERSION = "version"
View Source
const SIPConstants_BRANCH_MAGIC_COOKIE = "z9hG4bK"

* Prefix for the branch parameter that identifies

  • BIS 09 compatible branch strings. This indicates
  • that the branch may be as a global identifier for
  • identifying transactions.
View Source
const SIPConstants_DEFAULT_ENCODING = "UTF-8"
View Source
const SIPConstants_DEFAULT_PORT = 5060
View Source
const SIPConstants_SIP_VERSION_STRING = "SIP/2.0"

* constant SIP_VERSION_STRING

Variables

This section is empty.

Functions

This section is empty.

Types

type Accept

type Accept struct {
	Parameters
	// contains filtered or unexported fields
}

* *Accept header : The top level header is actually AcceptList which is a list of *Accept headers.

func NewAccept

func NewAccept() *Accept

* default constructor

func (*Accept) AllowsAllContentSubTypes

func (this *Accept) AllowsAllContentSubTypes() bool

*

  • returns true if this header allows all ContentSubTypes,
  • false otherwise.
  • @return boolean

func (*Accept) AllowsAllContentTypes

func (this *Accept) AllowsAllContentTypes() bool

* returns true if this header allows all ContentTypes,

  • false otherwise.
  • @return Boolean

func (*Accept) EncodeBody

func (this *Accept) EncodeBody() string

* Encode the value of this header into cannonical form. *@return encoded value of the header as a string.

func (*Accept) GetContentSubType

func (this *Accept) GetContentSubType() string

* get the ContentSubType fiels

  • @return String

func (*Accept) GetContentType

func (this *Accept) GetContentType() string

* get the contentType field

  • @return String

func (*Accept) GetMediaRange

func (this *Accept) GetMediaRange() *MediaRange

* get the MediaRange field

  • @return MediaRange

func (*Accept) GetQValue

func (this *Accept) GetQValue() float32

* get the QValue field. Return -1 if the parameter has not been

  • set.
  • @return float

func (*Accept) HasQValue

func (this *Accept) HasQValue() bool

*

  • Return true if the q value has been set.
  • @return boolean

func (*Accept) RemoveQValue

func (this *Accept) RemoveQValue()

*

  • Remove the q value.

func (*Accept) SetContentSubType

func (this *Accept) SetContentSubType(subtype string)

* set the ContentSubType field

  • @param subtype String to set

func (*Accept) SetContentType

func (this *Accept) SetContentType(mtype string)

* set the ContentType field

  • @param type String to set

func (*Accept) SetMediaRange

func (this *Accept) SetMediaRange(m *MediaRange)

*

  • Set the mediaRange member
  • @param m MediaRange field

func (*Accept) SetQValue

func (this *Accept) SetQValue(q float32) (InvalidArgumentException error)

*

  • Sets q-value for media-range. Q-values allow the *
  • user to indicate the relative degree of preference for that media-range, *
  • using the qvalue scale from 0 to 1. If no q-value is present, the *
  • media-range should be treated as having a q-value of 1. * * *
  • @param qValue - the new float value of the q-value *
  • @throws InvalidArgumentException if the q parameter value is not between <code>0 and 1</code>. *

func (*Accept) String

func (this *Accept) String() string

type AcceptEncoding

type AcceptEncoding struct {
	Parameters
	// contains filtered or unexported fields
}

* * Accept-Encoding SIP (HTTP) Header. * <pre> * From HTTP RFC 2616 * * * The Accept-Encoding request-header field is similar to Accept, but * restricts the content-codings (section 3.5) that are acceptable in * the response. * * * Accept-Encoding = "Accept-Encoding" ":" * * * 1#( codings [ ";" "q" "=" qvalue ] ) * codings = ( content-coding | "*" ) * * Examples of its use are: * * Accept-Encoding: compress, gzip * Accept-Encoding: * Accept-Encoding: * * Accept-Encoding: compress;q=0.5, gzip;q=1.0 * Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 * </pre> *

func NewAcceptEncoding

func NewAcceptEncoding() *AcceptEncoding

* default constructor

func (*AcceptEncoding) EncodeBody

func (this *AcceptEncoding) EncodeBody() string

* Encode the value of this header. *@return the value of this header encoded into a string.

func (*AcceptEncoding) GetEncoding

func (this *AcceptEncoding) GetEncoding() string

* get ContentEncoding field

  • @return String

func (*AcceptEncoding) GetQValue

func (this *AcceptEncoding) GetQValue() float32

* get the QValue field. Return -1 if the parameter has not been

  • set.
  • @return float

func (*AcceptEncoding) HasQValue

func (this *AcceptEncoding) HasQValue() bool

*

  • Return true if the q value has been set.
  • @return boolean

func (*AcceptEncoding) RemoveQValue

func (this *AcceptEncoding) RemoveQValue()

*

  • Remove the q value.

func (*AcceptEncoding) SetEncoding

func (this *AcceptEncoding) SetEncoding(encoding string) (ParseException error)

*

  • Sets the encoding of an EncodingHeader. *
  • @param encoding - the new string value defining the encoding.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the encoding value.

func (*AcceptEncoding) SetQValue

func (this *AcceptEncoding) SetQValue(q float32) (InvalidArgumentException error)

*

  • Sets q-value for media-range. Q-values allow the *
  • user to indicate the relative degree of preference for that media-range, *
  • using the qvalue scale from 0 to 1. If no q-value is present, the *
  • media-range should be treated as having a q-value of 1. * * *
  • @param qValue - the new float value of the q-value *
  • @throws InvalidArgumentException if the q parameter value is not between <code>0 and 1</code>. *

func (*AcceptEncoding) String

func (this *AcceptEncoding) String() string

type AcceptEncodingHeader

type AcceptEncodingHeader interface {
	ParametersHeader
	Encoding
	QValue
}

*

  • This interface represents the Accept-Encoding request-header.
  • A client includes an AcceptEncodingHeader in a Request to tell the server
  • what coding schemes are acceptable in the Response e.g. compress, gzip.
  • <p>
  • If an AcceptEncodingHeader is present, and if the server cannot send a
  • Response which is acceptable according to the AcceptEncodingHeader, then
  • the server should return a Response with a status code of NOT_ACCEPTABLE.
  • <p>
  • An empty Accept-Encoding header field is permissible, it is equivalent to
  • <code>Accept-Encoding: identity</code>, meaning no encoding is permissible.
  • <p>
  • If no Accept-Encoding header field is present, the server SHOULD assume a
  • default value of identity.
  • <p>
  • For Example:<br>
  • <code>Accept-Encoding: gzip</code> *

type AcceptEncodingList

type AcceptEncodingList struct {
	SIPHeaderList
}

* * AcceptEncodingList of AccepEncoding headers.

func NewAcceptEncodingList

func NewAcceptEncodingList() *AcceptEncodingList

* default constructor

type AcceptHeader

type AcceptHeader interface {
	MediaType
	ParametersHeader
	QValue

	AllowsAllContentSubTypes() bool

	AllowsAllContentTypes() bool
}

*

  • This interface represents an Accept request-header. It can be used in to

  • specify media-ranges which are acceptable for the response. AcceptHeaders

  • can be used to indicate that the request is specifically limited to a small

  • set of desired types. The specification of the acceptable media

  • is split into type and subtype.

  • <p>

  • An AcceptHeader may be followed by one or more parameters applicable to the

  • media-range. q-values allow the user to indicate the relative degree of

  • preference for that media-range, using the qvalue scale from 0 to 1. (If no

  • q-value is present, the media-range should be treated as having a q-value of

  • 1.)

  • <p>

  • If no AcceptHeader is present in a Request, the server SHOULD assume a media

  • of type "application" and subType

  • "sdp". If an AcceptHeader is present, and if the server cannot send a

  • response which is acceptable according to the combined Accept field value,

  • then the server should send a Response message with a NOT_ACCEPTABLE

  • status code.

  • <p>

  • For example:<br>

  • <code>Accept: application/sdp;level=1, application/x-private, text/html</code> *

type AcceptLanguage

type AcceptLanguage struct {
	Parameters
	// contains filtered or unexported fields
}

*

  • Accept Language body.
  • <pre>
  • HTTP RFC 2616 Section 14.4
  • Accept-Language = "Accept-Language" ":"
  • 1#( language-range [ ";" "q" "=" qvalue ] )
  • language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) *
  • </pre> *
  • @see AcceptLanguageList

func NewAcceptLanguage

func NewAcceptLanguage() *AcceptLanguage

* default constructor

func (*AcceptLanguage) EncodeBody

func (this *AcceptLanguage) EncodeBody() string
  • Encode the value of this header to a string. *@return encoded header as a string.

func (*AcceptLanguage) GetAcceptLanguage

func (this *AcceptLanguage) GetAcceptLanguage() string

*

  • Gets the language value of the AcceptLanguageHeader. * * *
  • @return the language Locale value of this AcceptLanguageHeader *

func (*AcceptLanguage) GetLanguageRange

func (this *AcceptLanguage) GetLanguageRange() string

* get the LanguageRange field

  • @return String

func (*AcceptLanguage) GetQValue

func (this *AcceptLanguage) GetQValue() float32

* get the QValue field. Return -1 if the parameter has not been

  • set.
  • @return float

func (*AcceptLanguage) HasQValue

func (this *AcceptLanguage) HasQValue() bool

*

  • Return true if the q value has been set.
  • @return boolean

func (*AcceptLanguage) RemoveQValue

func (this *AcceptLanguage) RemoveQValue()

*

  • Remove the q value.

func (*AcceptLanguage) SetAcceptLanguage

func (this *AcceptLanguage) SetAcceptLanguage(language string)

*

  • Sets the language parameter of this AcceptLanguageHeader. * * *
  • @param language - the new Locale value of the language of *
  • AcceptLanguageHeader * *

func (*AcceptLanguage) SetLanguageRange

func (this *AcceptLanguage) SetLanguageRange(languageRange string)

*

  • Set the languageRange. *
  • @param languageRange is the language range to set. *

func (*AcceptLanguage) SetQValue

func (this *AcceptLanguage) SetQValue(q float32) (InvalidArgumentException error)

*

  • Sets q-value for media-range. Q-values allow the *
  • user to indicate the relative degree of preference for that media-range, *
  • using the qvalue scale from 0 to 1. If no q-value is present, the *
  • media-range should be treated as having a q-value of 1. * * *
  • @param qValue - the new float value of the q-value *
  • @throws InvalidArgumentException if the q parameter value is not between <code>0 and 1</code>. *

func (*AcceptLanguage) String

func (this *AcceptLanguage) String() string

type AcceptLanguageHeader

type AcceptLanguageHeader interface {
	ParametersHeader
	QValue

	GetAcceptLanguage() string

	SetAcceptLanguage(language string)
}

type AcceptLanguageList

type AcceptLanguageList struct {
	SIPHeaderList
}

* * AcceptLanguageList: Strings together a list of AcceptLanguage SIPHeaders.

func NewAcceptLanguageList

func NewAcceptLanguageList() *AcceptLanguageList

func (*AcceptLanguageList) GetFirst

func (this *AcceptLanguageList) GetFirst() Header

func (*AcceptLanguageList) GetLast

func (this *AcceptLanguageList) GetLast() Header

type AcceptList

type AcceptList struct {
	SIPHeaderList
}

* * Accept List of SIP headers. *@see Accept

func NewAcceptList

func NewAcceptList() *AcceptList

* default constructor

type AddressHeader

type AddressHeader interface {

	/**
	 * Sets the Address parameter of this Address.
	 *
	 * @param address - the Address object that represents the new
	 *  address of this Address.
	 */
	SetAddress(addr address.Address)

	/**
	 * Gets the address parameter of this Address.
	 *
	 * @return the Address of this Address
	 */
	GetAddress() address.Address
}

*

  • This interface represents methods for manipulating Address object
  • values for any header that contains a Address value.
  • <p>
  • When the header field value contains a display name encapsulated in the
  • Address, the URI including all URI parameters is enclosed in "<" and ">".
  • If no "<" and ">" are present, all parameters after the URI are header
  • parameters, not URI parameters. The display name can be tokens, or a
  • quoted string, if a larger character set is desired. *
  • @see Address
  • @see ContactHeader
  • @see FromHeader
  • @see RecordRouteHeader
  • @see ReplyToHeader
  • @see RouteHeader
  • @see ToHeader

type AddressParameters

type AddressParameters struct {
	Parameters
	// contains filtered or unexported fields
}

* An abstract class for headers that take an address and parameters.

func NewAddressParameters

func NewAddressParameters(name string) *AddressParameters

* Constructor given the name of the header.

func (*AddressParameters) GetAddress

func (this *AddressParameters) GetAddress() address.Address

* get the Address field

  • @return the imbedded Address

func (*AddressParameters) SetAddress

func (this *AddressParameters) SetAddress(addr address.Address)

* set the Address field

  • @param address Address to set

type AddressParametersHeader

type AddressParametersHeader interface {
	ParametersHeader
	AddressHeader
}

type AlertInfo

type AlertInfo struct {
	Parameters
	// contains filtered or unexported fields
}

* * AlertInfo SIP Header.

func NewAlertInfo

func NewAlertInfo() *AlertInfo

* Constructor

func (*AlertInfo) EncodeBody

func (this *AlertInfo) EncodeBody() string

*

  • Return value encoding in canonical form.
  • @return The value of the header in canonical encoding.

func (*AlertInfo) GetAlertInfo

func (this *AlertInfo) GetAlertInfo() address.URI

*

  • Returns the AlertInfo value of this AlertInfoHeader. * * *
  • @return the URI representing the AlertInfo. *

func (*AlertInfo) SetAlertInfo

func (this *AlertInfo) SetAlertInfo(uri address.URI)

*

  • Set the uri member
  • @param u URI to set

func (*AlertInfo) String

func (this *AlertInfo) String() string

type AlertInfoHeader

type AlertInfoHeader interface {
	ParametersHeader

	/**
	 * Sets the AlertInfo of the AlertInfoHeader to the <var>alertInfo</var>
	 * parameter value.
	 *
	 * @param alertInfo the new Alert Info URI of this AlertInfoHeader.
	 */
	SetAlertInfo(alertInfo address.URI)

	/**
	 * Returns the AlertInfo value of this AlertInfoHeader.
	 *
	 * @return the URI representing the AlertInfo.
	 */
	GetAlertInfo() address.URI
}

type AlertInfoList

type AlertInfoList struct {
	SIPHeaderList
}

* * AlertInfo Header - there can be several AlertInfo headers.

func NewAlertInfoList

func NewAlertInfoList() *AlertInfoList

* default constructor

type Allow

type Allow struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * Allow Header.

func NewAllow

func NewAllow() *Allow

* default constructor

func NewAllowFromString

func NewAllowFromString(m string) *Allow

* constructor

  • @param m String to set

func (*Allow) EncodeBody

func (this *Allow) EncodeBody() string

* Return body encoded in canonical form.

  • @return body encoded as a string.

func (*Allow) GetMethod

func (this *Allow) GetMethod() string

* get the method field

  • @return String

func (*Allow) SetMethod

func (this *Allow) SetMethod(method string) (ParseException error)

*

  • Set the method member
  • @param method method to set.

func (*Allow) String

func (this *Allow) String() string

type AllowEvents

type AllowEvents struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * AllowEvents Header.

func NewAllowEvents

func NewAllowEvents() *AllowEvents

* default constructor

func NewAllowEventsFromString

func NewAllowEventsFromString(m string) *AllowEvents

* constructor

  • @param m String to set

func (*AllowEvents) EncodeBody

func (this *AllowEvents) EncodeBody() string

* Return body encoded in canonical form.

  • @return body encoded as a string.

func (*AllowEvents) GetEventType

func (this *AllowEvents) GetEventType() string

*

  • Gets the eventType of the AllowEventsHeader. *
  • @return the String object identifing the eventTypes of AllowEventsHeader.

func (*AllowEvents) SetEventType

func (this *AllowEvents) SetEventType(eventType string) (ParseException error)

*

  • Sets the eventType defined in this AllowEventsHeader. *
  • @param eventType - the String defining the method supported
  • in this AllowEventsHeader
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the Strings defining the eventType supported

func (*AllowEvents) String

func (this *AllowEvents) String() string

type AllowEventsHeader

type AllowEventsHeader interface {
	Header

	/**
	 * Sets the eventType defined in this AllowEventsHeader.
	 *
	 * @param eventType - the String defining the method supported
	 * in this AllowEventsHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Strings defining the eventType supported
	 */
	SetEventType(eventType string) (ParseException error)

	/**
	 * Gets the eventType of the AllowEventsHeader.
	 *
	 * @return the String object identifing the eventTypes of AllowEventsHeader.
	 */
	GetEventType() string
}

type AllowEventsList

type AllowEventsList struct {
	SIPHeaderList
}

* * List of AllowEvents headers. * The sip message can have multiple AllowEvents headers which are strung * together in a list.

func NewAllowEventsList

func NewAllowEventsList() *AllowEventsList

* default constructor

func (*AllowEventsList) GetMethods

func (this *AllowEventsList) GetMethods() *list.List

*

  • Gets an Iterator of all the methods of the AllowEventsHeader. Returns an empty *
  • Iterator if no methods are defined in this AllowEvents Header. * * *
  • @return Iterator of String objects each identifing the methods of *
  • AllowEventsHeader. *

func (*AllowEventsList) SetMethods

func (this *AllowEventsList) SetMethods(methods *list.List) (ParseException error)

type AllowHeader

type AllowHeader interface {
	Header

	/**
	 * Sets the method supported by this AllowHeader.
	 *
	 * @param method - the String defining the method supported
	 * in this AllowHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the method supported.
	 */
	SetMethod(method string) (ParseException error)

	/**
	 * Gets the method of the AllowHeader. Returns null if no method is
	 * defined in this Allow Header.
	 *
	 * @return the string identifing the method of AllowHeader.
	 */
	GetMethod() string
}

*

  • The Allow header field lists the set of methods supported by the User Agent
  • generating the message. All methods, including ACK and CANCEL, understood
  • by the User Agent MUST be included in the list of methods in the Allow header
  • field, when present.
  • The absence of an Allow header field MUST NOT be interpreted to mean that
  • the User Agent sending the message supports no methods. Rather, it implies
  • that the User Agent is not providing any information on what methods it
  • supports. Supplying an Allow header field in responses to methods other than
  • OPTIONS reduces the number of messages needed.
  • <p>
  • For Example:<br>
  • <code>Allow: INVITE, ACK, OPTIONS, CANCEL, BYE</code>

type AllowList

type AllowList struct {
	SIPHeaderList
}

* * List of ALLOW headers. The sip message can have multiple Allow headers *

func NewAllowList

func NewAllowList() *AllowList

* default constructor

func (*AllowList) GetMethods

func (this *AllowList) GetMethods() *list.List

func (*AllowList) SetMethods

func (this *AllowList) SetMethods(methods *list.List) (ParseException error)

type Authentication

type Authentication struct {
	Parameters
	// contains filtered or unexported fields
}

func NewAuthentication

func NewAuthentication(name string) *Authentication

func (*Authentication) EncodeBody

func (this *Authentication) EncodeBody() string

*

  • Encode in canonical form.
  • @return canonical string.

func (*Authentication) GetAlgorithm

func (this *Authentication) GetAlgorithm() string

*

  • Returns the Algorithm value of this WWWAuthenicateHeader. *
  • @return the String representing the Algorithm information, null if the
  • value is not Set. *

func (*Authentication) GetCNonce

func (this *Authentication) GetCNonce() string
  • Get the CNonce. * *@return the cnonce value.

func (*Authentication) GetDomain

func (this *Authentication) GetDomain() string

*

  • Returns the Domain value of this WWWAuthenicateHeader. *
  • @return the String representing the Domain information, null if value is
  • not Set. *

func (*Authentication) GetNonce

func (this *Authentication) GetNonce() string

*

  • Returns the Nonce value of this WWWAuthenicateHeader. *
  • @return the String representing the nonce information, null if value is
  • not Set. *

func (*Authentication) GetNonceCount

func (this *Authentication) GetNonceCount() int

func (*Authentication) GetOpaque

func (this *Authentication) GetOpaque() string

*

  • Returns the Opaque value of this WWWAuthenicateHeader. *
  • @return the String representing the Opaque information, null if the
  • value is not Set. *

func (*Authentication) GetQop

func (this *Authentication) GetQop() string

*

  • Returns the Qop value of this WWWAuthenicateHeader. *
  • @return the string representing the Qop information, null if the
  • value is not Set. *

func (*Authentication) GetRealm

func (this *Authentication) GetRealm() string

*

  • Returns the Realm value of this WWWAuthenicateHeader. This convenience
  • method returns only the realm of the complete Challenge. *
  • @return the String representing the Realm information, null if value is
  • not Set. *

func (*Authentication) GetResponse

func (this *Authentication) GetResponse() string

*

  • Get the RESPONSE value (or null if it does not exist). *
  • @return String response parameter value.

func (*Authentication) GetScheme

func (this *Authentication) GetScheme() string

*

  • Returns the scheme of the challenge information for this
  • AuthenticationHeaderHeader. *
  • @return the string value of the challenge information. *

func (*Authentication) GetURI

func (this *Authentication) GetURI() address.URI

*

  • Returns the URI value of this WWWAuthenicateHeader,
  • for example DigestURI. *
  • @return the URI representing the URI information, null if value is
  • not Set. *

func (*Authentication) GetUsername

func (this *Authentication) GetUsername() string

*

  • Returns the Username value of this AuthenticationHeader.
  • This convenience method returns only the username of the
  • complete Response. *
  • @return the String representing the Username information,
  • null if value is not Set. *
  • @since JAIN SIP v1.1 *

func (*Authentication) IsStale

func (this *Authentication) IsStale() bool

*

  • Returns the boolean value of the state paramater of this
  • WWWAuthenicateHeader. *
  • @return the boolean representing if the challenge is stale. *

func (*Authentication) SetAlgorithm

func (this *Authentication) SetAlgorithm(algorithm string) (ParseException error)

*

  • Sets the Algorithm of the WWWAuthenicateHeader to the new
  • <var>algorithm</var> parameter value. *
  • @param algorithm - the new algorithm String of this WWWAuthenicateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the algorithm value. *

func (*Authentication) SetCNonce

func (this *Authentication) SetCNonce(cnonce string) (ParseException error)
  • Set the CNonce. *
  • @param cnonce -- a nonce string.

func (*Authentication) SetChallenge

func (this *Authentication) SetChallenge(challenge Challenge)
  • This is only used for the parser interface. *@param challenge -- the challenge from which the parameters are
  • extracted.

func (*Authentication) SetDomain

func (this *Authentication) SetDomain(domain string) (ParseException error)

*

  • Sets the Domain of the WWWAuthenicateHeader to the <var>domain</var>
  • parameter value. *
  • @param domain - the new Domain string of this WWWAuthenicateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the domain. *

func (*Authentication) SetNonce

func (this *Authentication) SetNonce(nonce string) (ParseException error)

*

  • Sets the Nonce of the WWWAuthenicateHeader to the <var>nonce</var>
  • parameter value. *
  • @param nonce - the new nonce String of this WWWAuthenicateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the nonce value. *

func (*Authentication) SetNonceCount

func (this *Authentication) SetNonceCount(nonceCount int) (ParseException error)

func (*Authentication) SetOpaque

func (this *Authentication) SetOpaque(opaque string) (ParseException error)

*

  • Sets the Opaque value of the WWWAuthenicateHeader to the new
  • <var>opaque</var> parameter value. *
  • @param opaque - the new Opaque string of this WWWAuthenicateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the opaque value. *

func (*Authentication) SetParameter

func (this *Authentication) SetParameter(name, value string) error

* Set the specified parameter.

  • Bug reported by Dominic Sparks. *
  • @param name -- name of the parameter
  • @param value -- value of the parameter.

func (*Authentication) SetQop

func (this *Authentication) SetQop(qop string) (ParseException error)

*

  • Sets the Qop value of the WWWAuthenicateHeader to the new
  • <var>qop</var> parameter value. *
  • @param qop - the new Qop string of this WWWAuthenicateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the Qop value. *

func (*Authentication) SetRealm

func (this *Authentication) SetRealm(realm string) (ParseException error)

*

  • Sets the Realm of the WWWAuthenicateHeader to the <var>realm</var>
  • parameter value. Realm strings MUST be globally unique. It is
  • RECOMMENDED that a realm string contain a hostname or domain name.
  • Realm strings SHOULD present a human-readable identifier that can be
  • rendered to a user. *
  • @param realm the new Realm String of this WWWAuthenicateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the realm. *

func (*Authentication) SetResponse

func (this *Authentication) SetResponse(response string) (ParseException error)
  • Set the Response. * *@param response to Set.

func (*Authentication) SetScheme

func (this *Authentication) SetScheme(scheme string)

*

  • Sets the scheme of the challenge information for this
  • AuthenticationHeaderHeader. For example, Digest. *
  • @param scheme - the new string value that identifies the challenge
  • information scheme. *

func (*Authentication) SetStale

func (this *Authentication) SetStale(stale bool)

*

  • Sets the value of the stale parameter of the WWWAuthenicateHeader to the
  • <var>stale</var> parameter value. *
  • @param stale - the new boolean value of the stale parameter. *

func (*Authentication) SetURI

func (this *Authentication) SetURI(uri address.URI) error

*

  • Sets the URI of the WWWAuthenicateHeader to the <var>uri</var>
  • parameter value. *
  • @param uri - the new URI of this WWWAuthenicateHeader. *

func (*Authentication) SetUsername

func (this *Authentication) SetUsername(username string) (ParseException error)

*

  • Sets the Username of the AuthenticationHeader to
  • the <var>username</var> parameter value. *
  • @param username the new Username String of this AuthenticationHeader. *
  • @throws ParseException which signals that an error has been reached *
  • unexpectedly while parsing the username. *
  • @since JAIN SIP v1.1 *

func (*Authentication) String

func (this *Authentication) String() string

type AuthenticationHeader

type AuthenticationHeader interface {
	ParametersHeader

	/**
	 * Sets the scheme of the Response information for this AuthorizationHeader.
	 * For example, Digest.
	 *
	 * @param scheme - the new string value that identifies the response
	 * information scheme.
	 */
	SetScheme(scheme string)

	/**
	 * Returns the scheme of the Response information for this AuthorizationHeader.
	 *
	 * @return the string value of the response information.
	 */
	GetScheme() string

	/**
	 * Sets the Realm of the AuthorizationHeader to the <var>realm</var>
	 * parameter value. Realm strings MUST be globally unique.  It is
	 * RECOMMENDED that a realm string contain a hostname or domain name.
	 * Realm strings SHOULD present a human-readable identifier that can be
	 * rendered to a user.
	 *
	 * @param realm the new Realm String of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the realm.
	 */
	SetRealm(realm string) (ParseException error)

	/**
	 * Returns the Realm value of this AuthorizationHeader. This convenience
	 * method returns only the realm of the complete Response.
	 *
	 * @return the String representing the Realm information, null if value is
	 * not Set.
	 */
	GetRealm() string

	/**
	 * Sets the Username of the AuthorizationHeader to the <var>username</var>
	 * parameter value.
	 *
	 * @param username the new Username String of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the username.
	 */
	SetUsername(username string) (ParseException error)

	/**
	 * Returns the Username value of this AuthorizationHeader. This convenience
	 * method returns only the username of the complete Response.
	 *
	 * @return the String representing the Username information, null if value is
	 * not Set.
	 */
	GetUsername() string

	/**
	 * Sets the Nonce of the AuthorizationHeader to the <var>nonce</var>
	 * parameter value.
	 *
	 * @param nonce - the new nonce String of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the nonce value.
	 */
	SetNonce(nonce string) (ParseException error)

	/**
	 * Returns the Nonce value of this AuthorizationHeader.
	 *
	 * @return the String representing the nonce information, null if value is
	 * not Set.
	 */
	GetNonce() string

	/**
	 * Sets the URI of the AuthorizationHeader to the <var>uri</var>
	 * parameter value.
	 *
	 * @param uri - the new URI of this AuthorizationHeader.
	 */
	SetURI(uri address.URI) error

	/**
	 * Returns the URI value of this AuthorizationHeader, for example DigestURI.
	 *
	 * @return the URI representing the URI information, null if value is
	 * not Set.
	 */
	GetURI() address.URI

	/**
	 * Sets the Response of the AuthorizationHeader to the new <var>response</var>
	 * parameter value.
	 *
	 * @param response - the new response String of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Response.
	 *
	 */
	SetResponse(response string) (ParseException error)

	/**
	 * Returns the Response value of this AuthorizationHeader.
	 *
	 * @return the String representing the Response information.
	 *
	 */
	GetResponse() string

	/**
	 * Sets the Algorithm of the AuthorizationHeader to the new
	 * <var>algorithm</var> parameter value.
	 *
	 * @param algorithm - the new algorithm String of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the algorithm value.
	 *
	 */
	SetAlgorithm(algorithm string) (ParseException error)

	/**
	 * Returns the Algorithm value of this AuthorizationHeader.
	 *
	 * @return the String representing the Algorithm information, null if the
	 * value is not Set.
	 *
	 */
	GetAlgorithm() string

	/**
	 * Sets the CNonce of the AuthorizationHeader to the <var>cNonce</var>
	 * parameter value.
	 *
	 * @param cNonce - the new cNonce String of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the cNonce value.
	 *
	 */
	SetCNonce(cNonce string) (ParseException error)

	/**
	 * Returns the CNonce value of this AuthorizationHeader.
	 *
	 * @return the String representing the cNonce information, null if value is
	 * not Set.
	 *
	 */
	GetCNonce() string

	/**
	 * Sets the Opaque value of the AuthorizationHeader to the new
	 * <var>opaque</var> parameter value.
	 *
	 * @param opaque - the new Opaque string of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the opaque value.
	 *
	 */
	SetOpaque(opaque string) (ParseException error)

	/**
	 * Returns the Opaque value of this AuthorizationHeader.
	 *
	 * @return the String representing the Opaque information, null if the
	 * value is not Set.
	 *
	 */
	GetOpaque() string

	/**
	 * Sets the MessageQop value of the AuthorizationHeader to the new
	 * <var>qop</var> parameter value.
	 *
	 * @param qop - the new Qop string of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Qop value.
	 *
	 */
	SetQop(qop string) (ParseException error)

	/**
	 * Returns the Qop value of this AuthorizationHeader.
	 *
	 * @return the string representing the Qop information, null if the
	 * value is not Set.
	 *
	 */
	GetQop() string

	/**
	 * Sets the Nonce Count of the AuthorizationHeader to the <var>nonceCount</var>
	 * parameter value.
	 *
	 * @param nonceCount - the new nonceCount integer of this AuthorizationHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the nonceCount value.
	 *
	 */
	SetNonceCount(nonceCount int) (ParseException error)

	/**
	 * Returns the Nonce Count value of this AuthorizationHeader.
	 *
	 * @return the integer representing the nonceCount information, -1 if value is
	 * not Set.
	 *
	 */
	GetNonceCount() int
}

type AuthenticationInfo

type AuthenticationInfo struct {
	Parameters
}
  • Authentication info SIP Header. *

func NewAuthenticationInfo

func NewAuthenticationInfo() *AuthenticationInfo

* Default contstructor.

func (*AuthenticationInfo) Add

func (this *AuthenticationInfo) Add(nv *core.NameValue)

func (*AuthenticationInfo) EncodeBody

func (this *AuthenticationInfo) EncodeBody() string

func (*AuthenticationInfo) GetAuthInfo

func (this *AuthenticationInfo) GetAuthInfo(name string) *core.NameValue
  • Get the name value pair for a given authentication info parameter. * *@param name is the name for which we want to retrieve the name value
  • list.

func (*AuthenticationInfo) GetAuthenticationInfo

func (this *AuthenticationInfo) GetAuthenticationInfo() string

*

  • Returns the AuthenticationInfo value of this AuthenticationInfoHeader. * * *
  • @return the String representing the AuthenticationInfo *

func (*AuthenticationInfo) GetCNonce

func (this *AuthenticationInfo) GetCNonce() string
  • Returns the CNonce value of this AuthenticationInfoHeader. *
  • @return the String representing the cNonce information, null if value is
  • not set. *

func (*AuthenticationInfo) GetNextNonce

func (this *AuthenticationInfo) GetNextNonce() string
  • Returns the nextNonce value of this AuthenticationInfoHeader. *
  • @return the String representing the nextNonce
  • information, null if value is not set. *

func (*AuthenticationInfo) GetNonceCount

func (this *AuthenticationInfo) GetNonceCount() int
  • Returns the Nonce Count value of this AuthenticationInfoHeader. *
  • @return the integer representing the nonceCount information, -1 if value is
  • not set. *

func (*AuthenticationInfo) GetQop

func (this *AuthenticationInfo) GetQop() string
  • Returns the messageQop value of this AuthenticationInfoHeader. *
  • @return the string representing the messageQop information, null if the
  • value is not set. *

func (*AuthenticationInfo) GetResponse

func (this *AuthenticationInfo) GetResponse() string
  • Returns the Response value of this AuthenticationInfoHeader. *
  • @return the String representing the Response information. *

func (*AuthenticationInfo) SetCNonce

func (this *AuthenticationInfo) SetCNonce(cNonce string) (ParseException error)

* Sets the CNonce of the AuthenticationInfoHeader to the <var>cNonce</var>

  • parameter value. *
  • @param cNonce - the new cNonce String of this AuthenticationInfoHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the cNonce value. *

func (*AuthenticationInfo) SetNextNonce

func (this *AuthenticationInfo) SetNextNonce(nextNonce string) (ParseException error)

* Sets the NextNonce of the AuthenticationInfoHeader to the <var>nextNonce</var>

  • parameter value. *
  • @param nextNonce - the new nextNonce String of this AuthenticationInfoHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the nextNonce value. *

func (*AuthenticationInfo) SetNonceCount

func (this *AuthenticationInfo) SetNonceCount(nonceCount int) (ParseException error)

* Sets the Nonce Count of the AuthenticationInfoHeader to the <var>nonceCount</var>

  • parameter value. *
  • @param nonceCount - the new nonceCount integer of this AuthenticationInfoHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the nonceCount value. *

func (*AuthenticationInfo) SetParameter

func (this *AuthenticationInfo) SetParameter(name, value string) error

func (*AuthenticationInfo) SetQop

func (this *AuthenticationInfo) SetQop(qop string) (ParseException error)

* Sets the Qop value of the AuthenticationInfoHeader to the new

  • <var>qop</var> parameter value. *
  • @param qop - the new Qop string of this AuthenticationInfoHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the Qop value. *

func (*AuthenticationInfo) SetResponse

func (this *AuthenticationInfo) SetResponse(response string) (ParseException error)

* Sets the Response of the

  • AuthenticationInfoHeader to the new <var>response</var>
  • parameter value. *
  • @param response - the new response String of this
  • AuthenticationInfoHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the Response. *

func (*AuthenticationInfo) String

func (this *AuthenticationInfo) String() string

* Value of header encoded in canonical form.

type AuthenticationInfoHeader

type AuthenticationInfoHeader interface {
	ParametersHeader

	/**
	 * Sets the NextNonce of the AuthenticationInfoHeader to the <var>nextNonce</var>
	 * parameter value.
	 *
	 * @param nextNonce - the new nextNonce String of this AuthenticationInfoHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the nextNonce value.
	 *
	 */
	SetNextNonce(nextNonce string) (ParseException error)

	/**
	 * Returns the nextNonce value of this AuthenticationInfoHeader.
	 *
	 * @return the String representing the nextNonce information, null if value is
	 * not set.
	 *
	 */
	GetNextNonce() string

	/**
	 * Sets the Qop value of the AuthenticationInfoHeader to the new
	 * <var>qop</var> parameter value.
	 *
	 * @param qop - the new Qop string of this AuthenticationInfoHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Qop value.
	 *
	 */
	SetQop(qop string) (ParseException error)

	/**
	 * Returns the messageQop value of this AuthenticationInfoHeader.
	 *
	 * @return the string representing the messageQop information, null if the
	 * value is not set.
	 *
	 */
	GetQop() string

	/**
	 * Sets the CNonce of the AuthenticationInfoHeader to the <var>cNonce</var>
	 * parameter value.
	 *
	 * @param cNonce - the new cNonce String of this AuthenticationInfoHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the cNonce value.
	 *
	 */
	SetCNonce(cNonce string) (ParseException error)

	/**
	 * Returns the CNonce value of this AuthenticationInfoHeader.
	 *
	 * @return the String representing the cNonce information, null if value is
	 * not set.
	 *
	 */
	GetCNonce() string

	/**
	 * Sets the Nonce Count of the AuthenticationInfoHeader to the <var>nonceCount</var>
	 * parameter value.
	 *
	 * @param nonceCount - the new nonceCount integer of this AuthenticationInfoHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the nonceCount value.
	 *
	 */
	SetNonceCount(nonceCount int) (ParseException error)

	/**
	 * Returns the Nonce Count value of this AuthenticationInfoHeader.
	 *
	 * @return the integer representing the nonceCount information, -1 if value is
	 * not set.
	 *
	 */
	GetNonceCount() int

	/**
	 * Sets the Response of the AuthenticationInfoHeader to the new <var>response</var>
	 * parameter value.
	 *
	 * @param response - the new response String of this AuthenticationInfoHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Response.
	 *
	 */
	SetResponse(response string) (ParseException error)

	/**
	 * Returns the Response value of this AuthenticationInfoHeader.
	 *
	 * @return the String representing the Response information.
	 *
	 */
	GetResponse() string
}

*

  • The Authentication-Info header field provides for mutual
  • authentication with HTTP Digest. A UAS MAY include this header field
  • in a 2xx response to a request that was successfully authenticated
  • using digest based on the Authorization header field.
  • <p>
  • For Example:<br>
  • <code>Authentication-Info: nextnonce="47364c23432d2e131a5fb210812c"</code>

type Authorization

type Authorization struct {
	Authentication
}

* * Authorization SIP header. * * @see ProxyAuthorization

func NewAuthorization

func NewAuthorization() *Authorization

* Default constructor.

type AuthorizationHeader

type AuthorizationHeader interface {
	AuthenticationHeader
}

type CSeq

type CSeq struct {
	SIPHeader
	// contains filtered or unexported fields
}

*

  • CSeq SIP Header.

func NewCSeq

func NewCSeq(seqno int, method string) *CSeq

*

  • Constructor given the sequence number and method. * *@param seqno is the sequence number to assign. *@param method is the method string.

func (*CSeq) EncodeBody

func (this *CSeq) EncodeBody() string

*

  • Return canonical header content. (encoded header except headerName:) *
  • @return encoded string.

func (*CSeq) GetMethod

func (this *CSeq) GetMethod() string

*

  • Get the method.
  • @return String the method.

func (*CSeq) GetSequenceNumber

func (this *CSeq) GetSequenceNumber() int
  • Gets the sequence number of this CSeqHeader. *
  • @return sequence number of the CSeqHeader

func (*CSeq) SetMethod

func (this *CSeq) SetMethod(meth string) (ParseException error)

*

  • Set the method member *
  • @param meth -- String to set

func (*CSeq) SetSequenceNumber

func (this *CSeq) SetSequenceNumber(sequenceNumber int) (InvalidArgumentException error)

* Sets the sequence number of this CSeqHeader. The sequence number

  • MUST be expressible as a 32-bit unsigned integer and MUST be less than
  • 2**31. *
  • @param sequenceNumber - the sequence number to set.
  • @throws InvalidArgumentException -- if the seq number is <= 0

func (*CSeq) String

func (this *CSeq) String() string

*

  • Return canonical encoded header.
  • @return String with canonical encoded header.

type CSeqHeader

type CSeqHeader interface {
	Header

	/**
	 * Sets the method of CSeqHeader
	 *
	 * @param method - the method of the Request of this CSeqHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the method value.
	 */
	SetMethod(method string) (ParseException error)

	/**
	 * Gets the method of CSeqHeader
	 *
	 * @return method of CSeqHeader
	 */
	GetMethod() string

	/**
	 * Sets the sequence number value of the CSeqHeader. The sequence number
	 * MUST be expressible as a 32-bit unsigned integer and MUST be less than
	 * 2**31.
	 *
	 * @param sequenceNumber - the new sequence number of this CSeqHeader
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 *
	 */
	SetSequenceNumber(sequenceNumber int) (InvalidArgumentException error)

	/**
	 * Gets the sequence number of this CSeqHeader.
	 *
	 * @return sequence number of the CSeqHeader
	 *
	 */
	GetSequenceNumber() int
}

type CallID

type CallID struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * Call ID Header.

func NewCallID

func NewCallID(callId string) (this *CallID, IllegalArgumentException error)

* Constructor given the call Identifier. *@param callId string call identifier (should be localid@host) *@throws IllegalArgumentException if call identifier is bad.

func (*CallID) EncodeBody

func (this *CallID) EncodeBody() string

* Encode the body part of this header (i.e. leave out the hdrName). *@return String encoded body part of the header.

func (*CallID) GetCallId

func (this *CallID) GetCallId() string

* get the CallId field. This does the same thing as

  • encodeBody
  • @return String the encoded body part of the

func (*CallID) GetCallIdentifer

func (this *CallID) GetCallIdentifer() *CallIdentifier

*

  • get the call Identifer member.
  • @return CallIdentifier

func (*CallID) SetCallId

func (this *CallID) SetCallId(cid string) (ParseException error)

* set the CallId field

  • @param cid String to set. This is the body part of the Call-Id
  • header. It must have the form localId@host or localId.
  • @throws IllegalArgumentException if cid is null, not a token, or is
  • not a token@token.

func (*CallID) SetCallIdentifier

func (this *CallID) SetCallIdentifier(cid *CallIdentifier)

*

  • Set the callIdentifier member.
  • @param cid CallIdentifier to set (localId@host).

func (*CallID) String

func (this *CallID) String() string

type CallIdHeader

type CallIdHeader interface {
	Header

	SetCallId(callId string) (ParseException error)

	GetCallId() string
}

type CallIdentifier

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

* * The call identifer that goes into a callID header and a in-reply-to header. * @see CallID * @see InReplyTo

func NewCallIdentifier

func NewCallIdentifier(cid string) (*CallIdentifier, error)

* constructor

  • @param cid String to set
  • @throws IllegalArgumentException if cid is null or is not a token,
  • or token@token

func (*CallIdentifier) GetHost

func (this *CallIdentifier) GetHost() string

* get the host field

  • @return host member String

func (*CallIdentifier) GetLocalId

func (this *CallIdentifier) GetLocalId() string

* get the LocalId field

  • @return String

func (*CallIdentifier) SetCallID

func (this *CallIdentifier) SetCallID(cid string) (IllegalArgumentException error)

* set the callId field

  • @param cid Strimg to set
  • @throws IllegalArgumentException if cid is null or is not a token or
  • token@token

func (*CallIdentifier) SetHost

func (this *CallIdentifier) SetHost(host string)

*

  • Set the host member
  • @param host String to set

func (*CallIdentifier) SetLocalId

func (this *CallIdentifier) SetLocalId(localId string)

*

  • Set the localId member
  • @param localId String to set

func (*CallIdentifier) String

func (this *CallIdentifier) String() string

*

  • Get the encoded version of this id.
  • @return String to set

type CallInfo

type CallInfo struct {
	Parameters
	// contains filtered or unexported fields
}

func NewCallInfo

func NewCallInfo() *CallInfo

* Default constructor

func (*CallInfo) EncodeBody

func (this *CallInfo) EncodeBody() string

*

  • Return canonical representation.
  • @return String

func (*CallInfo) GetInfo

func (this *CallInfo) GetInfo() address.URI

* get the URI field

  • @return URI

func (*CallInfo) GetPurpose

func (this *CallInfo) GetPurpose() string

* get the purpose field

  • @return String

func (*CallInfo) SetInfo

func (this *CallInfo) SetInfo(info address.URI)

* set the URI field

  • @param info is the URI to set.

func (*CallInfo) SetPurpose

func (this *CallInfo) SetPurpose(purpose string) error

* set the purpose field

  • @param purpose is the purpose field.

func (*CallInfo) String

func (this *CallInfo) String() string

type CallInfoHeader

type CallInfoHeader interface {
	ParametersHeader

	/**
	 * Sets the Information parameter of this CallInfoHeader. The Information
	 * describes the caller or callee.
	 *
	 * @param icon - the new URI value of the location of the information.
	 */
	SetInfo(info address.URI)

	/**
	 * Gets the URI that represents the location of the info of the caller
	 * or callee.
	 *
	 * @return the location of the info of this CallInfoHeader, returns null
	 * if no info is present.
	 */
	GetInfo() address.URI

	/**
	  * Sets the purpose parameter of the info of this CallInfoHeader.
	  *
	  * @param purpose - the new string value of the purpose of this info.
	   * @throws ParseException which signals that an error has been reached
	   * unexpectedly while parsing the purpose value.
	*/
	SetPurpose(purpose string) (ParseException error)

	/**
	 * Gets the purpose of the information supplied in this CallInfoHeader.
	 *
	 * @return the sting value of the purpose of the info, returns null
	 * if no purpose is present.
	 */
	GetPurpose() string
}

type CallInfoList

type CallInfoList struct {
	SIPHeaderList
}

* * A list of CallInfo headers (there can be multiple in a message).

func NewCallInfoList

func NewCallInfoList() *CallInfoList

* Default constructor

type Challenge

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

* * Challenge part of the Auth header. This is only used by the parser interface

func NewChallenge

func NewChallenge() *Challenge

* Default constructor

func (*Challenge) GetAlgorithm

func (this *Challenge) GetAlgorithm() string

* Get the Algorithm value.

  • @return String

func (*Challenge) GetAuthParams

func (this *Challenge) GetAuthParams() *core.NameValueList

* Get AuthParms list.

  • @return NameValueList

func (*Challenge) GetDomain

func (this *Challenge) GetDomain() string

* Get the domain

  • @return String

func (*Challenge) GetOpaque

func (this *Challenge) GetOpaque() string

* Get the Opaque field

  • @return String

func (*Challenge) GetParameter

func (this *Challenge) GetParameter(name string) string

* Get the specified parameter

  • @param name String to Set
  • @return String to Set

func (*Challenge) GetQOP

func (this *Challenge) GetQOP() string

* Get QOP value

  • @return String

func (*Challenge) GetRealm

func (this *Challenge) GetRealm() string

* Get the realm value.

  • @return String.

func (*Challenge) GetResponse

func (this *Challenge) GetResponse() string

* Get the Response value.

  • @return String

func (*Challenge) GetScheme

func (this *Challenge) GetScheme() string

* Get the scheme field

  • @return String

func (*Challenge) GetSignature

func (this *Challenge) GetSignature() string

* Get the Signature value.

  • @return String

func (*Challenge) GetSignedBy

func (this *Challenge) GetSignedBy() string

* Get the signedBy value.

  • @return String

func (*Challenge) GetStale

func (this *Challenge) GetStale() string

* Get the State value.

  • @return String

func (*Challenge) GetURI

func (this *Challenge) GetURI() string

* Get the URI field

  • @return String

func (*Challenge) HasParameter

func (this *Challenge) HasParameter(name string) bool

* boolean function

  • @param name String to Set
  • @return true if this header has the specified parameter, false otherwise.

func (*Challenge) HasParameters

func (this *Challenge) HasParameters() bool

* Boolean function

  • @return true if this header has some parameters.

func (*Challenge) RemoveParameter

func (this *Challenge) RemoveParameter(name string) bool

* delete the specified parameter

  • @param name String
  • @return true if the specified parameter has been removed, false
  • otherwise.

func (*Challenge) RemoveParameters

func (this *Challenge) RemoveParameters()

* remove all parameters

func (*Challenge) SetAuthParams

func (this *Challenge) SetAuthParams(a *core.NameValueList)

*

  • Set the authParams member
  • @param a NameValueList to Set

func (*Challenge) SetParameter

func (this *Challenge) SetParameter(nv *core.NameValue)

* Set the specified parameter

  • @param nv NameValue to Set

func (*Challenge) SetScheme

func (this *Challenge) SetScheme(s string)

*

  • Set the scheme member
  • @param s String to Set

func (*Challenge) String

func (this *Challenge) String() string

*

  • Encode the challenge in canonical form.
  • @return String

type Contact

type Contact struct {
	AddressParameters
	// contains filtered or unexported fields
}

* * Contact Item.

func NewContact

func NewContact() *Contact

* Default constructor.

func (*Contact) EncodeBody

func (this *Contact) EncodeBody() string

*

  • Encode body of the header into a cannonical String.
  • @return string encoding of the header value.

func (*Contact) GetAddress

func (this *Contact) GetAddress() address.Address

* get the address field.

  • @return Address

func (*Contact) GetContactList

func (this *Contact) GetContactList() *ContactList

* get the Contact list.

  • @return ContactList

func (*Contact) GetContactParms

func (this *Contact) GetContactParms() *core.NameValueList

* get the parameters List

  • @return NameValueList

func (*Contact) GetExpires

func (this *Contact) GetExpires() int

* get Expires parameter.

  • @return the Expires parameter.

func (*Contact) GetQValue

func (this *Contact) GetQValue() float32

* get the QValue field. Return -1 if the parameter has not been

  • set.
  • @return float

func (*Contact) GetWildCardFlag

func (this *Contact) GetWildCardFlag() bool

* get the WildCardFlag field

  • @return boolean

func (*Contact) HasQValue

func (this *Contact) HasQValue() bool

*

  • Return true if the q value has been set.
  • @return boolean

func (*Contact) RemoveQValue

func (this *Contact) RemoveQValue()

*

  • Remove the q value.

func (*Contact) SetAddress

func (this *Contact) SetAddress(addr address.Address)

*

  • Set the address member *
  • @param address Address to set

func (*Contact) SetContactList

func (this *Contact) SetContactList(cl *ContactList)

* set the Contact List

  • @param cl ContactList to set

func (*Contact) SetExpires

func (this *Contact) SetExpires(expiryDeltaSeconds int) (InvalidArgumentException error)

func (*Contact) SetQValue

func (this *Contact) SetQValue(q float32) (InvalidArgumentException error)

*

  • Sets q-value for media-range. Q-values allow the *
  • user to indicate the relative degree of preference for that media-range, *
  • using the qvalue scale from 0 to 1. If no q-value is present, the *
  • media-range should be treated as having a q-value of 1. * * *
  • @param qValue - the new float value of the q-value *
  • @throws InvalidArgumentException if the q parameter value is not between <code>0 and 1</code>. *

func (*Contact) SetWildCardFlag

func (this *Contact) SetWildCardFlag(w bool)

*

  • Set the wildCardFlag member
  • @param w boolean to set

func (*Contact) String

func (this *Contact) String() string

type ContactHeader

type ContactHeader interface {
	AddressHeader
	ParametersHeader
	QValue

	SetExpires(expires int) (InvalidArgumentException error)

	GetExpires() int
}

type ContactList

type ContactList struct {
	SIPHeaderList
}

* * List of contact headers.ContactLists are also maintained in a hashtable for quick lookup.

func NewContactList

func NewContactList() *ContactList

* * Constructor.

func (*ContactList) AddContact

func (this *ContactList) AddContact(contact ContactHeader) (IllegalArgumentException error)

*

  • add a new contact header. Store it in the hashtable also
  • @param contact -- contact to add to this list.
  • @throws IllegalArgumentException if Duplicate Contact for same addr

func (*ContactList) Clone

func (this *ContactList) Clone() interface{}

*

  • make a clone of this contact list.
  • @return Object cloned list.

func (*ContactList) GetContacts

func (this *ContactList) GetContacts() []ContactHeader

*

  • Get an array of contact addresses. *
  • @return array of contacts. *

type ContentDisposition

type ContentDisposition struct {
	Parameters
	// contains filtered or unexported fields
}

* * Content Dispositon SIP Header.

func NewContentDisposition

func NewContentDisposition() *ContentDisposition

* Default constructor.

func (*ContentDisposition) EncodeBody

func (this *ContentDisposition) EncodeBody() string

*

  • Encode value of header into canonical string.
  • @return encoded value of header. *

func (*ContentDisposition) GetContentDisposition

func (this *ContentDisposition) GetContentDisposition() string

*

  • Gets the interpretation of the message body or message body part of *
  • this ContentDispositionHeader. *
  • @return interpretation of the message body or message body part *

func (*ContentDisposition) GetDispositionType

func (this *ContentDisposition) GetDispositionType() string
  • Get the disposition type. *@param GetDispositionType

func (*ContentDisposition) GetHandling

func (this *ContentDisposition) GetHandling() string

* Get the dispositionType field.

  • @return String

func (*ContentDisposition) SetDispositionType

func (this *ContentDisposition) SetDispositionType(dispositionType string) (ParseException error)
  • Set the disposition type. *@param disposition type.

func (*ContentDisposition) SetHandling

func (this *ContentDisposition) SetHandling(handling string) (ParseException error)

* Set the dispositionType field.

  • @param type String to Set.

func (*ContentDisposition) String

func (this *ContentDisposition) String() string

type ContentDispositionHeader

type ContentDispositionHeader interface {
	ParametersHeader

	/**
	 * Sets the interpretation value of the message body or message body part
	 * for this ContentDispositionHeader.
	 *
	 * @param <var>dispositiontype</var> the new String value of the
	 * disposition type.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the dispositionType parameter.
	 */
	SetDispositionType(dispositionType string) (ParseException error)

	/**
	 * Gets the interpretation of the message body or message body part of
	 * this ContentDispositionHeader.
	 *
	 * @return interpretation of the message body or message body part
	 */
	GetDispositionType() string

	/**
	 * The handling parameter describes how the UAS should react if it
	 * receives a message body whose content type or disposition type it
	 * does not understand.  The parameter has defined values of "optional"
	 * and "required".  If the handling parameter is missing, the value
	 * "required" SHOULD be assumed.
	 *
	 * @param <var>handling</var> the new String value either "optional"
	 * or "required".
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the handling parameter.
	 */
	SetHandling(handling string) (ParseException error)

	/**
	 * Gets the handling information of the unknown content disposition of the
	 * ContentDispositionHeader.
	 *
	 * @return handling information for unknown content dispositions.
	 */
	GetHandling() string
}

type ContentEncoding

type ContentEncoding struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * Content encoding part of a content encoding header list. *@see ContentEncodingList *<pre> * From HTTP RFC 2616 *14.11 Content-Encoding * * The Content-Encoding entity-header field is used as a modifier to the * media-type. When present, its value indicates what additional content * codings have been applied to the entity-body, and thus what decoding * mechanisms must be applied in order to obtain the media-type * referenced by the Content-Type header field. Content-Encoding is * primarily used to allow a document to be compressed without losing * the identity of its underlying media type. * * Content-Encoding = "Content-Encoding" ":" 1#content-coding * * Content codings are defined in section 3.5. An example of its use is * * Content-Encoding: gzip * * The content-coding is a characteristic of the entity identified by * the Request-URI. Typically, the entity-body is stored with this * encoding and is only decoded before rendering or analogous usage. * However, a non-transparent proxy MAY modify the content-coding if the * new coding is known to be acceptable to the recipient, unless the * "no-transform" cache-control directive is present in the message. * * If the content-coding of an entity is not "identity", then the * response MUST include a Content-Encoding entity-header (section * 14.11) that lists the non-identity content-coding(s) used. * * If the content-coding of an entity in a request message is not * acceptable to the origin server, the server SHOULD respond with a * status code of 415 (Unsupported Media Type). * * If multiple encodings have been applied to an entity, the content * codings MUST be listed in the order in which they were applied. * Additional information about the encoding parameters MAY be provided * by other entity-header fields not defined by this specification. *</pre>

func NewContentEncoding

func NewContentEncoding() *ContentEncoding

* Default constructor.

func NewContentEncodingFromString

func NewContentEncodingFromString(enc string) *ContentEncoding

* constructor.

  • @param enc String to set.

func (*ContentEncoding) EncodeBody

func (this *ContentEncoding) EncodeBody() string

*

  • Canonical encoding of body of the header.
  • @return encoded body of the header.

func (*ContentEncoding) GetEncoding

func (this *ContentEncoding) GetEncoding() string

* get the ContentEncoding field.

  • @return String

func (*ContentEncoding) SetEncoding

func (this *ContentEncoding) SetEncoding(encoding string) (ParseException error)

* set the ConentEncoding field.

  • @param encoding String to set

func (*ContentEncoding) String

func (this *ContentEncoding) String() string

type ContentEncodingHeader

type ContentEncodingHeader interface {
	Header
	Encoding
}

type ContentEncodingList

type ContentEncodingList struct {
	SIPHeaderList
}

* * Content Encoding SIP header List. Keeps a list of ContentEncoding headers

func NewContentEncodingList

func NewContentEncodingList() *ContentEncodingList

* Default constructor.

type ContentLanguage

type ContentLanguage struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * ContentLanguage header * <pre> *Fielding, et al. Standards Track [Page 118] *RFC 2616 HTTP/1.1 June 1999 * * 14.12 Content-Language * * The Content-Language entity-header field describes the natural * language(s) of the intended audience for the enclosed entity. Note * that this might not be equivalent to all the languages used within * the entity-body. * * Content-Language = "Content-Language" ":" 1#language-tag * * Language tags are defined in section 3.10. The primary purpose of * Content-Language is to allow a user to identify and differentiate * entities according to the user's own preferred language. Thus, if the * body content is intended only for a Danish-literate audience, the * appropriate field is * * Content-Language: da * * If no Content-Language is specified, the default is that the content * is intended for all language audiences. This might mean that the * sender does not consider it to be specific to any natural language, * or that the sender does not know for which language it is intended. * * Multiple languages MAY be listed for content that is intended for * multiple audiences. For example, a rendition of the "Treaty of * Waitangi," presented simultaneously in the original Maori and English * versions, would call for * * Content-Language: mi, en * * However, just because multiple languages are present within an entity * does not mean that it is intended for multiple linguistic audiences. * An example would be a beginner's language primer, such as "A First * Lesson in Latin," which is clearly intended to be used by an * English-literate audience. In this case, the Content-Language would * properly only include "en". * * Content-Language MAY be applied to any media type -- it is not * limited to textual documents. *</pre>

func NewContentLanguage

func NewContentLanguage() *ContentLanguage

func NewContentLanguageFromString

func NewContentLanguageFromString(languageTag string) *ContentLanguage

* Default constructor.

  • @param lang String to set

func (*ContentLanguage) EncodeBody

func (this *ContentLanguage) EncodeBody() string

*

  • Canonical encoding of the value of the header.
  • @return encoded body of header.

func (*ContentLanguage) GetContentLanguage

func (this *ContentLanguage) GetContentLanguage() string

*

  • Gets the language value of the ContentLanguageHeader. * * *
  • @return the Locale value of this ContentLanguageHeader *

func (*ContentLanguage) GetLanguageTag

func (this *ContentLanguage) GetLanguageTag() string

* get the languageTag field.

  • @return String

func (*ContentLanguage) SetContentLanguage

func (this *ContentLanguage) SetContentLanguage(language string)

*

  • Sets the language parameter of this ContentLanguageHeader. * * *
  • @param language - the new Locale value of the language of *
  • ContentLanguageHeader *

func (*ContentLanguage) SetLanguageTag

func (this *ContentLanguage) SetLanguageTag(languageTag string)

* set the languageTag field

  • @param languageTag -- language tag to set.

func (*ContentLanguage) String

func (this *ContentLanguage) String() string

type ContentLanguageHeader

type ContentLanguageHeader interface {
	Header

	/**
	 * Gets the language value of the ContentLanguageHeader.
	 *
	 * @return the Locale value of this ContentLanguageHeader
	 */
	GetContentLanguage() string

	/**
	 * Sets the language parameter of this ContentLanguageHeader.
	 *
	 * @param language - the new Locale value of the language of
	 * ContentLanguageHeader
	 */
	SetContentLanguage(language string)
}

*

  • The Content-Language header field is used to indicate the language of the
  • message body.
  • <p>
  • For Example:<br>
  • <code>Content-Language: fr</code> *
  • @see ContentDispositionHeader
  • @see ContentLengthHeader
  • @see ContentEncodingHeader
  • @see ContentTypeHeader *

type ContentLanguageList

type ContentLanguageList struct {
	SIPHeaderList
}

* * ContentLanguage list of headers. (Should this be a list?)

func NewContentLanguageList

func NewContentLanguageList() *ContentLanguageList

* Default constructor

type ContentLength

type ContentLength struct {
	SIPHeader
	// contains filtered or unexported fields
}

func NewContentLength

func NewContentLength() *ContentLength

* Default constructor.

func NewContentLengthFromInt

func NewContentLengthFromInt(length int) *ContentLength

*

*Constructor given a length.

func (*ContentLength) EncodeBody

func (this *ContentLength) EncodeBody() string

*

  • Encode into a canonical string.
  • @return String

func (*ContentLength) GetContentLength

func (this *ContentLength) GetContentLength() int

* Get the ContentLength field.

  • @return int

func (*ContentLength) Match

func (this *ContentLength) Match(other interface{}) bool

* Pattern matcher ignores content length.

func (*ContentLength) SetContentLength

func (this *ContentLength) SetContentLength(contentLength int) error

*

  • Set the contentLength member
  • @param contentLength int to Set

func (*ContentLength) String

func (this *ContentLength) String() string

type ContentLengthHeader

type ContentLengthHeader interface {
	Header

	SetContentLength(contentLength int) (InvalidArgumentException error)

	GetContentLength() int
}

type ContentType

type ContentType struct {
	Parameters
	// contains filtered or unexported fields
}

* * ContentType SIP Header * <pre> *14.17 Content-Type * * The Content-Type entity-header field indicates the media type of the * entity-body sent to the recipient or, in the case of the HEAD method, * the media type that would have been sent had the request been a Get. * * Content-Type = "Content-Type" ":" media-type * * Media types are defined in section 3.7. An example of the field is * * Content-Type: text/html; charSet=ISO-8859-4 * * Further discussion of methods for identifying the media type of an * entity is provided in section 7.2.1. * * From HTTP RFC 2616 * </pre> * *

func NewContentType

func NewContentType() *ContentType

* Default constructor.

func NewContentTypeFromString

func NewContentTypeFromString(contentType, contentSubtype string) *ContentType

* Constructor given a content type and subtype. *@param contentType is the content type. *@param contentSubtype is the content subtype

func (*ContentType) CompareMediaRange

func (this *ContentType) CompareMediaRange(media string) bool

* compare two MediaRange headers.

  • @param media String to Set
  • @return int.

func (*ContentType) EncodeBody

func (this *ContentType) EncodeBody() string

*

  • Encode into a canonical string.
  • @return String.

func (*ContentType) GetCharSet

func (this *ContentType) GetCharSet() string

* Get the charSet parameter.

func (*ContentType) GetContentSubType

func (this *ContentType) GetContentSubType() string

* Get the content subtype. *@return the content subtype string (or null if not Set).

func (*ContentType) GetContentType

func (this *ContentType) GetContentType() string

* Get the content subtype. *@return the content tyep string (or null if not Set).

func (*ContentType) GetMediaRange

func (this *ContentType) GetMediaRange() *MediaRange

* Get the mediaRange field.

  • @return MediaRange.

func (*ContentType) GetMediaSubType

func (this *ContentType) GetMediaSubType() string

* Get the MediaSubType field.

  • @return String.

func (*ContentType) GetMediaType

func (this *ContentType) GetMediaType() string

* Get the Media Type.

  • @return String.

func (*ContentType) SetContentSubType

func (this *ContentType) SetContentSubType(contentType string) (ParseException error)

* Set the content subtype.

  • @param contentType String to Set

func (*ContentType) SetContentType

func (this *ContentType) SetContentType(contentType string) (ParseException error)

* * Set the content type. *@param contentType Content type string.

func (*ContentType) SetContentTypeSubType

func (this *ContentType) SetContentTypeSubType(contentType, contentSubType string)

* * Set the content type and subtype. *@param contentType Content type string. *@param contentSubType content subtype string

func (*ContentType) SetMediaRange

func (this *ContentType) SetMediaRange(m *MediaRange)

*

  • Set the mediaRange member
  • @param m mediaRange field.

func (*ContentType) String

func (this *ContentType) String() string

type ContentTypeHeader

type ContentTypeHeader interface {
	ParametersHeader
	MediaType
}

type Date

type Date struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * Date Header.

func NewDate

func NewDate() *Date

* Default constructor.

func (*Date) EncodeBody

func (this *Date) EncodeBody() string

* Encode the header into a String.

  • @return String

func (*Date) GetDate

func (this *Date) GetDate() *time.Time

*

  • Gets the date of DateHeader. The date is repesented by the Calender
  • object. *
  • @return the Calendar object representing the date of DateHeader

func (*Date) SetDate

func (this *Date) SetDate(d *time.Time)

*

  • Set the date member
  • @param d SIPDate to set

func (*Date) String

func (this *Date) String() string

type DateHeader

type DateHeader interface {
	Header

	SetDate(date *time.Time)

	GetDate() *time.Time
}

type Encoding

type Encoding interface {
	SetEncoding(encoding string) (ParseException error)

	/**
	 * Gets the encoding of an EncodingHeader. Returns null if no
	 * encoding is defined in an EncodingHeader.
	 *
	 * @return the string value identifing the encoding
	 */
	GetEncoding() string
}

*

  • This interface represents encoding methods for any header that contains an
  • encoding value. *
  • @see AcceptEncodingHeader
  • @see ContentEncodingHeader

type ErrorInfo

type ErrorInfo struct {
	Parameters
	// contains filtered or unexported fields
}

* * ErrorInfo SIP Header.

func NewErrorInfo

func NewErrorInfo() *ErrorInfo

* Default constructor.

func NewErrorInfoFromURI

func NewErrorInfoFromURI(errorInfo address.URI) *ErrorInfo

* Constructor given the error info *@param errorInfo -- the error information to set.

func (*ErrorInfo) EncodeBody

func (this *ErrorInfo) EncodeBody() string

*

  • Encode into canonical form.
  • @return String

func (*ErrorInfo) GetErrorInfo

func (this *ErrorInfo) GetErrorInfo() address.URI

*

  • Returns the ErrorInfo value of this ErrorInfoHeader. This message
  • may return null if a String message identifies the ErrorInfo. *
  • @return the URI representing the ErrorInfo.

func (*ErrorInfo) GetErrorMessage

func (this *ErrorInfo) GetErrorMessage() string

*

  • Get the Error information message of this ErrorInfoHeader. *
  • @return the stringified version of the ErrorInfo header.

func (*ErrorInfo) SetErrorInfo

func (this *ErrorInfo) SetErrorInfo(errorInfo address.URI)

*

  • Sets the ErrorInfo of the ErrorInfoHeader to the <var>errorInfo</var>
  • parameter value. *
  • @param errorInfo the new ErrorInfo of this ErrorInfoHeader.

func (*ErrorInfo) SetErrorMessage

func (this *ErrorInfo) SetErrorMessage(message string) (ParseException error)

*

  • Sets the Error information message to the new <var>message</var> value
  • supplied to this method. *
  • @param message - the new string value that represents the error message.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the error message.

func (*ErrorInfo) String

func (this *ErrorInfo) String() string

type ErrorInfoHeader

type ErrorInfoHeader interface {
	ParametersHeader

	SetErrorInfo(errorInfo address.URI)

	GetErrorInfo() address.URI

	SetErrorMessage(message string) (ParseException error)

	GetErrorMessage() string
}

type ErrorInfoList

type ErrorInfoList struct {
	SIPHeaderList
}

* * Error Info sip header. *@see ErrorInfoList *<pre> * * 6.24 Error-Info * * The Error-Info response header provides a pointer to additional * information about the error status response. This header field is * only contained in 3xx, 4xx, 5xx and 6xx responses. * * * * Error-Info = "Error-Info" ":" # ( "<" URI ">" *( ";" generic-param )) *</pre> *

func NewErrorInfoList

func NewErrorInfoList() *ErrorInfoList

* Default constructor.

type Event

type Event struct {
	Parameters
	// contains filtered or unexported fields
}

* * Event SIP Header.

func NewEvent

func NewEvent() *Event

* Creates a new instance of Event

func (*Event) EncodeBody

func (this *Event) EncodeBody() string

*

  • Encode in canonical form.
  • @return String

func (*Event) GetEventId

func (this *Event) GetEventId() string

*

  • Gets the id of the EventHeader. This method may return null if the
  • "eventId" is not Set.
  • @return the string object identifing the eventId of EventHeader.

func (*Event) GetEventType

func (this *Event) GetEventType() string

*

  • Gets the eventType of the EventHeader. *
  • @return the string object identifing the eventType of EventHeader.

func (*Event) Match

func (this *Event) Match(matchTarGet *Event) bool
  • Return true if the given event header matches the supplied one. *
  • @param matchTarGet -- event header to match against.

func (*Event) SetEventId

func (this *Event) SetEventId(eventId string) (ParseException error)

*

  • Sets the id to the newly supplied <var>eventId</var> string. *
  • @param eventId - the new string defining the eventId of this EventHeader
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the eventId value.

func (*Event) SetEventType

func (this *Event) SetEventType(eventType string) (ParseException error)

*

  • Sets the eventType to the newly supplied eventType string. *
  • @param eventType - the new string defining the eventType supported
  • in this EventHeader
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the eventType value.

func (*Event) String

func (this *Event) String() string

type EventHeader

type EventHeader interface {
	ParametersHeader

	/**
	 * Sets the eventType to the newly supplied eventType string.
	 *
	 * @param eventType - the  new string defining the eventType supported
	 * in this EventHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the eventType value.
	 */
	SetEventType(eventType string) (ParseException error)

	/**
	 * Gets the eventType of the EventHeader.
	 *
	 * @return the string object identifing the eventType of EventHeader.
	 */
	GetEventType() string

	/**
	 * Sets the id to the newly supplied eventId string.
	 *
	 * @param eventId - the new string defining the eventId of this EventHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the eventId value.
	 */
	SetEventId(eventId string) (ParseException error)

	/**
	 * Gets the id of the EventHeader. This method may return null if the
	 * eventId is not set.
	 *
	 * @return the string object identifing the eventId of EventHeader.
	 */
	GetEventId() string
}

type Expires

type Expires struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * Expires SIP Header.

func NewExpires

func NewExpires() *Expires

* default constructor

func (*Expires) EncodeBody

func (this *Expires) EncodeBody() string

*

  • Return canonical form.
  • @return String

func (*Expires) GetExpires

func (this *Expires) GetExpires() int

*

  • Gets the expires value of the ExpiresHeader. This expires value is *
  • relative time. * * *
  • @return the expires value of the ExpiresHeader. *

func (*Expires) SetExpires

func (this *Expires) SetExpires(expires int) (InvalidArgumentException error)

*

  • Sets the relative expires value of the ExpiresHeader.
  • The expires value MUST be greater than zero and MUST be
  • less than 2**31. *
  • @param expires - the new expires value of this ExpiresHeader *
  • @throws InvalidArgumentException if supplied value is less than zero. *

func (*Expires) String

func (this *Expires) String() string

type ExpiresHeader

type ExpiresHeader interface {
	Header

	/**
	 * Sets the relative expires value of the ExpiresHeader. The expires value
	 * MUST be between zero and (2**31)-1.
	 *
	 * @param expires - the new expires value of this ExpiresHeader
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 *
	 */
	SetExpires(expires int) (InvalidArgumentException error)

	GetExpires() int
}

type Extension

type Extension struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * A generic extension header for the stack. * The input text of the header gets recorded here.

func NewExtension

func NewExtension(headerName string) *Extension

func (*Extension) EncodeBody

func (this *Extension) EncodeBody() string

* Return just the body of this header encoded (leaving out the * name and the CRLF at the end).

func (*Extension) GetHeaderValue

func (this *Extension) GetHeaderValue() string

* Get the value of the extension header. *@return the value of the extension header.

func (*Extension) GetValue

func (this *Extension) GetValue() string

func (*Extension) SetName

func (this *Extension) SetName(headerName string)

func (*Extension) SetValue

func (this *Extension) SetValue(value string)

* Set the value of the header.

func (*Extension) String

func (this *Extension) String() string

* Return the canonical encoding of this header.

type ExtensionHeader

type ExtensionHeader interface {
	Header

	/**
	 * Sets the value parameter of the ExtensionHeader.
	 *
	 * @param value - the new value of the ExtensionHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the value parameter.
	 */
	SetValue(value string) (ParseException error)
}

type ExtensionHeaderList

type ExtensionHeaderList struct {
	SIPHeaderList
}

func NewExtensionHeaderList

func NewExtensionHeaderList(hName string) *ExtensionHeaderList

func (*ExtensionHeaderList) String

func (this *ExtensionHeaderList) String() string

type ExtensionHeaderLister

type ExtensionHeaderLister interface {
	SIPHeaderLister
}

type From

type From struct {
	AddressParameters
}

*

*From SIP Header.

func NewFrom

func NewFrom() *From

* Default constructor

func (*From) CloneTo

func (this *From) CloneTo(to *To)

* Generate a FROM header from a TO header

func (*From) EncodeBody

func (this *From) EncodeBody() string

*

  • Encode the header content into a String. *
  • @return String

func (*From) GetDisplayName

func (this *From) GetDisplayName() string

*

  • Get the display name from the address.
  • @return Display name

func (*From) GetHostPort

func (this *From) GetHostPort() (*core.HostPort, error)

*

  • Conveniance accessor function to get the hostPort field from the address.
  • Warning -- this assumes that the embedded URI is a SipURL. *
  • @return hostport field

func (*From) GetTag

func (this *From) GetTag() string

*

  • Get the tag parameter from the address parm list.
  • @return tag field

func (*From) GetUserAtHostPort

func (this *From) GetUserAtHostPort() string

* Get the user@host port string.

func (*From) HasTag

func (this *From) HasTag() bool

* Boolean function

  • @return true if the Tag exist

func (*From) RemoveTag

func (this *From) RemoveTag()

* remove Tag member

func (*From) SetAddress

func (this *From) SetAddress(addr address.Address)

*

  • Set the address member
  • @param address Address to set

func (*From) SetTag

func (this *From) SetTag(t string) (ParseException error)

*

  • Set the tag member
  • @param t tag to set. From tags are mandatory.

func (*From) String

func (this *From) String() string

*

  • Encode the header into a String. *
  • @return String

type FromHeader

type FromHeader interface {
	ParametersHeader
	AddressHeader

	/**

	 * Sets the tag parameter of the FromHeader. The tag in the From field of a
	 * request identifies the peer of the dialog. When a UA sends a request
	 * outside of a dialog, it contains a From tag only, providing "half" of
	 * the dialog Identifier.
	 * <p>
	 * The From Header MUST contain a new "tag" parameter, chosen by the UAC
	 * applicaton. Once the initial From "tag" is assigned it should not be
	 * manipulated by the application. That is on the client side for outbound
	 * requests the application is responsible for Tag assigmennment, after
	 * dialog establishment the stack will take care of Tag assignment.
	 *
	 * @param tag - the new tag of the FromHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Tag value.
	 */
	SetTag(tag string) (ParseException error)

	GetTag() string
}

*

  • The From header field indicates the logical identity of the initiator

  • of the request, possibly the user's address-of-record. This may be different

  • from the initiator of the dialog. Requests sent by the callee to the caller

  • use the callee's address in the From header field.

  • <p>

  • Like the To header field, it contains a URI and optionally a display name,

  • encapsulated in a {@link javax.sip.address.Address}. It is used by SIP

  • elements to determine which processing rules to apply to a request (for

  • example, automatic call rejection). As such, it is very important that the

  • From URI not contain IP addresses or the FQDN of the host on which the UA is

  • running, since these are not logical names.

  • <p>

  • The From header field allows for a display name. A UAC SHOULD use

  • the display name "Anonymous", along with a syntactically correct, but

  • otherwise meaningless URI (like sip:thisis@anonymous.invalid), if the

  • identity of the client is to remain hidden.

  • <p>

  • Usually, the value that populates the From header field in requests

  • generated by a particular UA is pre-provisioned by the user or by the

  • administrators of the user's local domain. If a particular UA is used by

  • multiple users, it might have switchable profiles that include a URI

  • corresponding to the identity of the profiled user. Recipients of requests

  • can authenticate the originator of a request in order to ascertain that

  • they are who their From header field claims they are.

  • <p>

  • Two From header fields are equivalent if their URIs match, and their

  • parameters match. Extension parameters in one header field, not present in

  • the other are ignored for the purposes of comparison. This means that the

  • display name and presence or absence of angle brackets do not affect

  • matching.

  • <ul>

  • <li> The "Tag" parameter - is used in the To and From header fields of SIP

  • messages. It serves as a general mechanism to identify a dialog, which is

  • the combination of the Call-ID along with two tags, one from each

  • participant in the dialog. When a User Agent sends a request outside of a dialog,

  • it contains a From tag only, providing "half" of the dialog ID. The dialog

  • is completed from the response(s), each of which contributes the second half

  • in the To header field. When a tag is generated by a User Agent for insertion into

  • a request or response, it MUST be globally unique and cryptographically

  • random with at least 32 bits of randomness. Besides the requirement for

  • global uniqueness, the algorithm for generating a tag is implementation

  • specific. Tags are helpful in fault tolerant systems, where a dialog is to

  • be recovered on an alternate server after a failure. A UAS can select the

  • tag in such a way that a backup can recognize a request as part of a dialog

  • on the failed server, and therefore determine that it should attempt to

  • recover the dialog and any other state associated with it.

  • </ul>

  • For Example:<br>

  • <code>From: "Bob" sips:bob@biloxi.com ;tag=a48s<br>

  • From: sip:+12125551212@phone2net.com;tag=887s<br>

  • From: Anonymous sip:c8oqz84zk7z@privacy.org;tag=hyh8</code>

type Header interface {
	EncodeBody() string
	GetHeaderName() string
	GetHeaderValue() string
	IsHeaderList() bool
	SetHeaderName(hdrname string)

	GetValue() string
	/**
	 * Gets the unique string name of this Header. A name constant is defined in
	 * each individual Header identifying each Header.
	 *
	 * @return the name of this specific Header
	 */
	GetName() string

	/**
	 * Creates and returns a deep copy of the Header. This methods must ensure a
	 * deep copy of the Header, so that when a message is cloned the Header can
	 * be modified without effecting the original Header in the message. This
	 * provides useful functionality for proxying Requests and Responses, for
	 * example:
	 * <ul>
	 * <li>Recieve a message.
	 * <li>Create a deep clone of the message and headers.
	 * <li>Modify necessary headers.
	 * <li>Proxy the message using the send methods on the SipProvider.
	 * </ul>
	 * This method overrides the clone method in java.lang.Object.
	 *
	 * @return a deep copy of Header
	 */
	Clone() interface{}

	/**
	 * Gets a string representation of the Header. This method overrides the
	 * toString method in java.lang.Object.
	 *
	 * @return string representation of Header
	 */
	String() string
}

type InReplyTo

type InReplyTo struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * InReplyTo SIP Header.

func NewInReplyTo

func NewInReplyTo() *InReplyTo

* Default constructor

func NewInReplyToFromCallIdentifier

func NewInReplyToFromCallIdentifier(cid *CallIdentifier) *InReplyTo

* constructor

  • @param cid CallIdentifier to Set

func (*InReplyTo) EncodeBody

func (this *InReplyTo) EncodeBody() string

*

  • Generate canonical form of the header.
  • @return String

func (*InReplyTo) GetCallId

func (this *InReplyTo) GetCallId() string

*

  • Returns the Call-Id of InReplyToHeader. The CallId parameter uniquely
  • identifies a series of messages within a dialogue. *
  • @return the String value of the Call-Id of this InReplyToHeader

func (*InReplyTo) SetCallId

func (this *InReplyTo) SetCallId(callId string) (ParseException error)

*

  • Sets the Call-Id of the InReplyToHeader. The CallId parameter uniquely
  • identifies a serious of messages within a dialogue. *
  • @param callId - the string value of the Call-Id of this InReplyToHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the callId value.

func (*InReplyTo) String

func (this *InReplyTo) String() string

type InReplyToHeader

type InReplyToHeader interface {
	Header

	/**
	 * Sets the Call-Id of the InReplyToHeader. The CallId parameter uniquely
	 * identifies a serious of messages within a dialogue.
	 *
	 * @param callId - the string value of the Call-Id of this InReplyToHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the callId value.
	 */
	SetCallId(callId string) (ParseException error)

	/**
	 * Returns the Call-Id of InReplyToHeader. The CallId parameter uniquely
	 * identifies a series of messages within a dialogue.
	 *
	 * @return the String value of the Call-Id of this InReplyToHeader
	 */
	GetCallId() string
}

*

  • The In-Reply-To header field enumerates the Call-IDs that this call
  • references or returns. These Call-IDs may have been cached by the client
  • then included in this header field in a return call.
  • <p>
  • This allows automatic call distribution systems to route return calls to the
  • originator of the first call. This also allows callees to filter calls, so
  • that only return calls for calls they originated will be accepted. This
  • field is not a substitute for request authentication.
  • <p>
  • For Example:<br>
  • <code>In-Reply-To: 70710@saturn.jcp.org, 17320@saturn.jcp.org</code>

type InReplyToList

type InReplyToList struct {
	SIPHeaderList
}

* * In-Reply-To SIP header. Keeps a list of CallIdentifiers

func NewInReplyToList

func NewInReplyToList() *InReplyToList

* Default constructor

type Lister

type Lister interface {
	Back() *list.Element
	Front() *list.Element
	Init() *list.List
	InsertAfter(v interface{}, mark *list.Element) *list.Element
	InsertBefore(v interface{}, mark *list.Element) *list.Element
	Len() int
	MoveAfter(e, mark *list.Element)
	MoveBefore(e, mark *list.Element)
	MoveToBack(e *list.Element)
	MoveToFront(e *list.Element)
	PushBack(v interface{}) *list.Element
	PushBackList(other *list.List)
	PushFront(v interface{}) *list.Element
	PushFrontList(other *list.List)
	Remove(e *list.Element) interface{}
}

type MaxForwards

type MaxForwards struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * MaxForwards Header

func NewMaxForwards

func NewMaxForwards() *MaxForwards

* Default constructor.

func (*MaxForwards) DecrementMaxForwards

func (this *MaxForwards) DecrementMaxForwards() error

* decrement MaxForwards field one by one.

func (*MaxForwards) EncodeBody

func (this *MaxForwards) EncodeBody() string

*

  • Encode into a string.
  • @return encoded string. *

func (*MaxForwards) GetMaxForwards

func (this *MaxForwards) GetMaxForwards() int

* get the MaxForwards field.

  • @return the maxForwards member.

func (*MaxForwards) HasReachedZero

func (this *MaxForwards) HasReachedZero() bool

* Boolean function

  • @return true if MaxForwards field reached zero.

func (*MaxForwards) SetMaxForwards

func (this *MaxForwards) SetMaxForwards(maxForwards int) (InvalidArgumentException error)

*

  • Set the maxForwards member
  • @param maxForwards maxForwards parameter to set

func (*MaxForwards) String

func (this *MaxForwards) String() string

type MaxForwardsHeader

type MaxForwardsHeader interface {
	Header

	DecrementMaxForwards() (TooManyHopsException error)

	GetMaxForwards() int

	SetMaxForwards(maxForwards int) (InvalidArgumentException error)
}

type MediaRange

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

* * Media Range * @see Accept * <pre> * media-range = ( "STAR/STAR" * | ( type "/" STAR ) * | ( type "/" subtype ) * ) *( ";" parameter ) * * HTTP RFC 2616 Section 14.1 * </pre>

func NewMediaRange

func NewMediaRange() *MediaRange

* Default constructor

func (*MediaRange) GetSubtype

func (this *MediaRange) GetSubtype() string

* get the subType field.

  • @return String

func (*MediaRange) GetType

func (this *MediaRange) GetType() string

* get type field

  • @return String

func (*MediaRange) SetSubtype

func (this *MediaRange) SetSubtype(s string)

*

  • Set the subtype member
  • @param s String to set

func (*MediaRange) SetType

func (this *MediaRange) SetType(t string)

*

  • Set the type member
  • @param t String to set

func (*MediaRange) String

func (this *MediaRange) String() string

*

  • Encode the object.
  • @return String

type MediaType

type MediaType interface {

	/**
	 * Sets value of media type of Header with Content Type.
	 *
	 * @param contentType - the new string value of the content type
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the contentType value.
	 */
	SetContentType(contentType string) (ParseException error)

	/**
	 * Gets media type of Header with Content type.
	 *
	 * @return media type of Header with Content type.
	 */
	GetContentType() string

	/**
	 * Sets value of media subtype of Header with Content sub-type.
	 *
	 * @param contentSubType - the new string value of the content sub-type.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the contentSubType value.
	 */
	SetContentSubType(contentSubType string) (ParseException error)

	/**
	 * Gets media sub-type of Header with Content sub-type.
	 *
	 * @return media sub-type of Header with Content sub-type.
	 */
	GetContentSubType() string
}

type MimeVersion

type MimeVersion struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * MimeVersion SIP Header.

func NewMimeVersion

func NewMimeVersion() *MimeVersion

* Default constructor

func (*MimeVersion) EncodeBody

func (this *MimeVersion) EncodeBody() string

*

  • Return canonical form.
  • @return String

func (*MimeVersion) GetMajorVersion

func (this *MimeVersion) GetMajorVersion() int

*

  • Gets the Major version value of this MimeVersionHeader. *
  • @return the Major version of this MimeVersionHeader

func (*MimeVersion) GetMinorVersion

func (this *MimeVersion) GetMinorVersion() int

*

  • Gets the Minor version value of this MimeVersionHeader. *
  • @return the Minor version of this MimeVersionHeader

func (*MimeVersion) SetMajorVersion

func (this *MimeVersion) SetMajorVersion(majorVersion int) (InvalidArgumentException error)

*

  • Sets the Major-Version argument of this MimeVersionHeader to the supplied
  • <var>majorVersion</var> value. *
  • @param majorVersion - the new integer Major version
  • @throws InvalidArgumentException

func (*MimeVersion) SetMinorVersion

func (this *MimeVersion) SetMinorVersion(minorVersion int) (InvalidArgumentException error)

*

  • Sets the Minor-Version argument of this MimeVersionHeader to the supplied
  • <var>minorVersion</var> value. *
  • @param minorVersion - the new integer Minor version
  • @throws InvalidArgumentException

func (*MimeVersion) String

func (this *MimeVersion) String() string

type MimeVersionHeader

type MimeVersionHeader interface {
	Header

	/**
	 * Gets the Minor version value of this MimeVersionHeader.
	 *
	 * @return the Minor version of this MimeVersionHeader
	 */
	GetMinorVersion() int

	/**
	 * Sets the Minor-Version argument of this MimeVersionHeader to the supplied
	 * minorVersion value.
	 *
	 * @param minorVersion - the new minor MIME version
	 * @throws InvalidArgumentException if the supplied value is less than zero.
	 */
	SetMinorVersion(minorVersion int) (InvalidArgumentException error)

	/**
	 * Gets the Major version value of this MimeVersionHeader.
	 *
	 * @return the Major version of this MimeVersionHeader
	 */
	GetMajorVersion() int

	/**
	 * Sets the Major-Version argument of this MimeVersionHeader to the supplied
	 * majorVersion value.
	 *
	 * @param majorVersion - the new major MIME version
	 * @throws InvalidArgumentException if the supplied version is less than zero.
	 */
	SetMajorVersion(majorVersion int) (InvalidArgumentException error)
}

*

  • SIP messages MAY include a single MIME-Version general-header field to
  • indicate what version of the MIME protocol was used to construct the
  • message. Use of the MIME-Version header field indicates that the message is
  • in full compliance with the MIME protocol as defined in
  • <a href = "http://www.ietf.org/rfc/rfc2405.txt">RFC2045</a>. Proxies/gateways
  • are responsible for ensuring full compliance (where possible) when exporting
  • SIP messages to strict MIME environments.
  • <p>
  • For Example:<br>
  • <code>MIME-Version: 1.0</code>

type MinExpires

type MinExpires struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * MinExpires SIP Header.

func NewMinExpires

func NewMinExpires() *MinExpires

* default constructor

func (*MinExpires) EncodeBody

func (this *MinExpires) EncodeBody() string

*

  • Return canonical form.
  • @return String

func (*MinExpires) GetExpires

func (this *MinExpires) GetExpires() int

*

  • Gets the expires value of the ExpiresHeader. This expires value is *
  • relative time. * * *
  • @return the expires value of the ExpiresHeader. *

func (*MinExpires) SetExpires

func (this *MinExpires) SetExpires(expires int) (InvalidArgumentException error)

*

  • Sets the relative expires value of the ExpiresHeader.
  • The expires value MUST be greater than zero and MUST be
  • less than 2**31. *
  • @param expires - the new expires value of this ExpiresHeader *
  • @throws InvalidArgumentException if supplied value is less than zero. *

func (*MinExpires) String

func (this *MinExpires) String() string

type MinExpiresHeader

type MinExpiresHeader interface {
	ExpiresHeader
}

type OptionTag

type OptionTag interface {

	/**
	 * Sets the option tag value to the new supplied optionTag
	 * parameter.
	 *
	 * @param optionTag - the new string value of the option tag.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the optionTag value.
	 */
	SetOptionTag(optionTag string) (ParseException error)

	/**
	 * Gets the option tag of this OptionTag class.
	 *
	 * @return the string that identifies the option tag value.
	 */
	GetOptionTag() string
}

type Organization

type Organization struct {
	SIPHeader
	// contains filtered or unexported fields
}

* *Organization SIP Header.

func NewOrganization

func NewOrganization() *Organization

* Default constructor

func (*Organization) EncodeBody

func (this *Organization) EncodeBody() string

*

  • Return encoding of value of the header.
  • @return String

func (*Organization) GetOrganization

func (this *Organization) GetOrganization() string

* get the organization field.

  • @return String

func (*Organization) SetOrganization

func (this *Organization) SetOrganization(o string) (ParseException error)

*

  • Set the organization member
  • @param o String to set

func (*Organization) String

func (this *Organization) String() string

type OrganizationHeader

type OrganizationHeader interface {
	Header

	SetOrganization(organization string) (ParseException error)

	GetOrganization() string
}

type Parameters

type Parameters struct {
	SIPHeader
	// contains filtered or unexported fields
}

func NewParameters

func NewParameters(hdrName string) *Parameters

func (*Parameters) EncodeBody

func (this *Parameters) EncodeBody() string

func (*Parameters) GetNameValue

func (this *Parameters) GetNameValue(parameterName string) *core.NameValue

* This is for the benifit of the TCK. * *@return the name value pair for the given parameter name.

func (*Parameters) GetParameter

func (this *Parameters) GetParameter(name string) string

*

  • Returns the value of the named parameter, or null if it is not set. A
  • zero-length String indicates flag parameter. *
  • @param <var>name</var> name of parameter to retrieve
  • @return the value of specified parameter

func (*Parameters) GetParameterNames

func (this *Parameters) GetParameterNames() *list.List

func (*Parameters) GetParameterValue

func (this *Parameters) GetParameterValue(name string) string
  • Return the parameter as an object (dont convert to string). * *@param name is the name of the parameter to get. *@return the object associated with the name. *

func (*Parameters) GetParameters

func (this *Parameters) GetParameters() *core.NameValueList

*

  • get the parameter list.
  • @return parameter list

func (*Parameters) HasParameter

func (this *Parameters) HasParameter(parameterName string) bool
  • Return true if has a parameter. * *@param paramName is the name of the parameter. * *@return true if the parameter exists and false if not.

func (*Parameters) HasParameters

func (this *Parameters) HasParameters() bool

func (*Parameters) RemoveParameter

func (this *Parameters) RemoveParameter(name string)

func (*Parameters) RemoveParameters

func (this *Parameters) RemoveParameters()

*

*Remove all parameters.

func (*Parameters) SetParameter

func (this *Parameters) SetParameter(name, value string) (ParseException error)

*

  • Sets the value of the specified parameter. If the parameter already had *
  • a value it will be overwritten. A zero-length String indicates flag *
  • parameter. * * *
  • @param name - a String specifying the parameter name *
  • @param value - a String specifying the parameter value *
  • @throws ParseException which signals that an error has been reached *
  • unexpectedly while parsing the parameter name or value. *

func (*Parameters) SetParameterFromNameValue

func (this *Parameters) SetParameterFromNameValue(nameValue *core.NameValue)
  • Set the parameter given a name and value. *
  • @param nameValue - the name value of the parameter to set.

func (*Parameters) SetParameters

func (this *Parameters) SetParameters(parameters *core.NameValueList)
  • Set the parameter list. * *@param nameValueList - the name value list to set as the parameter list.

func (*Parameters) SetQuotedParameter

func (this *Parameters) SetQuotedParameter(name, value string)

*

  • Sets the value of the specified parameter. If the parameter already had *
  • a value it will be overwritten. A zero-length String indicates flag *
  • parameter. * * *
  • @param name - a String specifying the parameter name *
  • @param value - a String specifying the parameter value *
  • @throws ParseException which signals that an error has been reached *
  • unexpectedly while parsing the parameter name or value. *

func (*Parameters) String

func (this *Parameters) String() string

type ParametersHeader

type ParametersHeader interface {
	Header
	GetParameter(name string) string
	GetParameterValue(name string) string //interface{} TODO
	GetParameterNames() *list.List
	HasParameters() bool
	RemoveParameter(name string)
	SetParameter(name, value string) (ParseException error)
	SetQuotedParameter(name, value string)
	HasParameter(parameterName string) bool
	RemoveParameters()
	GetParameters() *core.NameValueList
	SetParameters(parameters *core.NameValueList)
	GetNameValue(parameterName string) *core.NameValue
}

type Priority

type Priority struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * the Priority header.

func NewPriority

func NewPriority() *Priority

* Default constructor

func (*Priority) EncodeBody

func (this *Priority) EncodeBody() string

*

  • Encode into canonical form.
  • @return String

func (*Priority) GetPriority

func (this *Priority) GetPriority() string

*

  • get the priority value.
  • @return String

func (*Priority) SetPriority

func (this *Priority) SetPriority(p string) (ParseException error)

*

  • Set the priority member
  • @param p String to set

func (*Priority) String

func (this *Priority) String() string

type PriorityHeader

type PriorityHeader interface {
	Header

	SetPriority(priority string) (ParseException error)

	GetPriority() string
}

type Protocol

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

* * Protocol name and version.

func NewProtocol

func NewProtocol() *Protocol

* * Default constructor.

func (*Protocol) GetProtocolName

func (this *Protocol) GetProtocolName() string

* get the protocol name

  • @return String

func (*Protocol) GetProtocolVersion

func (this *Protocol) GetProtocolVersion() string

* get the protocol version

  • @return String

func (*Protocol) GetTransport

func (this *Protocol) GetTransport() string

* get the transport

  • @return String

func (*Protocol) SetProtocolName

func (this *Protocol) SetProtocolName(p string)

*

  • Set the protocolName member
  • @param p String to set

func (*Protocol) SetProtocolVersion

func (this *Protocol) SetProtocolVersion(p string)

*

  • Set the protocolVersion member
  • @param p String to set

func (*Protocol) SetTransport

func (this *Protocol) SetTransport(t string)

*

  • Set the transport member
  • @param t String to set

func (*Protocol) String

func (this *Protocol) String() string

*

  • Return canonical form.
  • @return String

type ProxyAuthenticate

type ProxyAuthenticate struct {
	Authentication
}

* * Proxy Authenticate SIP (HTTP ) header.

func NewProxyAuthenticate

func NewProxyAuthenticate() *ProxyAuthenticate

* Default Constructor

type ProxyAuthenticateHeader

type ProxyAuthenticateHeader interface {
	WWWAuthenticateHeader
}

*

  • A Proxy-Authenticate header field value contains an authentication
  • challenge. When a UAC sends a request to a proxy server, the proxy server
  • MAY authenticate the originator before the request is processed. If no
  • credentials (in the Proxy-Authorization header field) are provided in the
  • request, the proxy can challenge the originator to provide credentials by
  • rejecting the request with a 407 (Proxy Authentication Required) status
  • code. The proxy MUST populate the 407 (Proxy Authentication Required)
  • message with a Proxy-Authenticate header field value applicable to the
  • proxy for the requested resource. The field value consists of a challenge
  • that indicates the authentication and parameters applicable to the proxy
  • for this RequestURI.
  • <p>
  • Note - Unlike its usage within HTTP, the ProxyAuthenticateHeader must be
  • passed upstream in the Response to the UAC. In SIP, only UAC's can
  • authenticate themselves to proxies.
  • <p>
  • Proxies MUST NOT add values to the Proxy-Authorization header field. All
  • 407 (Proxy Authentication Required) responses MUST be forwarded upstream
  • toward the UAC following the procedures for any other response. It is the
  • UAC's responsibility to add the Proxy-Authorization header field value
  • containing credentials for the realm of the proxy that has asked for
  • authentication.
  • <p>
  • When the originating UAC receives the 407 (Proxy Authentication Required)
  • it SHOULD, if it is able, re-originate the request with the proper
  • credentials. It should follow the same procedures for the display of the
  • "realm" parameter that are given above for responding to 401. If no
  • credentials for a realm can be located, UACs MAY attempt to retry the
  • request with a username of "anonymous" and no password (a password of "").
  • The UAC SHOULD also cache the credentials used in the re-originated request.
  • <p>
  • For Example:<br>
  • <code>Proxy-Authenticate: Digest realm="jcp.org",
  • domain="sip:ss1.duke.com", qop="auth",
  • nonce="f84f1cec41e6cbe5aea9c8e88d359", opaque="", stale=FALSE,
  • algorithm=MD5</code> *
  • @see Parameters
  • @see ProxyAuthorizationHeader

type ProxyAuthenticateList

type ProxyAuthenticateList struct {
	SIPHeaderList
}

* * List of ProxyAuthenticate headers.

func NewProxyAuthenticateList

func NewProxyAuthenticateList() *ProxyAuthenticateList

* Default constructor

type ProxyAuthorization

type ProxyAuthorization struct {
	Authentication
}

* * ProxyAuthorization SIP header.

func NewProxyAuthorization

func NewProxyAuthorization() *ProxyAuthorization

* Default constructor.

type ProxyAuthorizationHeader

type ProxyAuthorizationHeader interface {
	AuthenticationHeader
}

type ProxyRequire

type ProxyRequire struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * ProxyRequire Header.

func NewProxyRequire

func NewProxyRequire() *ProxyRequire

* Default Constructor

  • @param s String to set

func NewProxyRequireFromString

func NewProxyRequireFromString(s string) *ProxyRequire

* Constructor

  • @param s String to set

func (*ProxyRequire) EncodeBody

func (this *ProxyRequire) EncodeBody() string

*

  • Encode in canonical form.
  • @return String

func (*ProxyRequire) GetOptionTag

func (this *ProxyRequire) GetOptionTag() string

*

  • Gets the option tag of this OptionTag class. *
  • @return the string that identifies the option tag value.

func (*ProxyRequire) SetOptionTag

func (this *ProxyRequire) SetOptionTag(optionTag string) (ParseException error)

*

  • Sets the option tag value to the new supplied <var>optionTag</var>
  • parameter. *
  • @param optionTag - the new string value of the option tag.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the optionTag value.

func (*ProxyRequire) String

func (this *ProxyRequire) String() string

type ProxyRequireHeader

type ProxyRequireHeader interface {
	RequireHeader
}

type ProxyRequireList

type ProxyRequireList struct {
	SIPHeaderList
}

* * Proxy Require SIPSIPObject (list of option tags)

func NewProxyRequireList

func NewProxyRequireList() *ProxyRequireList

* Default Constructor

type QValue

type QValue interface {
	GetQValue() float32

	SetQValue(qValue float32) (InvalidArgumentException error)

	RemoveQValue()

	HasQValue() bool
}

type RAck

type RAck struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * RAck SIP Header implementation

func NewRAck

func NewRAck() *RAck

* Creates a new instance of RAck

func (*RAck) EncodeBody

func (this *RAck) EncodeBody() string

* Encode the body of this header (the stuff that follows headerName).

  • A.K.A headerValue.

func (*RAck) GetCSeqNumber

func (this *RAck) GetCSeqNumber() int
  • Gets the CSeq sequence number of this RAckHeader. *
  • @return the integer value of the cSeq number of the RAckHeader

func (*RAck) GetMethod

func (this *RAck) GetMethod() string
  • Gets the method of RAckHeader *
  • @return method of RAckHeader

func (*RAck) GetRSeqNumber

func (this *RAck) GetRSeqNumber() int
  • Gets the RSeq sequence number of this RAckHeader. *
  • @return the integer value of the RSeq number of the RAckHeader

func (*RAck) SetCSeqNumber

func (this *RAck) SetCSeqNumber(cSeqNumber int) (InvalidArgumentException error)

* Sets the sequence number value of the CSeqHeader of the provisional

  • response being acknowledged. The sequence number MUST be expressible as
  • a 32-bit unsigned integer and MUST be less than 2**31. *
  • @param cSeqNumber - the new cSeq number of this RAckHeader
  • @throws InvalidArgumentException if supplied value is less than zero.

func (*RAck) SetMethod

func (this *RAck) SetMethod(method string) (ParseException error)

* Sets the method of RAckHeader, which correlates to the method of the

  • CSeqHeader of the provisional response being acknowledged. *
  • @param method - the new string value of the method of the RAckHeader
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the method value.

func (*RAck) SetRSeqNumber

func (this *RAck) SetRSeqNumber(rSeqNumber int) (InvalidArgumentException error)

* Sets the sequence number value of the RSeqHeader of the provisional

  • response being acknowledged. The sequence number MUST be expressible as
  • a 32-bit unsigned integer and MUST be less than 2**31. *
  • @param rSeqNumber - the new rSeq number of this RAckHeader
  • @throws InvalidArgumentException if supplied value is less than zero.

func (*RAck) String

func (this *RAck) String() string

type RAckHeader

type RAckHeader interface {
	Header

	/**
	 * Sets the method of RAckHeader, which correlates to the method of the
	 * CSeqHeader of the provisional response being acknowledged.
	 *
	 * @param method - the new string value of the method of the RAckHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the method value.
	 */
	SetMethod(method string) (ParseException error)

	/**
	 * Gets the method of RAckHeader.
	 *
	 * @return method of RAckHeader.
	 */
	GetMethod() string

	/**
	 * Sets the sequence number value of the CSeqHeader of the provisional
	 * response being acknowledged. The sequence number MUST be expressible as
	 * a 32-bit unsigned integer and MUST be less than 2**31.
	 *
	 * @param cSeqNumber - the new cSeq number of this RAckHeader.
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 */
	SetCSeqNumber(cSeqNumber int) (InvalidArgumentException error)

	/**
	 * Gets the CSeq sequence number of this RAckHeader.
	 *
	 * @return the integer value of the cSeq number of the RAckHeader.
	 */
	GetCSeqNumber() int

	/**
	 * Sets the sequence number value of the RSeqHeader of the provisional
	 * response being acknowledged. The sequence number MUST be expressible as
	 * a 32-bit unsigned integer and MUST be less than 2**31.
	 *
	 * @param rSeqNumber - the new rSeq number of this RAckHeader.
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 */
	SetRSeqNumber(rSeqNumber int) (InvalidArgumentException error)

	/**
	 * Gets the RSeq sequence number of this RAckHeader.
	 *
	 * @return the integer value of the RSeq number of the RAckHeader.
	 */
	GetRSeqNumber() int
}

type RSeq

type RSeq struct {
	SIPHeader
	// contains filtered or unexported fields
}

func NewRSeq

func NewRSeq() *RSeq

* Creates a new instance of RSeq

func (*RSeq) EncodeBody

func (this *RSeq) EncodeBody() string

* Encode the body of this header (the stuff that follows headerName).

  • A.K.A headerValue.

func (*RSeq) GetSequenceNumber

func (this *RSeq) GetSequenceNumber() int
  • Gets the sequence number of this RSeqHeader. *
  • @return the integer value of the Sequence number of the RSeqHeader

func (*RSeq) SetSequenceNumber

func (this *RSeq) SetSequenceNumber(sequenceNumber int) (InvalidArgumentException error)

* Sets the sequence number value of the RSeqHeader of the provisional

  • response. The sequence number MUST be expressible as a 32-bit unsigned
  • integer and MUST be less than 2**31. *
  • @param sequenceNumber - the new Sequence number of this RSeqHeader
  • @throws InvalidArgumentException if supplied value is less than zero.

func (*RSeq) String

func (this *RSeq) String() string

type RSeqHeader

type RSeqHeader interface {
	Header

	/**
	 * Sets the sequence number value of the RSeqHeader of the provisional
	 * response. The sequence number MUST be expressible as a 32-bit unsigned
	 * integer and MUST be less than 2**31.
	 *
	 * @param sequenceNumber - the new Sequence number of this RSeqHeader
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 */
	SetSequenceNumber(sequenceNumber int) (InvalidArgumentException error)

	/**
	 * Gets the sequence number of this RSeqHeader.
	 *
	 * @return the integer value of the Sequence number of the RSeqHeader
	 */
	GetSequenceNumber() int
}

type Reason

type Reason struct {
	Parameters
	// contains filtered or unexported fields
}

* *Definition of the Reason SIP Header.

func NewReason

func NewReason() *Reason

* Creates a new instance of Reason

func (*Reason) EncodeBody

func (this *Reason) EncodeBody() string

* Encode the body of this header (the stuff that follows headerName).

  • A.K.A headerValue.

func (*Reason) GetCause

func (this *Reason) GetCause() int
  • Get the cause token. *@return the cause code.

func (*Reason) GetName

func (this *Reason) GetName() string

* Set the cause.

/** Gets the unique string name of this Header. A name constant is defined in
 * each individual Header identifying each Header.
 *
 * @return the name of this specific Header

func (*Reason) GetProtocol

func (this *Reason) GetProtocol() string
  • Return the protocol. * *@return the protocol.

func (*Reason) GetText

func (this *Reason) GetText() string
  • Get the text. * *@return text parameter. *

func (*Reason) SetCause

func (this *Reason) SetCause(cause int) (InvalidArgumentException error)

*

  • Set the cause. * *@param cause - cause to Set.

func (*Reason) SetProtocol

func (this *Reason) SetProtocol(protocol string) (ParseException error)

func (*Reason) SetText

func (this *Reason) SetText(text string) (ParseException error)
  • Set the text. * *@param text -- string text to Set.

func (*Reason) String

func (this *Reason) String() string

type ReasonHeader

type ReasonHeader interface {
	ParametersHeader

	/**
	 * Gets the cause value of the ReasonHeader
	 *
	 * @return the integer value of the cause of the ReasonHeader
	 */
	GetCause() int

	/**
	 * Sets the cause value of the ReasonHeader. Any SIP status code MAY
	 * appear in the Reason header field of a request, assuming the protocol
	 * field of the ReasonHeader is SIP.
	 *
	 * @param cause - the new integer value of the cause of the ReasonHeader
	 * @throws InvalidArgumentException if the cause value is less than zero.
	 */
	SetCause(cause int) (InvalidArgumentException error)

	/**
	 * Sets the protocol of the ReasonHeader, for example SIP or Q.850.
	 *
	 * @param protocol - the new string value of the protocol of the ReasonHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the protocol value.
	 */
	SetProtocol(protocol string) (ParseException error)

	/**
	 * Gets the protocol value of the ReasonHeader
	 *
	 * @return the string value of the protocol of the ReasonHeader
	 */
	GetProtocol() string

	/**
	 * Sets the text value of the ReasonHeader.
	 *
	 * @param text - the new string value of the text of the ReasonHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the text value.
	 */
	SetText(text string) (ParseException error)

	/**
	 * Gets the text value of the ReasonHeader
	 *
	 * @return the string value of the text of the ReasonHeader
	 */
	GetText() string
}

type ReasonList

type ReasonList struct {
	SIPHeaderList
}

* * List of Reason headers.

func NewReasonList

func NewReasonList() *ReasonList

* Default constructor

type RecordRoute

type RecordRoute struct {
	AddressParameters
}

* The Request-Route header is added to a request by any proxy that insists on

  • being in the path of subsequent requests for the same call leg.

func NewRecordRoute

func NewRecordRoute() *RecordRoute

* default constructor

func NewRecordRouteFromAddress

func NewRecordRouteFromAddress(addr address.Address) *RecordRoute

* constructor

  • @param addr address to set

func (*RecordRoute) EncodeBody

func (this *RecordRoute) EncodeBody() string
  • Encode into canonical form. *@return String containing the canonicaly encoded header.

func (*RecordRoute) String

func (this *RecordRoute) String() string

type RecordRouteHeader

type RecordRouteHeader interface {
	AddressHeader
	ParametersHeader
}

*

  • The Record-Route header field is inserted by proxies in a request to force
  • future requests in the dialog to be routed through the proxy. The
  • SipProvider (as opposed to the application) should attach Record-Route
  • headers to messages explicitly when forwarding them if necessary.
  • <p>
  • The RecordRouteHeader is added to a Request by any proxy that insists on being
  • in the path of subsequent Requests for the same call leg. It contains
  • a globally reachable RequestURI that identifies the proxy server. Each proxy
  • server adds its Address URI to the beginning of the list.
  • <p>
  • The calling user agent client copies the RecordRouteHeaders into
  • RouteHeaders of subsequent Requests within the same call leg, reversing the
  • order, so that the first entry is closest to the user agent client. If the
  • Response contained a ContactHeader field, the calling user agent adds its
  • content as the last RouteHeader. Unless this would cause a loop, a client
  • must send subsequent Requests for this call leg to the Address URI in the
  • first RouteHeader and remove that entry.
  • <p>
  • Some proxies, such as those controlling firewalls or in an automatic call
  • distribution (ACD) system, need to maintain call state and thus need to
  • receive any BYE and ACK Requests for the call.
  • <p>
  • For Example:<br>
  • <code>Record-Route: sip:server10.jcp.org;lr,
  • sip:bigbox3.duke.jcp.org;lr</code> *
  • @see RouteHeader
  • @see AddressHeader
  • @see Parameters

type RecordRouteList

type RecordRouteList struct {
	SIPHeaderList
}

* * RecordRoute List of SIP headers (a collection of Addresses)

func NewRecordRouteList

func NewRecordRouteList() *RecordRouteList

* Default constructor

type ReferTo

type ReferTo struct {
	AddressParameters
}

func NewReferTo

func NewReferTo() *ReferTo

* default Constructor.

func (*ReferTo) EncodeBody

func (this *ReferTo) EncodeBody() string

*

  • Encode the header content into a String.
  • @return String

func (*ReferTo) String

func (this *ReferTo) String() string

type ReferToHeader

type ReferToHeader interface {
	AddressHeader
	ParametersHeader
}

*

  • This interface represents the ReferTo SIP header, as defined by
  • <a href = "http://www.ietf.org/rfc/rfc3515.txt">RFC3515</a>, this header is
  • not part of RFC3261.
  • <p>
  • A ReferToHeader only appears in a REFER request. It provides a URL to
  • reference. The ReferToHeader field MAY be encrypted as part of end-to-end
  • encryption. The resource identified by the Refer-To URI is contacted using
  • the normal mechanisms for that URI type.

type ReplyTo

type ReplyTo struct {
	AddressParameters
}

* * ReplyTo Header.

func NewReplyTo

func NewReplyTo() *ReplyTo

* Default constructor

func NewReplyToFromAddress

func NewReplyToFromAddress(addr address.Address) *ReplyTo
  • Default constructor given an address. * *@param address -- address of this header. *

func (*ReplyTo) EncodeBody

func (this *ReplyTo) EncodeBody() string

*

  • Encode the header content into a String.
  • @return String

func (*ReplyTo) GetDisplayName

func (this *ReplyTo) GetDisplayName() string

*

  • Get the display name from the address.
  • @return String

func (*ReplyTo) GetHostPort

func (this *ReplyTo) GetHostPort() *core.HostPort

*

  • Conveniance accessor function to get the hostPort field from the address
  • @return HostPort

func (*ReplyTo) String

func (this *ReplyTo) String() string

type ReplyToHeader

type ReplyToHeader interface {
	AddressHeader
	ParametersHeader
}

type RequestLine

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

* * RequestLine of SIP Request.

func NewRequestLine

func NewRequestLine() *RequestLine

* Default constructor

func NewRequestLineFromString

func NewRequestLineFromString(requestURI address.URI, method string) *RequestLine

* Constructor given the request URI and the method.

func (*RequestLine) GetMethod

func (this *RequestLine) GetMethod() string

*

  • Get the Method *
  • @return method string.

func (*RequestLine) GetSipVersion

func (this *RequestLine) GetSipVersion() string

*

  • Get the SIP version. *
  • @return String

func (*RequestLine) GetUri

func (this *RequestLine) GetUri() address.URI
  • Get the Request-URI. *
  • @return the request URI

func (*RequestLine) GetVersionMajor

func (this *RequestLine) GetVersionMajor() string

* * Get the major verrsion number. * *@return String major version number

func (*RequestLine) GetVersionMinor

func (this *RequestLine) GetVersionMinor() string

*

  • Get the minor version number. * *@return String minor version number *

func (*RequestLine) SetMethod

func (this *RequestLine) SetMethod(method string)

*

  • Set the method member *
  • @param method String to Set

func (*RequestLine) SetSIPVersion

func (this *RequestLine) SetSIPVersion(sipVersion string)

* Set the SIP version. *@param sipVersion -- the SIP version to Set.

func (*RequestLine) SetSipVersion

func (this *RequestLine) SetSipVersion(s string)

*

  • Set the sipVersion member *
  • @param s String to Set

func (*RequestLine) SetUri

func (this *RequestLine) SetUri(uri address.URI)

*

  • Set the uri member.
  • @param uri URI to Set.

func (*RequestLine) String

func (this *RequestLine) String() string
  • Encode the request line as a String. *
  • @return requestLine encoded as a string.

type Require

type Require struct {
	SIPHeader
	// contains filtered or unexported fields
}

* *Require SIP Header.

func NewRequire

func NewRequire() *Require

* Default constructor

  • @param s String to set

func NewRequireFromString

func NewRequireFromString(s string) *Require

* constructor

  • @param s String to set

func (*Require) EncodeBody

func (this *Require) EncodeBody() string

*

  • Encode in canonical form.
  • @return String

func (*Require) GetOptionTag

func (this *Require) GetOptionTag() string

*

  • Gets the option tag of this OptionTag class. *
  • @return the string that identifies the option tag value.

func (*Require) SetOptionTag

func (this *Require) SetOptionTag(optionTag string) (ParseException error)

*

  • Sets the option tag value to the new supplied <var>optionTag</var>
  • parameter. *
  • @param optionTag - the new string value of the option tag.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the optionTag value.

func (*Require) String

func (this *Require) String() string

type RequireHeader

type RequireHeader interface {
	OptionTag
	Header
}

type RequireList

type RequireList struct {
	SIPHeaderList
}

* * List of Require headers. * <pre> * Require = "Require" ":" 1#option-tag * </pre>

func NewRequireList

func NewRequireList() *RequireList

* Default constructor

type RetryAfter

type RetryAfter struct {
	Parameters
	// contains filtered or unexported fields
}

* Retry-After SIP Header.

func NewRetryAfter

func NewRetryAfter() *RetryAfter

* Default constructor

func (*RetryAfter) EncodeBody

func (this *RetryAfter) EncodeBody() string

* Encode body of this into cannonical form.

  • @return encoded body

func (*RetryAfter) GetComment

func (this *RetryAfter) GetComment() string

func (*RetryAfter) GetDuration

func (this *RetryAfter) GetDuration() int

func (*RetryAfter) GetRetryAfter

func (this *RetryAfter) GetRetryAfter() int

func (*RetryAfter) HasComment

func (this *RetryAfter) HasComment() bool

* Boolean function

  • @return true if comment exist, false otherwise

func (*RetryAfter) RemoveComment

func (this *RetryAfter) RemoveComment()

* remove comment field

func (*RetryAfter) RemoveDuration

func (this *RetryAfter) RemoveDuration()

* remove duration field

func (*RetryAfter) SetComment

func (this *RetryAfter) SetComment(comment string) (ParseException error)

func (*RetryAfter) SetDuration

func (this *RetryAfter) SetDuration(duration int) (InvalidArgumentException error)

func (*RetryAfter) SetRetryAfter

func (this *RetryAfter) SetRetryAfter(retryAfter int) (InvalidArgumentException error)

func (*RetryAfter) String

func (this *RetryAfter) String() string

type RetryAfterHeader

type RetryAfterHeader interface {
	ParametersHeader

	SetRetryAfter(retryAfter int) (InvalidArgumentException error)

	GetRetryAfter() int

	GetComment() string

	SetComment(comment string) (ParseException error)

	SetDuration(duration int) (InvalidArgumentException error)

	GetDuration() int
}

type Route

type Route struct {
	AddressParameters
}

func NewRoute

func NewRoute() *Route

* Default constructor

func NewRouteFromAddress

func NewRouteFromAddress(addr address.Address) *Route
  • Default constructor given an address. * *@param address -- address of this header. *

func (*Route) EncodeBody

func (this *Route) EncodeBody() string

*

  • Encode into canonical form.
  • Acknowledgement: contains a bug fix for a bug reported by
  • Laurent Schwizer * *@return a canonical encoding of the header.

func (*Route) HashCode

func (this *Route) HashCode() int

*

  • Hashcode so this header can be inserted into a set. * *@return the hashcode of the encoded address.

func (*Route) String

func (this *Route) String() string

type RouteHeader

type RouteHeader interface {
	AddressHeader
	ParametersHeader
}

*

  • The Route header field is used to force routing for a request through the
  • listed set of proxies. Each host removes the first entry and then proxies
  • the Request to the host listed in that entry using it as the RequestURI.
  • <p>
  • Explicit Route assignment (if needed) for the initial dialog establishment
  • is the applications responsibility, but once established Routes are
  • maintained by the dialog layer and should not be manupulated by the
  • application. For example the SipProvider queries the dialog for Route
  • assignment and adds these to the outgoing message as needed. The
  • {@link javax.sip.address.Router} may be used by the application to determine
  • the initial Route of the message. *
  • @see RecordRouteHeader
  • @see AddressHeader
  • @see Parameters *

type RouteList

type RouteList struct {
	SIPHeaderList
}

* * A list of Route Headers.

func NewRouteList

func NewRouteList() *RouteList

* default constructor

type SIPHeader

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

* * Root class from which all Header objects are subclassed.

func NewSIPHeader

func NewSIPHeader(hname string) *SIPHeader

* Constructor

  • @param hname String to set

func (*SIPHeader) Clone

func (this *SIPHeader) Clone() interface{}

func (*SIPHeader) EncodeBody

func (this *SIPHeader) EncodeBody() string

* Encode the body of this header (the stuff that follows headerName). * A.K.A headerValue.

func (*SIPHeader) GetHeaderName

func (this *SIPHeader) GetHeaderName() string

*

  • Name of the Header
  • @return String

func (*SIPHeader) GetHeaderValue

func (this *SIPHeader) GetHeaderValue() string

* Get the header value (i.e. what follows the name:). * This merely goes through and lops off the portion that follows * the headerName:

func (*SIPHeader) GetName

func (this *SIPHeader) GetName() string

* Alias for getHaderName above. * *@return String headerName *

func (*SIPHeader) GetValue

func (this *SIPHeader) GetValue() string

* Alias for getHeaderValue.

func (*SIPHeader) IsHeaderList

func (this *SIPHeader) IsHeaderList() bool

* Return false if this is not a header list * (SIPHeaderList overrrides this method). *@return false

func (*SIPHeader) SetHeaderName

func (this *SIPHeader) SetHeaderName(hdrname string)

*

  • Set the name of the header .
  • @param hdrname String to set

func (*SIPHeader) String

func (this *SIPHeader) String() string

* Encode this header into canonical form.

type SIPHeaderList

type SIPHeaderList struct {
	SIPHeader
	list.List
}

*

  • This is the root class for all lists of SIP headers.
  • It imbeds a SIPObjectList object and extends Header
  • Lists of ContactSIPObjects etc. derive from this class.
  • This supports homogeneous lists (all elements in the list are of
  • the same class). We use this for building type homogeneous lists of
  • SIPObjects that appear in SIPHeaders * *

func NewSIPHeaderList

func NewSIPHeaderList(hname string) *SIPHeaderList

* Constructor

  • @param hl SIPObjectList to set
  • @param hname String to set

func (*SIPHeaderList) Clone

func (this *SIPHeaderList) Clone() interface{}

*

  • Implement the clone method.

func (*SIPHeaderList) Concatenate

func (this *SIPHeaderList) Concatenate(shl SIPHeaderLister, topFlag bool)

func (*SIPHeaderList) EncodeBody

func (this *SIPHeaderList) EncodeBody() string

* Encode the body of this header (the stuff that follows headerName).

  • A.K.A headerValue. This will not give a reasonable result for *WWW-Authenticate, Authorization, Proxy-Authenticate and *Proxy-Authorization and hence this is protected.

func (*SIPHeaderList) GetHeadersAsEncodedStrings

func (this *SIPHeaderList) GetHeadersAsEncodedStrings() *list.List
  • Get the headers as a linked list of encoded Strings *@return a linked list with each element of the list containing a
  • string encoded header in canonical form.

func (*SIPHeaderList) IsHeaderList

func (this *SIPHeaderList) IsHeaderList() bool

func (*SIPHeaderList) String

func (this *SIPHeaderList) String() string

*

  • Encode a list of sip headers.
  • Headers are returned in cannonical form.
  • @return String encoded string representation of this list of
  • headers. (Contains string append of each encoded header).

type SIPHeaderLister

type SIPHeaderLister interface {
	Header
	Lister
	GetHeadersAsEncodedStrings() *list.List
	Concatenate(shl SIPHeaderLister, topFlag bool)
}

type Server

type Server struct {
	SIPHeader
	// contains filtered or unexported fields
}

* *Supported SIP Header.

func NewServer

func NewServer() *Server

*

  • Constructor.

func (*Server) AddProductToken

func (this *Server) AddProductToken(pt string)

* set the productToken field

  • @param pt String to set

func (*Server) EncodeBody

func (this *Server) EncodeBody() string

* Encode only the body of this header. *@return encoded value of the header.

func (*Server) EncodeProduct

func (this *Server) EncodeProduct() string

*

  • Return canonical form.
  • @return String

func (*Server) GetProduct

func (this *Server) GetProduct() *list.List

*

  • Returns the list value of the product parameter. *
  • @return the software of this UserAgentHeader

func (*Server) SetProduct

func (this *Server) SetProduct(product *list.List) (ParseException error)

*

  • Sets the product value of the UserAgentHeader. *
  • @param product - a List specifying the product value
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the product value.

func (*Server) String

func (this *Server) String() string

type ServerHeader

type ServerHeader interface {
	Header

	/**
	 * Returns a ListIterator over the List of product values.
	 *
	 * @return a ListIterator over the List of strings identifying the
	 * software of this ServerHeader
	 */
	GetProduct() *list.List

	/**
	 * Sets the List of product values of the ServerHeader.
	 *
	 * @param product - a List of Strings specifying the product values
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the List of product value strings.
	 */
	SetProduct(product *list.List) (ParseException error)
}

*

  • The Server header field contains information about the software used by
  • the UAS to handle the request. Revealing the specific software version of
  • the server might allow the server to become more vulnerable to attacks
  • against software that is known to contain security holes. Implementers
  • SHOULD make the Server header field a configurable option. If the Response
  • is being forwarded through a proxy, the proxy application must not modify
  • the ServerHeaders. Instead, it should include a ViaHeader.
  • <p>
  • For Example:<br>
  • <code>Server: HomeServer v2</code> *
  • @see ViaHeader
  • @see UserAgentHeader

type StatusLine

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

func NewStatusLine

func NewStatusLine() *StatusLine

* Default Constructor

func (*StatusLine) GetReasonPhrase

func (this *StatusLine) GetReasonPhrase() string

* Get the ReasonPhrase field

  • @return ReasonPhrase field

func (*StatusLine) GetSipVersion

func (this *StatusLine) GetSipVersion() string

* Get the Sip Version

  • @return SipVersion

func (*StatusLine) GetStatusCode

func (this *StatusLine) GetStatusCode() int

* Get the Status Code

  • @return StatusCode

func (*StatusLine) GetVersionMajor

func (this *StatusLine) GetVersionMajor() string

*

  • Get the major version number. *@return String major version number

func (*StatusLine) GetVersionMinor

func (this *StatusLine) GetVersionMinor() string

*

  • Get the minor version number. *@return String minor version number

func (*StatusLine) SetMatchStatusClass

func (this *StatusLine) SetMatchStatusClass(flag bool)
  • Set the flag on a match template. *If this Set to true, then the whole status code is matched (default
  • behavior) else only the class of the response is matched.

func (*StatusLine) SetReasonPhrase

func (this *StatusLine) SetReasonPhrase(reasonPhrase string)

*

  • Set the reasonPhrase member
  • @param reasonPhrase String to Set

func (*StatusLine) SetSipVersion

func (this *StatusLine) SetSipVersion(s string)

*

  • Set the sipVersion member
  • @param s String to Set

func (*StatusLine) SetStatusCode

func (this *StatusLine) SetStatusCode(statusCode int)

*

  • Set the statusCode member
  • @param statusCode int to Set

func (*StatusLine) String

func (this *StatusLine) String() string

*

  • Encode into a canonical form.
  • @return String

type Subject

type Subject struct {
	SIPHeader
	// contains filtered or unexported fields
}

* *Supported SIP Header.

func NewSubject

func NewSubject() *Subject

* Default Constructor.

func (*Subject) EncodeBody

func (this *Subject) EncodeBody() string

*

  • Generate the canonical form.
  • @return String.

func (*Subject) GetSubject

func (this *Subject) GetSubject() string

func (*Subject) SetSubject

func (this *Subject) SetSubject(subject string) (ParseException error)

func (*Subject) String

func (this *Subject) String() string

type SubjectHeader

type SubjectHeader interface {
	Header

	SetSubject(subject string) (ParseException error)

	GetSubject() string
}

type SubscriptionState

type SubscriptionState struct {
	Parameters
	// contains filtered or unexported fields
}

* *SubscriptionState header

func NewSubscriptionState

func NewSubscriptionState() *SubscriptionState

* Creates a new instance of SubscriptionState

func (*SubscriptionState) EncodeBody

func (this *SubscriptionState) EncodeBody() string

* Just the encoded body of the header.

  • @return the string encoded header body.

func (*SubscriptionState) GetExpires

func (this *SubscriptionState) GetExpires() int

*

  • Gets the expires value of the SubscriptionStateHeader. This expires value is
  • relative time. *
  • @return the expires value of the SubscriptionStateHeader.

func (*SubscriptionState) GetReasonCode

func (this *SubscriptionState) GetReasonCode() string

*

  • Gets the reason code of SubscriptionStateHeader. *
  • @return the comment of this SubscriptionStateHeader, return null if no reason code
  • is available.

func (*SubscriptionState) GetRetryAfter

func (this *SubscriptionState) GetRetryAfter() int

*

  • Gets the retry after value of the SubscriptionStateHeader. This retry after
  • value is relative time. *
  • @return the retry after value of the SubscriptionStateHeader.

func (*SubscriptionState) GetState

func (this *SubscriptionState) GetState() string

*

  • Gets the state of SubscriptionStateHeader. *
  • @return the state of this SubscriptionStateHeader.

func (*SubscriptionState) SetExpires

func (this *SubscriptionState) SetExpires(expires int) (InvalidArgumentException error)

*

  • Sets the relative expires value of the SubscriptionStateHeader. The
  • expires value MUST be greater than zero and MUST be less than 2**31. *
  • @param expires - the new expires value of this SubscriptionStateHeader.
  • @throws InvalidArgumentException if supplied value is less than zero.

func (*SubscriptionState) SetReasonCode

func (this *SubscriptionState) SetReasonCode(reasonCode string) (ParseException error)

*

  • Sets the reason code value of the SubscriptionStateHeader. *
  • @param reasonCode - the new reason code string value of the SubscriptionStateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the reason code.

func (*SubscriptionState) SetRetryAfter

func (this *SubscriptionState) SetRetryAfter(retryAfter int) (InvalidArgumentException error)

*

  • Sets the retry after value of the SubscriptionStateHeader. The retry after value
  • MUST be greater than zero and MUST be less than 2**31. *
  • @param retryAfter - the new retry after value of this SubscriptionStateHeader
  • @throws InvalidArgumentException if supplied value is less than zero.

func (*SubscriptionState) SetState

func (this *SubscriptionState) SetState(state string) (ParseException error)

*

  • Sets the state value of the SubscriptionStateHeader. *
  • @param state - the new state string value of the SubscriptionStateHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the state.

func (*SubscriptionState) String

func (this *SubscriptionState) String() string

type SubscriptionStateHeader

type SubscriptionStateHeader interface {
	ParametersHeader

	/**
	 * Sets the relative expires value of the SubscriptionStateHeader. The
	 * expires value MUST be greater than zero and MUST be less than 2**31.
	 *
	 * @param expires - the new expires value of this SubscriptionStateHeader.
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 */
	SetExpires(expires int) (InvalidArgumentException error)

	/**
	 * Gets the expires value of the SubscriptionStateHeader. This expires value is
	 * relative time.
	 *
	 * @return the expires value of the SubscriptionStateHeader.
	 */
	GetExpires() int

	/**
	 * Sets the retry after value of the SubscriptionStateHeader. The retry after value
	 * MUST be greater than zero and MUST be less than 2**31.
	 *
	 * @param retryAfter - the new retry after value of this SubscriptionStateHeader
	 * @throws InvalidArgumentException if supplied value is less than zero.
	 */
	SetRetryAfter(retryAfter int) (InvalidArgumentException error)

	/**
	 * Gets the retry after value of the SubscriptionStateHeader. This retry after
	 * value is relative time.
	 *
	 * @return the retry after value of the SubscriptionStateHeader.
	 */
	GetRetryAfter() int

	/**
	 * Gets the reason code of SubscriptionStateHeader.
	 *
	 * @return the comment of this SubscriptionStateHeader, return null if no reason code
	 * is available.
	 */
	GetReasonCode() string

	/**
	 * Sets the reason code value of the SubscriptionStateHeader.
	 *
	 * @param reasonCode - the new reason code string value of the SubscriptionStateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the reason code.
	 */
	SetReasonCode(reasonCode string) (ParseException error)

	/**
	 * Gets the state of SubscriptionStateHeader.
	 *
	 * @return the state of this SubscriptionStateHeader.
	 */
	GetState() string

	/**
	 * Sets the state value of the SubscriptionStateHeader.
	 *
	 * @param state - the new state string value of the SubscriptionStateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the state.
	 */
	SetState(state string) (ParseException error)
}

type Supported

type Supported struct {
	SIPHeader
	// contains filtered or unexported fields
}

* *Supported SIP Header.

func NewSupported

func NewSupported() *Supported

* default constructor

func NewSupportedFromString

func NewSupportedFromString(option_tag string) *Supported

* Constructor

  • @param option_tag String to set

func (*Supported) EncodeBody

func (this *Supported) EncodeBody() string

* Just the encoded body of the header. *@return the string encoded header body.

func (*Supported) GetOptionTag

func (this *Supported) GetOptionTag() string

*

  • Gets the option tag of this OptionTag class. *
  • @return the string that identifies the option tag value.

func (*Supported) SetOptionTag

func (this *Supported) SetOptionTag(optionTag string) (ParseException error)

*

  • Sets the option tag value to the new supplied <var>optionTag</var>
  • parameter. *
  • @param optionTag - the new string value of the option tag.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the optionTag value.

func (*Supported) String

func (this *Supported) String() string

* Return canonical form of the header.

  • @return encoded header.

type SupportedHeader

type SupportedHeader interface {
	OptionTag
	Header
}

type SupportedList

type SupportedList struct {
	SIPHeaderList
}

func NewSupportedList

func NewSupportedList() *SupportedList

* Default Constructor

type TimeStamp

type TimeStamp struct {
	SIPHeader
	// contains filtered or unexported fields
}

func NewTimeStamp

func NewTimeStamp() *TimeStamp

* Default Constructor

func (*TimeStamp) EncodeBody

func (this *TimeStamp) EncodeBody() string

*

  • Return canonical form of the header.
  • @return String

func (*TimeStamp) GetDelay

func (this *TimeStamp) GetDelay() float32

*

  • Gets delay of TimeStampHeader. This method return <code>-1</code> if the
  • delay paramater is not set. *
  • @return the delay value of this TimeStampHeader

func (*TimeStamp) GetTimeStamp

func (this *TimeStamp) GetTimeStamp() float32

*

  • Gets the timestamp value of this TimeStampHeader. *
  • @return the timestamp value of this TimeStampHeader

func (*TimeStamp) HasDelay

func (this *TimeStamp) HasDelay() bool

* return true if delay exists

  • @return boolean

func (*TimeStamp) RemoveDelay

func (this *TimeStamp) RemoveDelay()

remove the Delay field

func (*TimeStamp) SetDelay

func (this *TimeStamp) SetDelay(delay float32) (InvalidArgumentException error)

func (*TimeStamp) SetTimeStamp

func (this *TimeStamp) SetTimeStamp(timeStamp float32) (InvalidArgumentException error)

*

  • Sets the timestamp value of this TimeStampHeader to the new timestamp
  • value passed to this method. *
  • @param timestamp - the new float timestamp value
  • @throws InvalidArgumentException if the timestamp value argument is a
  • negative value.

func (*TimeStamp) String

func (this *TimeStamp) String() string

type TimeStampHeader

type TimeStampHeader interface {
	Header

	/**
	 * Sets the timestamp value of this TimeStampHeader to the new timestamp
	 * value passed to this method.
	 *
	 * @param timestamp - the new float timestamp value
	 * @throws InvalidArgumentException if the timestamp value argument is a
	 * negative value.
	 */
	SetTimeStamp(timeStamp float32) (InvalidArgumentException error)

	/**
	 * Gets the timestamp value of this TimeStampHeader.
	 *
	 * @return the timestamp value of this TimeStampHeader
	 */
	GetTimeStamp() float32

	GetDelay() float32

	SetDelay(delay float32) (InvalidArgumentException error)
}

type To

type To struct {
	AddressParameters
}

* *To SIP Header.

func NewTo

func NewTo() *To

* default Constructor.

func (*To) CloneFrom

func (this *To) CloneFrom(from *From)

* Generate a TO header from a FROM header

func (*To) EncodeBody

func (this *To) EncodeBody() string

*

  • Encode the header content into a String.
  • @return String

func (*To) GetDisplayName

func (this *To) GetDisplayName() string

*

  • Get the display name from the address.
  • @return Display name

func (*To) GetHostPort

func (this *To) GetHostPort() (*core.HostPort, error)

*

  • Conveniance accessor function to get the hostPort field from the address.
  • Warning -- this assumes that the embedded URI is a SipURL. *
  • @return hostport field

func (*To) GetTag

func (this *To) GetTag() string

*

  • Get the tag parameter from the address parm list.
  • @return tag field

func (*To) GetUserAtHostPort

func (this *To) GetUserAtHostPort() string

* Get the user@host port string.

func (*To) HasTag

func (this *To) HasTag() bool

* Boolean function

  • @return true if the Tag exist

func (*To) RemoveTag

func (this *To) RemoveTag()

* remove Tag member

func (*To) SetTag

func (this *To) SetTag(t string) (ParseException error)

*

  • Set the tag member. This should be set to null for the initial request
  • in a dialog.
  • @param t tag String to set.

func (*To) String

func (this *To) String() string

*

  • Encode the header into a String.
  • @since 1.0
  • @return String

type ToHeader

type ToHeader interface {
	AddressHeader
	ParametersHeader

	/**
	 * Sets the tag parameter of the ToHeader. The tag in the To field of a
	 * request identifies the peer of the dialog. If no dialog is established,
	 * no tag is present.
	 * <p>
	 * The To Header MUST contain a new "tag" parameter. When acting as a UAC
	 * the To "tag" is maintained by the SipProvider from the dialog layer,
	 * however whan acting as a UAS the To "tag" is assigned by the application.
	 * That is the tag assignment for outbound responses for messages in a
	 * dialog is only the responsibility of the application for the first
	 * outbound response. After dialog establishment, the stack will take care
	 * of the tag assignment.
	 *
	 * @param tag - the new tag of the To Header
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Tag value.
	 */
	SetTag(tag string) (ParseException error)

	/**
	 * Gets tag of ToHeader. The Tag parameter identified the Peer of the
	 * dialogue.
	 *
	 * @return the tag parameter of the ToHeader. Returns null if no Tag is
	 * present, i.e no dialogue is established.
	 */
	GetTag() string
}

*

  • The To header field first and foremost specifies the desired "logical"
  • recipient of the request, or the address-of-record of the user or resource
  • that is the target of this request. This may or may not be the ultimate
  • recipient of the request. Requests and Responses must contain a ToHeader,
  • indicating the desired recipient of the Request. The UAS or redirect server
  • copies the ToHeader into its Response.
  • <p>
  • The To header field MAY contain a SIP or SIPS URI, but it may also make use
  • of other URI schemes i.e the telURL, when appropriate. All SIP
  • implementations MUST support the SIP URI scheme. Any implementation that
  • supports TLS MUST support the SIPS URI scheme. Like the From header field,
  • it contains a URI and optionally a display name, encapsulated in a
  • {@link javax.sip.address.Address}.
  • <p>
  • A UAC may learn how to populate the To header field for a particular request
  • in a number of ways. Usually the user will suggest the To header field
  • through a human interface, perhaps inputting the URI manually or selecting
  • it from some sort of address book. Using the string to form the user part
  • of a SIP URI implies that the User Agent wishes the name to be resolved in the
  • domain to the right-hand side (RHS) of the at-sign in the SIP URI. Using
  • the string to form the user part of a SIPS URI implies that the User Agent wishes to
  • communicate securely, and that the name is to be resolved in the domain to
  • the RHS of the at-sign. The RHS will frequently be the home domain of the
  • requestor, which allows for the home domain to process the outgoing request.
  • This is useful for features like "speed dial" that require interpretation of
  • the user part in the home domain.
  • <p>
  • The telURL may be used when the User Agent does not wish to specify the domain that
  • should interpret a telephone number that has been input by the user. Rather,
  • each domain through which the request passes would be given that opportunity.
  • As an example, a user in an airport might log in and send requests through
  • an outbound proxy in the airport. If they enter "411" (this is the phone
  • number for local directory assistance in the United States), that needs to
  • be interpreted and processed by the outbound proxy in the airport, not the
  • user's home domain. In this case, tel:411 would be the right choice.
  • <p>
  • Two To header fields are equivalent if their URIs match, and their
  • parameters match. Extension parameters in one header field, not present in
  • the other are ignored for the purposes of comparison. This means that the
  • display name and presence or absence of angle brackets do not affect
  • matching.
  • <ul>
  • <li> The "Tag" parameter - is used in the To and From header fields of SIP
  • messages. It serves as a general mechanism to identify a dialog, which is
  • the combination of the Call-ID along with two tags, one from each
  • participant in the dialog. When a UA sends a request outside of a dialog,
  • it contains a From tag only, providing "half" of the dialog ID. The dialog
  • is completed from the response(s), each of which contributes the second half
  • in the To header field. When a tag is generated by a UA for insertion into
  • a request or response, it MUST be globally unique and cryptographically
  • random with at least 32 bits of randomness. Besides the requirement for
  • global uniqueness, the algorithm for generating a tag is implementation
  • specific. Tags are helpful in fault tolerant systems, where a dialog is to
  • be recovered on an alternate server after a failure. A UAS can select the
  • tag in such a way that a backup can recognize a request as part of a dialog
  • on the failed server, and therefore determine that it should attempt to
  • recover the dialog and any other state associated with it.
  • </ul>
  • A request outside of a dialog MUST NOT contain a To tag; the tag in the To
  • field of a request identifies the peer of the dialog. Since no dialog is
  • established, no tag is present.
  • <p>
  • For Example:<br>
  • <code>To: Carol sip:carol@jcp.org<br>
  • To: Duke sip:duke@jcp.org;tag=287447</code> *
  • @see AddressHeader

type Unsupported

type Unsupported struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * the Unsupported header.

func NewUnsupported

func NewUnsupported() *Unsupported

* Default Constructor.

func NewUnsupportedFromString

func NewUnsupportedFromString(ot string) *Unsupported

* Constructor

  • @param ot String to set

func (*Unsupported) EncodeBody

func (this *Unsupported) EncodeBody() string

*

  • Return a canonical value.
  • @return String.

func (*Unsupported) GetOptionTag

func (this *Unsupported) GetOptionTag() string

* get the option tag field

  • @return option Tag field

func (*Unsupported) SetOptionTag

func (this *Unsupported) SetOptionTag(o string) (ParseException error)

*

  • Set the option member
  • @param o String to set

func (*Unsupported) String

func (this *Unsupported) String() string

type UnsupportedHeader

type UnsupportedHeader interface {
	OptionTag
	Header
}

type UnsupportedList

type UnsupportedList struct {
	SIPHeaderList
}

* * List of Unsupported headers.

func NewUnsupportedList

func NewUnsupportedList() *UnsupportedList

* Default Constructor

type UserAgent

type UserAgent struct {
	SIPHeader
	// contains filtered or unexported fields
}

* * the UserAgent SIPObject.

func NewUserAgent

func NewUserAgent() *UserAgent

*

  • Constructor.

func (*UserAgent) AddProductToken

func (this *UserAgent) AddProductToken(pt string)

* set the productToken field

  • @param pt String to set

func (*UserAgent) EncodeBody

func (this *UserAgent) EncodeBody() string

* Encode only the body of this header. *@return encoded value of the header.

func (*UserAgent) EncodeProduct

func (this *UserAgent) EncodeProduct() string

*

  • Return canonical form.
  • @return String

func (*UserAgent) GetProduct

func (this *UserAgent) GetProduct() *list.List

*

  • Returns the list value of the product parameter. *
  • @return the software of this UserAgentHeader

func (*UserAgent) SetProduct

func (this *UserAgent) SetProduct(product *list.List) (ParseException error)

*

  • Sets the product value of the UserAgentHeader. *
  • @param product - a List specifying the product value
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the product value.

func (*UserAgent) String

func (this *UserAgent) String() string

type UserAgentHeader

type UserAgentHeader interface {
	Header

	/**
	 * Returns the List of product values.
	 *
	 * @return the List of strings identifying the software of this ServerHeader
	 */
	GetProduct() *list.List

	/**
	 * Sets the List of product values of the ServerHeader.
	 *
	 * @param product - a List of Strings specifying the product values
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the List of product value strings.
	 */
	SetProduct(product *list.List) (ParseException error)
}

*

  • The User-Agent header field contains information about the UAC originating
  • the request. This is for statistical purposes, the tracing of protocol
  • violations, and automated recognition of user agents for the sake of
  • tailoring Responses to avoid particular user agent limitations. However
  • revealing the specific software version of the user agent might allow the
  • user agent to become more vulnerable to attacks against software that is
  • known to contain security holes. Implementers SHOULD make the User-Agent
  • header field a configurable option.
  • <p>
  • For Example:<br>
  • <code>User-Agent: Softphone Beta1.5</code> *
  • @see ServerHeader
  • @see ViaHeader

type Via

type Via struct {
	Parameters
	// contains filtered or unexported fields
}

func NewVia

func NewVia() *Via

* Default constructor

func (*Via) EncodeBody

func (this *Via) EncodeBody() string

* Encode the body of this header (the stuff that follows headerName).

  • A.K.A headerValue.

func (*Via) GetBranch

func (this *Via) GetBranch() string

*

  • Gets the branch paramater of the ViaHeader. Returns null if branch
  • does not exist. *
  • @return the string branch value of ViaHeader

func (*Via) GetComment

func (this *Via) GetComment() string

*

  • Accessor for the comment field.
  • @return comment field.

func (*Via) GetHost

func (this *Via) GetHost() string

*

  • Returns the host part of this ViaHeader. *
  • @return the string value of the host

func (*Via) GetMAddr

func (this *Via) GetMAddr() string

*

  • Returns the value of the <code>maddr</code> parameter, or null if this
  • is not set. *
  • @return the string value of the maddr parameter

func (*Via) GetMaddr

func (this *Via) GetMaddr() *core.Host

*

  • Get the maddr parameter if it exists.
  • @return maddr parameter.

func (*Via) GetPort

func (this *Via) GetPort() int

*

  • Returns the port part of this ViaHeader. *
  • @return the integer value of the port

func (*Via) GetProtocol

func (this *Via) GetProtocol() string

*

  • Returns the value of the protocol used. *
  • @return the string value of the protocol paramter of the ViaHeader

func (*Via) GetProtocolVersion

func (this *Via) GetProtocolVersion() string

* get the Protocol Version

  • @return String

func (*Via) GetReceived

func (this *Via) GetReceived() string

*

  • Gets the received paramater of the ViaHeader. Returns null if received
  • does not exist. *
  • @return the string received value of ViaHeader

func (*Via) GetSentBy

func (this *Via) GetSentBy() *core.HostPort

*

  • Accessor for the sentBy field *@return SentBy field

func (*Via) GetSentProtocol

func (this *Via) GetSentProtocol() *Protocol

*

  • Accessor for the sentProtocol field.
  • @return Protocol field

func (*Via) GetTTL

func (this *Via) GetTTL() int

*

  • Returns the value of the ttl parameter, or -1 if this is not set. *
  • @return the integer value of the <code>ttl</code> parameter

func (*Via) GetTransport

func (this *Via) GetTransport() string

*

  • Returns the value of the transport parameter. *
  • @return the string value of the transport paramter of the ViaHeader

func (*Via) GetViaParms

func (this *Via) GetViaParms() *core.NameValueList

*

  • Accessor for the parameters field
  • @return parameters field

func (*Via) HasComment

func (this *Via) HasComment() bool
  • comment of the Via Header. *
  • @return false if comment does not exist and true otherwise.

func (*Via) HasPort

func (this *Via) HasPort() bool

* port of the Via Header.

  • @return true if Port exists.

func (*Via) RemoveComment

func (this *Via) RemoveComment()

* remove the comment field.

func (*Via) RemovePort

func (this *Via) RemovePort()

* remove the port.

func (*Via) SetBranch

func (this *Via) SetBranch(branch string) (ParseException error)

*

  • Sets the branch parameter of the ViaHeader to the newly supplied
  • branch value. *
  • @param branch - the new string branch parmameter of the ViaHeader.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the branch value.

func (*Via) SetComment

func (this *Via) SetComment(c string)

*

  • Set the comment member
  • @param c String to set.

func (*Via) SetHost

func (this *Via) SetHost(host *core.Host)

* set the Host of the Via Header

  • @param host String to set

func (*Via) SetHostFromString

func (this *Via) SetHostFromString(host string) (ParseException error)

*

  • Set the host part of this ViaHeader to the newly supplied <code>host</code>
  • parameter. *
  • @return host - the new interger value of the host of this ViaHeader
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the host value.

func (*Via) SetMAddr

func (this *Via) SetMAddr(mAddr string) (ParseException error)

*

  • Sets the value of the <code>maddr</code> parameter of this ViaHeader. The
  • maddr parameter indicates the server address to be contacted for this
  • user, overriding any address derived from the host field. *
  • @param method - new value of the <code>maddr</code> parameter
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the mAddr value.

func (*Via) SetPort

func (this *Via) SetPort(port int)

*

  • Set the port part of this ViaHeader to the newly supplied <code>port</code>
  • parameter. *
  • @param port - the new interger value of the port of this ViaHeader

func (*Via) SetProtocol

func (this *Via) SetProtocol(protocol string) (ParseException error)

*

  • Sets the value of the protocol parameter. This parameter specifies
  • which protocol is used, for example "SIP/2.0". *
  • @param protocol - new value for the protocol parameter
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the protocol value.

func (*Via) SetProtocolVersion

func (this *Via) SetProtocolVersion(protocolVersion string)

* set the Protocol Version

  • @param protocolVersion String to set

func (*Via) SetReceived

func (this *Via) SetReceived(received string) (ParseException error)

*

  • Sets the received parameter of ViaHeader. *
  • @param received - the newly supplied received parameter.
  • @throws ParseException which signals that an error has been reached
  • unexpectedly while parsing the received value.

func (*Via) SetSentBy

func (this *Via) SetSentBy(s *core.HostPort)

*

  • Set the sentBy member
  • @param s HostPort to set.

func (*Via) SetSentProtocol

func (this *Via) SetSentProtocol(s *Protocol)

*

  • Set the sentProtocol member
  • @param s Protocol to set.

func (*Via) SetTTL

func (this *Via) SetTTL(ttl int) (InvalidArgumentException error)

*

  • Sets the value of the ttl parameter. The ttl parameter specifies the
  • time-to-live value when packets are sent using UDP multicast. *
  • @param ttl - new value of the ttl parameter
  • @throws InvalidArgumentException if supplied value is less than zero or
  • greater than 255, excluding -1 the default not set value.

func (*Via) String

func (this *Via) String() string

type ViaHeader

type ViaHeader interface {
	ParametersHeader

	/**
	 * Set the host part of this ViaHeader to the newly supplied <code>host</code>
	 * parameter.
	 *
	 * @return host - the new interger value of the host of this ViaHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the host value.
	 */
	SetHost(host string) (ParseException error)

	/**
	 * Returns the host part of this ViaHeader.
	 *
	 * @return  the string value of the host
	 */
	GetHost() string

	/**
	 * Set the port part of this ViaHeader to the newly supplied <code>port</code>
	 * parameter.
	 *
	 * @param port - the new interger value of the port of this ViaHeader
	 */
	SetPort(port int)

	/**
	 * Returns the port part of this ViaHeader.
	 *
	 * @return the integer value of the port
	 */
	GetPort() int

	/**
	 * Returns the value of the transport parameter.
	 *
	 * @return the string value of the transport paramter of the ViaHeader
	 */
	GetTransport() string

	/**
	 * Sets the value of the transport. This parameter specifies
	 * which transport protocol to use for sending requests and responses to
	 * this entity. The following values are defined: "udp", "tcp", "sctp",
	 * "tls", but other values may be used also.
	 *
	 * @param transport - new value for the transport parameter
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the transport value.
	 */
	SetTransport(transport string) (ParseException error)

	/**
	 * Returns the value of the protocol used.
	 *
	 * @return the string value of the protocol paramter of the ViaHeader
	 */
	GetProtocol() string

	/**
	 * Sets the value of the protocol parameter. This parameter specifies
	 * which protocol is used, for example "SIP/2.0".
	 *
	 * @param protocol - new value for the protocol parameter
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the protocol value.
	 */
	SetProtocol(protocol string) (ParseException error)

	/**
	 * Returns the value of the ttl parameter, or -1 if this is not set.
	 *
	 * @return the integer value of the <code>ttl</code> parameter
	 */
	GetTTL() int

	/**
	 * Sets the value of the ttl parameter. The ttl parameter specifies the
	 * time-to-live value when packets are sent using UDP multicast.
	 *
	 * @param ttl - new value of the ttl parameter
	 * @throws InvalidArgumentException if supplied value is less than zero or
	 * greater than 255, excluding -1 the default not set value.
	 */
	SetTTL(ttl int) (InvalidArgumentException error)

	/**
	 * Returns the value of the <code>maddr</code> parameter, or null if this
	 * is not set.
	 *
	 * @return the string value of the maddr parameter
	 */
	GetMAddr() string

	/**
	 * Sets the value of the <code>maddr</code> parameter of this ViaHeader. The
	 * maddr parameter indicates the server address to be contacted for this
	 * user, overriding any address derived from the host field.
	 *
	 * @param  method - new value of the <code>maddr</code> parameter
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the mAddr value.
	 */
	SetMAddr(mAddr string) (ParseException string)

	/**
	 * Gets the received paramater of the ViaHeader. Returns null if received
	 * does not exist.
	 *
	 * @return the string received value of ViaHeader
	 */
	GetReceived() string

	/**
	 * Sets the received parameter of ViaHeader.
	 *
	 * @param received - the newly supplied received parameter.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the received value.
	 */
	SetReceived(received string) (ParseException error)

	/**
	 * Gets the branch paramater of the ViaHeader. Returns null if branch
	 * does not exist.
	 *
	 * @return the string branch value of ViaHeader
	 */
	GetBranch() string

	/**
	 * Sets the branch parameter of the ViaHeader to the newly supplied
	 * branch value. Note that when sending a Request within a transaction,
	 * branch id management will be the responsibility of the SipProvider;
	 * that is the application should not set this value. This method should
	 * only be used by the application when sending Requests outside of a
	 * transaction.
	 *
	 * @param branch - the new string branch parmameter of the ViaHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the branch value.
	 */
	SetBranch(branch string) (ParseException error)
}

*

  • The Via header field indicates the transport used for the transaction and
  • identifies the location where the response is to be sent. A Via header
  • field value is added only after the transport that will be used to reach
  • the next hop has been selected. When the UAC creates a request, it MUST
  • insert a Via into that request. The protocol name and protocol version in
  • the header field MUST be SIP and 2.0, respectively. The Via header field
  • value MUST contain a branch parameter. This parameter is used to identify
  • the transaction created by that request. This parameter is used by both the
  • client and the server.
  • <p>
  • <b>Branch Paramater:<br></b>
  • The branch parameter value MUST be unique across space and time for all
  • requests sent by the User Agent. The exceptions to this rule are CANCEL and ACK for
  • non-2xx responses. A CANCEL request will have the same value of the branch
  • parameter as the request it cancels. An ACK for a non-2xx response will also
  • have the same branch ID as the INVITE whose response it acknowledges.
  • <p>
  • The uniqueness property of the branch ID parameter, to facilitate its use as
  • a transaction ID, was not part of RFC 2543. The branch ID inserted by an
  • element compliant with this specification MUST always begin with the
  • characters "z9hG4bK". These 7 characters are used as a magic cookie (7 is
  • deemed sufficient to ensure that an older RFC 2543 implementation would not
  • pick such a value), so that servers receiving the request can determine that
  • the branch ID was constructed in the fashion described by this specification
  • (that is, globally unique). Beyond this requirement, the precise format of
  • the branch token is implementation-defined. JAIN SIP defines a convenience
  • function to generate unique branch idenifiers at
  • {@link javax.sip.Transaction#getBranchId()}
  • <p>
  • A common way to create the branch value is to compute a cryptographic hash
  • of the To tag, From tag, Call-ID header field, the Request-URI of the
  • request received (before translation), the topmost Via header, and the
  • sequence number from the CSeq header field, in addition to any Proxy-Require
  • and Proxy-Authorization header fields that may be present. The algorithm
  • used to compute the hash is implementation-dependent.
  • <p>
  • <b>Via Processing Rules</b>
  • <ul>
  • <li>Generating Requests (UAC): The client originating the Request must insert
  • into the Request a ViaHeader containing its host name or network address
  • and, if not the default port number, the port number at which it wishes to
  • receive Responses. (Note that this port number can differ from the UDP
  • source port number of the Request.) A fully-qualified domain name is
  • recommended.
  • <li>Request Forwarding by Proxies: The proxy MUST insert a Via header field
  • value into the copy before the existing Via header field values. This
  • implies that the proxy will compute its own branch parameter, which will be
  • globally unique for that branch, and contain the requisite magic cookie. Note
  • that this implies that the branch parameter will be different for different
  • instances of a spiraled or looped request through a proxy. If a proxy server
  • receives a Request which contains its own address in a ViaHeader, it must
  • respond with a 482 (Loop Detected) Response. A proxy server must not forward
  • a Request to a multicast group which already appears in any of the ViaHeaders.
  • This prevents a malfunctioning proxy server from causing loops. Also, it
  • cannot be guaranteed that a proxy server can always detect that the address
  • returned by a location service refers to a host listed in the ViaHeader list,
  • as a single host may have aliases or several network interfaces.
  • <li>Response processing by UAC and proxies:
  • <ul>
  • <li>The first ViaHeader should indicate the proxy or client processing this
  • Response. If it does not, discard the Response. Otherwise, remove this
  • ViaHeader.
  • <li>If there is no second ViaHeader, this Response is destined for this
  • client. Otherwise, the processing depends on whether the ViaHeader contains
  • a maddr parameter or is a receiver-tagged field.
  • <li>If the second ViaHeader contains a maddr parameter, send the Response to
  • the multicast address listed there, using the port indicated in "sent-by",
  • or port 5060 if none is present. The Response should be sent using the TTL
  • indicated in the ttl parameter, or with a TTL of 1 if that parameter is not
  • present. For robustness, Responses must be sent to the address indicated in
  • the maddr parameter even if it is not a multicast address.
  • <li>If the second ViaHeader does not contain a maddr parameter and is a
  • receiver-tagged ViaHeader, send the Response to the address in the received
  • parameter, using the port indicated in the port value, or using port 5060
  • if none is present.
  • <li>If neither of the previous cases apply, send the Response to the address
  • indicated by the host value in the second ViaHeader.
  • </ul>
  • <li>Sending Responses (UAS):
  • <ul>
  • <li>If the first ViaHeader in the Request contains a maddr parameter, send
  • the Response to the multicast address listed there, using the port indicated,
  • or port 5060 if none is present. The Response should be sent using the TTL
  • indicated in the ttl parameter, or with a TTL of 1 if that parameter is not
  • present. For robustness, Responses must be sent to the address indicated in
  • the maddr parameter even if it is not a multicast address.
  • <li>If the address in the first ViaHeader differs from the source address of
  • the packet, send the Response to the actual packet source address, similar
  • to the treatment for receiver-tagged ViaHeaders.
  • <li>If neither of these conditions is true, send the Response to the address
  • contained in the host value. If the Request was sent using TCP, use the
  • existing TCP connection if available.
  • </ul>
  • </ul>
  • <b>Via Parameters:</b>
  • A Via header field value contains the transport protocol used to send the
  • message, the client's host name or network address, and possibly the port
  • number at which it wishes to receive responses. Transport protocols defined
  • here are "UDP", "TCP", "TLS", and "SCTP". "TLS" means TLS over TCP. When a
  • request is sent to a SIPS URI, the protocol still indicates "SIP", and the
  • transport protocol is TLS. A Via header field value can also contain
  • parameters such as "maddr", "ttl", "received", and "branch". A proxy sending
  • a Request to a multicast address must add the maddr parameter to its
  • ViaHeader, and should add the ttl parameter. If a server receives a Request
  • which contained an maddr parameter in the topmost ViaHeader, it should send
  • the Response to the multicast address listed in the maddr parameter. The
  • received parameter is added only for receiver-added ViaHeaders.
  • <p>
  • Two Via header fields are equal if their sent-protocol and sent-by fields
  • are equal, both have the same set of parameters, and the values of all
  • parameters are equal.

type ViaList

type ViaList struct {
	SIPHeaderList
	// contains filtered or unexported fields
}

* * Keeps a list and a hashtable of via header functions.

func NewViaList

func NewViaList() *ViaList

*

  • Default Constructor.

func (*ViaList) Clone

func (this *ViaList) Clone() interface{}

*

  • make a clone of this header list. This supercedes the parent
  • function of the same signature - here for speed. Cloning based
  • on introspection is slower. *
  • @return clone of this Header list.

type WWWAuthenticate

type WWWAuthenticate struct {
	Authentication
}

func NewWWWAuthenticate

func NewWWWAuthenticate() *WWWAuthenticate

*

  • Default Constructor.

type WWWAuthenticateHeader

type WWWAuthenticateHeader interface {
	ParametersHeader

	/**
	 * Sets the scheme of the challenge information for this WWWAuthenticateHeader.
	 * For example, Digest.
	 *
	 * @param scheme - the new string value that identifies the challenge
	 * information scheme.
	 *
	 */
	SetScheme(scheme string)

	/**
	 * Returns the scheme of the challenge information for this WWWAuthenticateHeader.
	 *
	 * @return the string value of the challenge information.
	 *
	 */
	GetScheme() string

	/**
	 * Sets the Realm of the WWWAuthenicateHeader to the realm
	 * parameter value. Realm strings MUST be globally unique.  It is
	 * RECOMMENDED that a realm string contain a hostname or domain name.
	 * Realm strings SHOULD present a human-readable identifier that can be
	 * rendered to a user.
	 *
	 * @param realm the new Realm string of this WWWAuthenicateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the realm.
	 *
	 */
	SetRealm(realm string) (ParseException error)

	/**
	 * Returns the Realm value of this WWWAuthenicateHeader. This convenience
	 * method returns only the realm of the complete Challenge.
	 *
	 * @return the string representing the Realm information, null if value is
	 * not Set.
	 *
	 */
	GetRealm() string

	/**
	 * Sets the Nonce of the WWWAuthenicateHeader to the nonce
	 * parameter value.
	 *
	 * @param nonce - the new nonce string of this WWWAuthenicateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the nonce value.
	 *
	 */
	SetNonce(nonce string) (ParseException error)

	/**
	 * Returns the Nonce value of this WWWAuthenicateHeader.
	 *
	 * @return the string representing the nonce information, null if value is
	 * not Set.
	 *
	 */
	GetNonce() string

	/**
	 * Sets the URI of the WWWAuthenicateHeader to the uri
	 * parameter value.
	 *
	 * @param uri - the new URI of this WWWAuthenicateHeader.
	 *
	 */
	SetURI(uri address.URI)

	/**
	 * Returns the URI value of this WWWAuthenicateHeader, for example DigestURI.
	 *
	 * @return the URI representing the URI information, null if value is
	 * not Set.
	 *
	 */
	GetURI() address.URI

	/**
	 * Sets the Algorithm of the WWWAuthenicateHeader to the new
	 * algorithm parameter value.
	 *
	 * @param algorithm - the new algorithm string of this WWWAuthenicateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the algorithm value.
	 *
	 */
	SetAlgorithm(algorithm string) (ParseException error)

	/**
	 * Returns the Algorithm value of this WWWAuthenicateHeader.
	 *
	 * @return the string representing the Algorithm information, null if the
	 * value is not Set.
	 *
	 */
	GetAlgorithm() string

	/**
	 * Sets the Qop value of the WWWAuthenicateHeader to the new
	 * qop parameter value.
	 *
	 * @param qop - the new Qop string of this WWWAuthenicateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the Qop value.
	 *
	 */
	SetQop(qop string) (ParseException error)

	/**
	 * Returns the Qop value of this WWWAuthenicateHeader.
	 *
	 * @return the string representing the Qop information, null if the
	 * value is not Set.
	 *
	 */
	GetQop() string

	/**
	 * Sets the Opaque value of the WWWAuthenicateHeader to the new
	 * opaque parameter value.
	 *
	 * @param opaque - the new Opaque string of this WWWAuthenicateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the opaque value.
	 *
	 */
	SetOpaque(opaque string) (ParseException error)

	/**
	 * Returns the Opaque value of this WWWAuthenicateHeader.
	 *
	 * @return the string representing the Opaque information, null if the
	 * value is not Set.
	 *
	 */
	GetOpaque() string

	/**
	 * Sets the Domain of the WWWAuthenicateHeader to the domain
	 * parameter value.
	 *
	 * @param domain - the new Domain string of this WWWAuthenicateHeader.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the domain.
	 *
	 */
	SetDomain(domain string) (ParseException error)

	/**
	 * Returns the Domain value of this WWWAuthenicateHeader.
	 *
	 * @return the string representing the Domain information, null if value is
	 * not Set.
	 *
	 */
	GetDomain() string

	/**
	 * Sets the value of the stale parameter of the WWWAuthenicateHeader to the
	 * stale parameter value.
	 *
	 * @param stale - the new boolean value of the stale parameter.
	 *
	 */
	SetStale(stale bool)

	/**
	 * Returns the boolean value of the state paramater of this
	 * WWWAuthenicateHeader.
	 *
	 * @return the boolean representing if the challenge is stale.
	 *
	 */
	IsStale() bool
}

type WWWAuthenticateList

type WWWAuthenticateList struct {
	SIPHeaderList
}

* * WWWAuthenticate SIPHeader (of which there can be several?)

func NewWWWAuthenticateList

func NewWWWAuthenticateList() *WWWAuthenticateList

*

  • constructor.

type Warning

type Warning struct {
	SIPHeader
	// contains filtered or unexported fields
}

func NewWarning

func NewWarning() *Warning

*

  • constructor.

func (*Warning) EncodeBody

func (this *Warning) EncodeBody() string
  • Encode the body of the header (return the stuff following name:). *@return the string encoding of the header value.

func (*Warning) GetAgent

func (this *Warning) GetAgent() string

*

  • Gets agent host of WarningHeader
  • @return agent host of WarningHeader

func (*Warning) GetCode

func (this *Warning) GetCode() int

*

  • Gets code of WarningHeader
  • @return code of WarningHeader

func (*Warning) GetText

func (this *Warning) GetText() string

*

  • Gets text of WarningHeader
  • @return text of WarningHeader

func (*Warning) SetAgent

func (this *Warning) SetAgent(host string) (ParseException error)

*

  • Sets host of WarningHeader
  • @param host String to Set
  • @throws ParseException if host is not accepted by implementation

func (*Warning) SetCode

func (this *Warning) SetCode(code int) (InvalidArgumentException error)

*

  • Sets code of WarningHeader
  • @param code int to Set
  • @throws SipParseException if code is not accepted by implementation

func (*Warning) SetText

func (this *Warning) SetText(text string) (ParseException error)

*

  • Sets text of WarningHeader
  • @param text String to Set
  • @throws ParseException if text is not accepted by implementation

func (*Warning) String

func (this *Warning) String() string

type WarningHeader

type WarningHeader interface {
	Header

	/**
	 * Gets the agent of the server that created this WarningHeader.
	 *
	 * @return the agent of the WarningHeader
	 */
	GetAgent() string

	/**
	 * Sets the agent value of the WarningHeader to the new value passed to the
	 * method.
	 *
	 * @param agent - the new agent value of WarningHeader
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the agent value.
	 */
	SetAgent(agent string) (ParseException error)

	/**
	 * Gets text of WarningHeader.
	 *
	 * @return the string text value of the WarningHeader.
	 */
	GetText() string

	/**
	 * Sets the text of WarningHeader to the newly supplied text value.
	 *
	 * @param text - the new text value of the Warning Header.
	 * @throws ParseException which signals that an error has been reached
	 * unexpectedly while parsing the text value.
	 */
	SetText(text string) (ParseException error)

	/**
	 * Sets the code of the WarningHeader. The standard RFC3261 codes are
	 * defined as constants in this class.
	 *
	 * @param code - the new code that defines the warning code.
	 * @throws InvalidArgumentException if an invalid integer code is given for
	 * the WarningHeader.
	 */
	SetCode(code int) (InvalidArgumentException error)

	/**
	 * Gets the code of the WarningHeader.
	 *
	 * @return the integer code value of the WarningHeader
	 */
	GetCode() int
}

type WarningList

type WarningList struct {
	SIPHeaderList
}

* * A Warning SIPObject. (A list of Warning headers).

func NewWarningList

func NewWarningList() *WarningList
  • Constructor. *

Source Files

Jump to

Keyboard shortcuts

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