PUA Usrloc

Anca-Maria Vamanu

   Voice Sistem SRL

Edited by

Anca-Maria Vamanu

   Copyright © 2006 Voice Sistem SRL
     __________________________________________________________________

   Table of Contents

   1. Admin Guide

        1. Overview
        2. Dependencies

              2.1. Kamailio Modules
              2.2. External Libraries or Applications

        3. Parameters

              3.1. default_domain (str)
              3.2. entity_prefix (str)
              3.3. branch_flag (int)

        4. Functions

              4.1. pua_set_publish()

   List of Examples

   1.1. Set default_domain parameter
   1.2. Set presentity_prefix parameter
   1.3. Set branch_flag parameter
   1.4. pua_set_publish usage

Chapter 1. Admin Guide

   Table of Contents

   1. Overview
   2. Dependencies

        2.1. Kamailio Modules
        2.2. External Libraries or Applications

   3. Parameters

        3.1. default_domain (str)
        3.2. entity_prefix (str)
        3.3. branch_flag (int)

   4. Functions

        4.1. pua_set_publish()

1. Overview

   The pua_usrloc module is the connector between the usrloc and pua
   modules. With this module, you can monitor the status of SIP
   registrations. The module sends PUBLISH requests for user location
   record changes, based on specific events (e.g., when a new record is
   added in usrloc, a PUBLISH with status open (online) is issued; when
   expires, it sends closed (offline)).

   Using this module phones which have no support for presence can be seen
   as online/offline.

2. Dependencies

   2.1. Kamailio Modules
   2.2. External Libraries or Applications

2.1. Kamailio Modules

   The following modules must be loaded before this module:
     * usrloc.
     * pua.

2.2. External Libraries or Applications

   The following libraries or applications must be installed before
   running Kamailio with this module loaded:
     * libxml.

3. Parameters

   3.1. default_domain (str)
   3.2. entity_prefix (str)
   3.3. branch_flag (int)

3.1. default_domain (str)

   The default domain to use when constructing the presentity URI if it is
   missing from stored AOR in the usrloc table (in memory or database).

   Default value is “NULL”.

   Example 1.1. Set default_domain parameter
...
modparam("pua_usrloc", "default_domain", "kamailio.org")
...

3.2. entity_prefix (str)

   The prefix used when constructing the entity attribute to be added to a
   presence node in the XML PIDF document. (ex: pres:user@domain ).

   Default value is “NULL”.

   Example 1.2. Set presentity_prefix parameter
...
modparam("pua_usrloc", "entity_prefix", "pres")
...

3.3. branch_flag (int)

   Which branch flag to be used to select the contact addresses for which
   to generate PUBLISH. Valid values are 0 to 31.

   Default value is “-1” (disabled).

   Example 1.3. Set branch_flag parameter
...
modparam("pua_usrloc", "branch_flag", 9)
...

4. Functions

   4.1. pua_set_publish()

4.1.  pua_set_publish()

   The function is used to mark REGISTER requests that have to issue a
   PUBLISH. The PUBLISH is issued when REGISTER is saved in location
   table.

   Example 1.4. pua_set_publish usage
...
if(is_method("REGISTER") && from_uri=~"john@kamailio.org")
        pua_set_publish();
...
