5. Exported Parameters

5.1. avp_url (string)

For enabling DB operations, you must specify a DB URL pointing to the database containing the table(s) containing the AVPs. If required, a user name and password can be set for allowing the module to connect to the database server.

This parameter is optional, its default value being NULL.

Example 1. Set avp_url parameter

...
modparam("avpops","avp_url","mysql://user:passwd@host/database")
...
				

5.2. avp_table (string)

Indicates the name of the default table that store the AVPS. This table must be locate into the database specified by "avp_url" parameter.

This parameter is required only if avp_url was set. Note that the default value is NULL, so , if you want to use it, you must explicitly set it.

Example 2. Set avp_table parameter

...
modparam("avpops","avp_table","avptable")
...
				

5.3. avp_aliases (string)

Contains a multiple definition of aliases for AVP names.

Syntax:

  • avp_aliases = alias_definition(';'alias_definition)*

This parameter is optional.

Example 3. Set avp_aliases parameter

...
modparam("avpops","avp_aliases","uuid=I:660;email=s:email_addr;fwd=i:753")
...
				

5.4. use_domain (integer)

If the domain part of the URI should be used for identifying an AVP in DB operations.

Default value is “0 (no)”.

Example 4. Set use_domain parameter

...
modparam("avpops","use_domain","1")
...
				

5.5. uuid_column (string)

Name of column containing the uuid (unique user id).

Default value is “uuid”.

Example 5. Set uuid_column parameter

...
modparam("avpops","uuid_column","uuid")
...
				

5.6. username_column (string)

Name of column containing the username.

Default value is “username”.

Example 6. Set username_column parameter

...
modparam("avpops","username_column","username")
...
				

5.7. domain_column (string)

Name of column containing the domain name.

Default value is “domain”.

Example 7. Set domain_column parameter

...
modparam("avpops","domain_column","domain")
...
				

5.8. attribute_column (string)

Name of column containing the attribute name (AVP name).

Default value is “attribute”.

Example 8. Set attribute_column parameter

...
modparam("avpops","attribute_column","attribute")
...
				

5.9. value_column (string)

Name of column containing the AVP value.

Default value is “value”.

Example 9. Set value_column parameter

...
modparam("avpops","value_column","value")
...
				

5.10. type_column (string)

Name of column containing the AVP type.

Default value is “type”.

Example 10. Set type_column parameter

...
modparam("avpops","type_column","type")
...
				

5.11. db_scheme (string)

Definition of a DB scheme. Scheme syntax is:

  • db_scheme = name':'element[';'element]*

  • element =

    • 'uuid_col='string

    • 'username_col='string

    • 'domain_col='string

    • 'value_col='string

    • 'value_type='('integer'|'string')

    • 'table='string

Default value is “NULL (none)”.

If some elements of a DB scheme are missing, the default values at module level will be used for columns and table names. For "value_type", default is “string”.

Example 11. Set db_scheme parameter

...
modparam("avpops","db_scheme",
	"scheme1:uuid_col=uid;value_col=job;value_type=string;table=emp")
- from table "emp", using "uid" column as uuid, get as 
  string value the "job" column
modparam("avpops","db_scheme",
	"scheme2:username_col=user;domain_col=domain;value_col=email;table=users")
- from table "users", using "user" column as username and
  "domain" as domain column, get as string value the 
  "email" column
...