# Parameters

## `db_url` (string)

This is URL of the database to be used.

Default value is "mysql://serro:47serro11@localhost/ser"

### Setting db_url parameter

    modparam("domain", "db_url", "mysql://ser:pass@db_host/ser")

## `db_mode` (integer)

Database mode. Value 0 means non-caching, 1 means caching is enabled. It is highly recommended to enable caching if you want to use domain-level attributes.

Default value is 1 (caching).

### Setting db_mode parameter

    modparam("domain", "db_mode", 0)   # Do	not use caching

## `domain_table` (string)

Name of table containing names of local domains that the proxy is responsible for. Local users must have in their SIP URI a host part that is equal to one of the domains stored in this table.

Default value is "domain".

### Setting domain_table parameter

    modparam("domain", "domain_table", "new_name")

## `did_col` (string)

This is the name of the column in domain table that contains the unique identifiers of virtual domains. Domains names found in this table are arranged into virtual domains. Each virtual domain must have a unique identifier and it can contain one or more domain names.

Default value is "did".

### Setting did_col parameter

    modparam("domain", "did_col", "did")

## `domain_col` (string)

Name of column containing domain names in the domain table.

Default value is "domain".

### Setting domain_col parameter

    modparam("domain", "domain_col", "domain")

## `flags_col` (string)

This is the name of the column in domain table which stores various flags. Each row in the table has a bunch of generic flags that can be used mark the row disabled, deleted, etc. The flags allow for more flexible administration of the data in the database and they are present in several other tables too.

Default value is "flags".

### Setting flags_col parameter

    modparam("domain", "flags_col", "domain")

## `domattr_table` (string)

This parameter can be used to configure the name of the table that is used to store domain-level attributes. Domain level attributes are attributes that are associated with a particular virtual domain. They are typically used to store additional domain-wide settings that should apply to all users who belong to the domain.

Default value is "domain_attrs".

### Setting domattrs_table parameter

    modparam("domain", "domattr_table", "domain_attrs")

## `domattr_did` (string)

Use this parameter to configure the name of the column in domain_attrs table that is used to store the did of the virtual domain the attribute belongs to. Normally there is no need to configure this parameter, unless you want adapt to module to a different database schema.

Default value is "did".

### Setting domattrs_did parameter

    modparam("domain", "domattr_did", "did")

## `domattr_name` (string)

Use this parameter to configure the name of the column in domain_attrs table that is used to store the name of the attribute. Normally there is no need to configure this parameter, unless you want adapt to module to a different database schema.

Default value is "name".

### Setting domattrs_name parameter

    modparam("domain", "domattr_name", "name")

## `domattr_type` (string)

Use this parameter to configure the name of the column in domain_attrs table that is used to store the type of the attribute. Normally there is no need to configure this parameter, unless you want adapt to module to a different database schema.

Default value is "type".

### Setting domattrs_type parameter

    modparam("domain", "domattr_type", "type")

## `domattr_value` (string)

Use this parameter to configure the name of the column in domain_attrs table that is used to store the value of the attribute. Normally there is no need to configure this parameter, unless you want adapt to module to a different database schema.

Default value is "value".

### Setting domattrs_value parameter

    modparam("domain", "domattr_value", "value")

## `domattr_flags` (string)

This is the name of the column in domain_attrs table which stores various flags. Each row in the table has a bunch of generic flags that can be used mark the row disabled, deleted, etc. The flags allow for more flexible administration of the data in the database and they are present in several other tables too. You do not have to touch this parameter under normal circumstances.

Default value is "flags".

### Setting domattrs_flags parameter

    modparam("domain", "domattr_flags", "flags")

## `load_domain_attrs` (integer)

This parameter can be used to enable/disable user of domain-level attributes. Domain-level attributes are variables that can be used to store additional configuration that applies to the whole virtual domain and all users within the virtual domain. Domain-level attributes are stored in domain_attrs. If you set this parameter to a non-zero value then the server will make domain-level attributes available to the script every time you call function `lookup_domain`. If you set the parameter to 0 then domain-level attributes will be ignored, the domain module will not load them from the database and the lookup function will not make them available to the script.

Default value is 0.

### Setting load_domain_attrs parameter

    modparam("domain", "load_domain_attrs", 1)