Globally Routable User Agent URIs (RFC 5627). Equivalent to NkSIP's
nksip_gruu.
defmodule MyRegistrar do
use Malla.Service,
plugins: [Caracola.Registrar, Caracola.Gruu],
sip: [listen: "sip:all:5060"]
endThe plugin adds gruu to the Supported header. With it:
- As UA, Contacts get the
+sip.instanceof the service, and the GRUUs received in the responses to REGISTER are available withget_gruu_pub/1andget_gruu_temp/1. - As registrar (with
Caracola.Registrar), registrations with a+sip.instancefrom UAs supporting GRUU get a public GRUU (the AOR with agrparameter identifying the instance) and a temporary one (an encrypted user withgr), in thepub-gruuandtemp-gruuContact parameters. A new temporary GRUU is generated in each registration; all of them are invalidated when the Call-ID changes.registrar_find/2finds the contacts of a URI, which can be a GRUU.
Summary
Functions
The public GRUU received in the last registration.
The temporary GRUU received in the last registration.
Returns the registered contacts of a URI: for a public GRUU, those of its
instance; for a temporary GRUU, those of its instance if it is still
valid; otherwise, those of the AOR (see Caracola.Registrar.find/2).
Functions
@spec get_gruu_pub(module()) :: {:ok, Caracola.URI.t()} | :undefined
The public GRUU received in the last registration.
@spec get_gruu_temp(module()) :: {:ok, Caracola.URI.t()} | :undefined
The temporary GRUU received in the last registration.
@spec registrar_find(module(), Caracola.URI.t()) :: [Caracola.URI.t()]
Returns the registered contacts of a URI: for a public GRUU, those of its
instance; for a temporary GRUU, those of its instance if it is still
valid; otherwise, those of the AOR (see Caracola.Registrar.find/2).