$Revision: 1.3 $
$Date: 2007/01/08 14:58:38 $

# Functions

## `allow_routing()`

Returns true if all pairs constructed as described in have appropriate permissions according to the configuration files. This function uses default configuration files specified in `default_allow_file` and `default_deny_file`.

### `allow_routing` usage

    ...
    if (allow_routing()) {
        t_relay();
    };
    ...

## `allow_routing(basename)`

Returns true if all pairs constructed as described in have appropriate permissions according to the configuration files given as parameters.

Meaning of the parameters is as follows:

- basename - Basename from which allow and deny filenames will be created by appending contents of `allow_suffix` and `deny_suffix` parameters.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

### `allow_routing(basename)` usage

    ...
    if (allow_routing("basename")) {
        t_relay();
    };
    ...

## `allow_routing(allow_file, deny_file)`

Returns true if all pairs constructed as described in have appropriate permissions according to the configuration files given as parameters.

Meaning of the parameters is as follows:

- allow_file - File containing allow rules.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

- deny_file - File containing deny rules.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

### `allow_routing(allow_file, deny_file)` usage

    ...
    if (allow_routing("rules.allow", "rules.deny")) {
        t_relay();
    };
    ...

## `allow_register(basename)`

The function returns true if all pairs constructed as described in have appropriate permissions according to the configuration files given as parameters.

Meaning of the parameters is as follows:

- basename - Basename from which allow and deny filenames will be created by appending contents of `allow_suffix` and `deny_suffix` parameters.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

### `allow_register(basename)` usage

    ...
    if (method=="REGISTER") {
        if (allow_register("register")) {
            save("location");
            break;
        } else {
            sl_send_reply("403", "Forbidden");
        };
    };
    ...

## `allow_register(allow_file, deny_file)`

The function returns true if all pairs constructed as described in have appropriate permissions according to the configuration files given as parameters.

Meaning of the parameters is as follows:

- allow_file - File containing allow rules.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

- deny_file - File containing deny rules.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

### `allow_register(allow_file, deny_file)` usage

    ...
    if (method=="REGISTER") {
        if (allow_register("register.allow", "register.deny")) {
            save("location");
            break;
        } else {
            sl_send_reply("403", "Forbidden");
        };
    };
    ...

## `allow_refer_to(basename)`

The function returns true if all pairs constructed as described in have appropriate permissions according to the configuration files given as parameters.

Meaning of the parameters is as follows:

- basename - Basename from which allow and deny filenames will be created by appending contents of `allow_suffix` and `deny_suffix` parameters.

  If the parameter doesn't contain full pathname then the function expects the file to be located in the same directory as the main configuration file of the server.

### `allow_register(basename)` usage

    ...
    if (method=="REGISTER") {
        if (allow_register("register")) {
            save("location");
            break;
        } else {
            sl_send_reply("403", "Forbidden");
        };
    };
    ...