# &adminguide;

## Overview

This module serves as a storage engine for SCSCF contacts, much like the standard Kamailio module that is usrloc, is a storage engine for standard SIP contacts.

## Dependencies

### &kamailio; Modules

The following modules must be loaded before this module:

- TM

- Presence

- IMS dialog

## Parameters

### `db_url` (string)

database URL for storing impu/contacts records

#### Set `db_url` parameter

    ...
            modparam("ims_usrloc_scscf", "db_url", "mysql//username:password@localhost/scscf")
    ...

### `db_mode` (string)

This is the database mode to be used for the SCSCF usrloc data persistent storage. Currently this module supports the Write-Back scheme only.

- 0 - This disables database completely. Only memory will be used. Contacts will not survive restart.

- 1 - Write-Backend scheme. All changes are made to memory and database synchronization is done in the timer

Default value is 0.

#### Set `db_mode` parameter

    ...
            modparam("ims_usrloc_scscf", "db_mode", 1)
    ...

### maxcontact (int)

The parameter can be used to limit the number of contact for each impu

Default value is 0(max)

#### Set `maxcontact` parameter

    ...
            modparam("ims_usrloc_scscf", "maxcontact", 10)
    ...

### maxcontact_3gpp (int)

The parameter can be used to limit the number of 3GPP contact for each impu

Default value is 0.(max)

#### Set `maxcontact_3gpp` parameter

    ...
            modparam("ims_usrloc_scscf", "maxcontact_3gpp", 0)
    ...

### maxcontact_behaviour (int)

Behaviour of usrloc , after impu reach max contacts limit.

- 0 - Disabled

- 1 - Reject after reaching limit.

- 2 - Overwrite

Default value is 0.

#### Set `maxcontact_behaviour` parameter

    ...
            modparam("ims_usrloc_scscf", "maxcontact_behaviour", 2)
    ...

### max_subscribes(int)

Max number of subscribes allowed per watcher for each IMPU

Default value is 0.

#### Set `max_subscribes` parameter

    ...
            modparam("ims_usrloc_scscf", "max_subscribes", 2)
    ...

### sub_dialog_hash_size(int)

Subscriber dialog hash table size

Default value is 10.

#### Set `sub_dialog_hash_size` parameter

    ...
            modparam("ims_usrloc_scscf", "sub_dialog_hash_size", 512)
    ...

### timer_procs(int)

process number of handling registeration

Default value is 0

#### Set `timer_procs` parameter

    ...
            modparam("ims_usrloc_scscf", "timer_procs", 5)
    ...

### timer_interval (int)

Number of seconds between two timer runs. The module uses a timer to delete expired contacts, synchronize with database and other tasks, that need to be run periodically

Default value is 90

#### Set `timer_interval` parameter

    ...
            modparam("ims_usrloc_scscf", "timer_interval", 120)
    ...

### desc_time_order (int)

If the user's contacts should be kept timestamp ordered; otherwise the contact will be ordered based on q value. Non 0 value means true.

Default value is timestamp ordering not enabled

#### Set `desc_time_order` parameter

    ...
            modparam("ims_usrloc_scscf", "desc_time_order", 1)
    ...

### matching_mode (int)

What contact matching algorithm to be used.

- 0 - Contact Only matching

- 1 - Contact and Callid Matching

- 2 - Contact and Path header matching

- 3 - Only contact IP and Port Matching

Default value is 0.

#### Set `matching_mode` parameter

    ...
            modparam("ims_usrloc_scscf", "matching_mode", 0)
    ...

### cseq_delay (int)

Delay (in seconds) for accepting as retransmissions register requests with same Call-ID and Cseq.

Default value is 20.

#### Set `cseq_delay` parameter

    ...
            modparam("ims_usrloc_scscf", "cseq_delay", 20)
    ...

### fetch_rows(int)

The number of the rows to be fetched at once from database when loading the location records.

Default value is 2000.

#### Set `fetch_rows` parameter

    ...
            modparam("ims_usrloc_scscf", "fetch_rows", 3000)
    ...

### hash_size (int)

The number of entries of the hash table used by usrloc

Default value 512

#### Set `hash_size` parameter

    ...
            modparam("ims_usrloc_scscf", "hash_size", 512)
    ...

### subs_hash_size (int)

The number of entries of the hash table used by usrloc to store the ims subscribe records

Default value 512

#### Set `subs_hash_size` parameter

    ...
            modparam("ims_usrloc_scscf", "subs_hash_size", 512)
    ...

### contacts_hash_size (integer)

The number of entries of the hash table used by usrloc to store the contact records

Default value is 512

#### Set `contacts_hash_size` parameter

    ...
            modparam("ims_usrloc_scscf", "contacts_hash_size", 512)
    ...

### nat_bflag (integer)

NAT marker to handle natted registration

Default value is 0

#### Set `nat_bflag` parameter

    ...
            modparam("ims_usrloc_scscf", "nat_bflag", 3)
    ...

### contact_delete_delay (int)

If contact is put into delay delete state, this is how long we delay before deleting

Default value is 30

#### Set `contact_delete_delay`parameter

    ...
            modparam("ims_usrloc_scscf", "contact_delete_delay", 32)
    ...

### support_wildcardPSI (int)

Wildcard Public-Service-Identity (RFC5002). it will be actived by setting 1

Default value is 0.(disabled)

#### Set `support_wildcardPSI` parameter

            modparam("ims_usrloc_scscf", "support_wildcardPSI", 0)

### unreg_validity (int)

Default validity time in seconds for unregister assignment to SCSCF

Default value is 1800

#### Set `unreg_validity` parameter

    ...
            modparam("ims_usrloc_scscf", "unreg_validity", 0)
    ...

### user_data_xsd (string)

Default value is 1800

#### Set `unreg_validity` parameter

    ...
            modparam("ims_usrloc_scscf", "user_data_xsd", "/usr/local/etc/kamailio/CxDataType_Rel6.xsd")
    ...

### realm (string)

Default value is NULL

#### Set `realm` parameter

    ...
            modparam("ims_usrloc_scscf", "realm", "kamailio-ims.org")
    ...

### skip_realm (int)

Skipping defined network name in the `realm` for NOTIFY's Message body reginfo tag.

Default value is 0

#### Set `skip_realm` parameter

    ...
            modparam("ims_usrloc_scscf", "skip_realm", 1)
    ...

## RPC Commands

Exported RPC commands.

### ulscscf.status

### ulscscf.showimpu

### ulscscf.snapshot