Class JsSIP.IncomingMessage
An instance of JsSIP.IncomingMessage
holds a received SIP request or response.
Instance Methods
countHeader
(name)
Counts the number of headers of the given header name. Returns the Number
of headers present with the given name.
Parameters
name
String
indicating the header name.
getHeader
(getHeader, idx)
Gets the value of the given header name at the given possition. Returns a String
with the value of the header, or null
if the header doesn’t exist.
Parameters
name
String
indicating the header name.idx
- Header index (
Number
). Default value is 0 (First header).
getHeaderAll
(name)
Gets the header(s) of the given name. Returns an Array
of Strings
containing all the values for the given header name.
Parameters
name
String
indicating the header name.
hasHeader
(name)
Verifies the existence of the given header. Returns true
if the header exists, false
otherwise.
Parameters
name
String
indicating the header name.
parseHeader
(name, idx)
Parses the specified header at the given position. Returns the parsed header (an Object
), undefined
if the header is not present or in case of a parsing error.
Parameters
name
String
indicating the header name.idx
- Header index (
Number
) to be parsed. Default value is 0 (First header).
s
(name, idx)
Alias of parseHeader()
.
toString
()
Returns a String
with the received SIP message.