Skip to content

Latest commit

 

History

History
76 lines (43 loc) · 2 KB

gruu.md

File metadata and controls

76 lines (43 loc) · 2 KB

Globally Routable User Agent URIs (GRUUs) Plugin

Name

nksip_gruu

Description

This plugin provides full support for Globally Routable User Agent URIs (GRUUs), according to RFC5628. It modifies the nksip_registrar plugin to support GRUUS.

When activating this plugin, "gruu" is added the all automatically generated Supported headers. When the registrar receives a registration request with a +sip.instance option, and the client supports GRUU, it will generate a public and a temporary GRUUs.

The client supporting this plugin will detect this and store them for later user, calling get_gruu_pub/1 and get_gruu_temp/1.

When implementing a registrar, call registrar_find/2 instead of nksip_registrar:find/2,4 to decode the generated GRUUs.

Dependant Plugins

None, but if nksip_registrar is activated it will be modified to support GRUUs. Without nksip_registrar, can be used as a client.

Configuration Values

Service configuration values

None

API functions

get_gruu_pub/1

get_gruu_pub(nksip:srv_name()|nksip:srv_id()) ->
    {ok, nksip:uri()} | undefined | {error, term()}.

Gets the last detected public GRUU

get_gruu_temp/1

get_gruu_temp(nksip:srv_name()|nksip:srv_id()) ->
    {ok, nksip:uri()} | undefined | {error, term()}.

Gets the last detected temporary GRUU

registrar_find/2

registrar_find(nksip:srv_name()|nksip:srv_id(), nksip:uri()) ->
    [nksip:uri()].

Use this function instead of nksip_registrar:find/2,4 to decode the generated GRUUs.

Callback functions

None

Examples

See gruu_test.erl for examples