# Parameters

`default_expires` (integer)

  Default expiration value to be used when the client doesn't supply one (in seconds). It is used for both subscriptions and publications.

  Default value is 3600.

`max_subscription_expiration` (integer)

  Maximal subscription expiration value in seconds.

  Default value is 3600.

`max_publish_expiration` (integer)

  Maximal expiration of presence status information published via PUBLISH in seconds.

  Default value is 3600.

`use_db` (integer)

  If set to 1, PA module stores all subscription data into database and reloads them on startup. Requires `db_url` to be set.

  Default value is 1.

`db_url` (integer)

  Database connection URL. It has to be specified if `use_db` or `use_offline_winfo` is set.

  Default value is empty.

  ## `db_url` settings

      ...
      modparam("pa", "use_db", 1)
      modparam("pa", "db_url", "mysql://ser:heslo@127.0.0.1:3306/ser")
      ...

`use_callbacks` (integer)

  If set to 1 callbacks to registrar/jabber will be used, if set to 0 callbacks will not be used, thus it will work only with published information.

  Default value is 1.

`accept_internal_subscriptions` (integer)

  If set to 1 PA module will accept internal subscriptions via Querry Status API otherwise not. Set this to 1 if you want RLS module to be using internal subscriptions to PA. You can't use presence B2B UA in this case!

  Default value is 0.

  Internal subscriptions are not handled in configuration script thus they use default values of parameters (like XCAP root settings for authorization, ...)

`watcherinfo_notify` (integer)

  Set this to 1 if you want to enable subscriptions to "presence.winfo" events. If set to 0, watcherinfo subscriptions are denied.

  Default value is 1.

`use_offline_winfo` (integer)

  Set this to 1 if you want to use offline watcher info notifications. In such case can be watcher information stored in database and later dumped to presentity in watcher info notification, requires `db_url` to be set. See functions for example.

  Default value is 0.

`offline_winfo_expiration` (integer)

  Expiration time of stored "offline watcher information" in seconds. After this time is the information removed from database.

  Default value is 259200.

`offline_winfo_timer` (integer)

  Number of seconds after which is triggered automatic cleanup of expired offline watcherinfo.

  Default value is 3600.

`auth` (string)

  This variable specifies authorization type for presence watchers (event package is presence). Value can be one of:

  none

    All watchers are always authorized. This is not recommended because it ignores user's wish.

  implicit

    All watchers are always pending. This is not recommended because it means, that no presence data is sent to all watchers.

  xcap

    This type of authorization means, that authorization rules are read from XCAP server and processed . In this case the xcap module must be loaded.

  Default value is empty. In this case implict authorization is used with an error message.

`winfo_auth` (string)

  This variable specifies authorization type for watcher info watchers (event package is presence.winfo). Value can be one of:

  none

    All watcher info watchers are always authorized. This is not recommended.

  implicit

    This value means, that presentity can subscribe to its own watcher info data and nobody else. This is done via comparing watcher's and presentity's uri. If these values equals, the subscription is allowed. In other cases is the subscription rejected.

  Default value is implict

pres_rules_file

  Name of the file with presence rules on XCAP server. The filename is by default presence-rules.xml. It is common for all subscriptions/users which seems to be insufficient. It will be replaced by holding this information for each user separately in user attributes (TODO).

ignore_408_on_notify

  If set to 1 the 408 response to NOTIFY is ignored, otherwise all 4xx responses including 408 destroys the subscription.

  Reason for this parameter is that some clients are not able to process two NOTIFY requests received shortly in sequence and unresponded NOTIFY resulting in generated 408 response destroyed subscription created by them.

  Default value is 0.

timer_interval

  Interval in seconds when the timer runs and clears expired watchers/tuples and send NOTIFYs for changed presentities.

default_priority_percentage

  Priority value used for tuples created by registration in percents. Default value is 0.

auth_rules_refresh_time

  Time interval specifying amount of time between re-reading of authorization documents stored on XCAP server. In other words it means the time interval of subscription reauthorization.

  Default value is 300.

async_auth_queries

  Set to 1 if you want to use asynchronous XCAP queries (recommended), 0 otherwise.

  Default value is 0.

max_auth_requests_per_tick

  Maximum number of asynchronous XCAP requests done at once (within one second).

  Default value is 600.