URI scheme, sip when not given.
User part of the URI, if any.
Host part of the URI. The only mandatory one.
Optionalport: number | nullPort of the URI, if any.
URI parameters, added through URI.setParam.
URI headers, added through URI.setHeader.
Scheme of the URI, usually sip or sips.
Set the scheme of the URI, lowercasing the given value.
User part of the URI, undefined when the URI has none.
Set the user part of the URI, or remove it by giving undefined.
Host part of the URI, either a domain or an IP address.
Set the host part of the URI, lowercasing the given value.
Port of the URI, null when the URI has none.
StaticparseGet the value of the given URI parameter.
null if the parameter has no value, undefined if the URI
does not have it.
Whether the URI has the given parameter.
undefined if no parameter name is given.
Remove the given URI parameter.
The value it had, null if it had none, undefined if the URI
did not have the parameter.
Remove every URI parameter.
Set the given URI header.
Header field name, which gets capitalized as it is written in SIP messages.
A single value or several of them.
Get the values of the given URI header.
undefined if the URI does not have it.
Whether the URI has the given header.
undefined if no header name is given.
Remove the given URI header.
The values it had, undefined if the URI did not have the
header.
Remove every URI header.
A copy of the URI that shares nothing with it, so that either can be modified without affecting the other.
The address of record of the URI, so its scheme, user and host without any parameter nor header.
Optionalshow_port: booleanWhether to include the port, which is left out by default.
Represents a SIP URI and provides a set of attributes and methods to retrieve and set the different parts of a URI.
It can be represented in its full form, including parameters and headers, and in the AoR form. It can also be cloned, so a second URI can be formed from itself.
Example