# Parameters

## `db_url` (string)

The URL of the database to be used.

Default value is "mysql://ser:heslo@localhost/ser".

## `user_attrs_table` (string)

Name of the table with user attributes.

Default value is "user_attrs".

## `uri_attrs_table` (string)

Name of the table with uri attributes.

Default value is "uri_attrs".

## `uid_column` (string)

Name of the column that stores UID in the user attributes table.

Default value is "uid".

## `username_column` (string)

Name of the column containing the username of the subscriber in uri attributes table.

Default value is "username".

## `did_column` (string)

Name of the column in uri attributes table containing the ID of domain that the subscriber belongs to.

Default value is "did".

## `name_column` (string)

The name of the column containing attribute names.

Default value is "name".

## `value_column` (string)

The name of the column containing attribute values.

Default value is "value".

## `type_column` (string)

The name of the column containing attribute value type.

Default value is "type".

## `flags_column` (string)

The name of the column containing attribute flags.

Default value is "flags".

## `scheme_column` (string)

The name of the column containing subscriber's scheme in uri attributes.

Default value is "scheme".

## `attr_group` (string)

'Extra attribute' group definition. It can be repeated to define more attribute groups.

The group definition contains one or more assignments in the form key=value. Possible keys are:

id

- Attribute group identifier. Must be set.

table

- Table name used for storing attributes from this attribute group. Must be set.

flag

- Attribute flag name used to mark attributes in this group. Must be set.

key_column

- Column name holding key. Default value is id.

name_column

- Column name used for storing attribute name. Default value is name.

value_column

- Column name used for storing attribute value. Default value is value.

type_column

- Column name used for storing attribute type. Default value is type.

flags_column

- Column name used for storing attribute flags. Default value is flags.

None defined by default.

### attribute group definition

    modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_column=dlg_id");

Table used for these attributes:

    mysql> describe dlg_attrs;
    +--------+------------------+------+-----+---------+-------+
    | Field  | Type             | Null | Key | Default | Extra |
    +--------+------------------+------+-----+---------+-------+
    | dlg_id | varchar(256)     | NO   | MUL |         |       |
    | name   | varchar(32)      | NO   |     |         |       |
    | value  | varchar(255)     | YES  |     | NULL    |       |
    | type   | int(11)          | NO   |     | 0       |       |
    | flags  | int(10) unsigned | NO   |     | 0       |       |
    +--------+------------------+------+-----+---------+-------+
    5 rows in set (0.00 sec)

Setting flags from code (all attrs beginning with dlg_):

    avpflags dialog_flag;
    ...
    route {
    	...
    	setavpflag("$f./^dlg_/", "dialog_flag");
    	...
    }

## `auto_unlock_extra_attrs` (string)

Determines the action when any of the 'extra attributes' lock is detected when routing script execution was finished. When the value of this parameter is zero (default) BUG level message is logged, but the lock is kept, so another process trying to obtain the lock might get stuck. If the value is nonzero, DEBUG level message is sent to the log and all the locks are released.

Default value is 0.