# &adminguide;

## Overview

This module provides the functionality for an IMS S-CSCF to implement the ISC interface between S-CSCF and SIP Application Server.

## Dependencies

### &kamailio; Modules

The Following modules must be loaded before this module:

- TM - Transaction Manager

- IMS Usrloc SCSCF

### External Libraries or Applications

This module requires the Kamailio internal IMS library.

## Parameters

### `my_uri` (string)

This is the SIP URI of server on which the SCSCF is hosted.

Default value is 'sip:scscf.ims.smilecoms.com:6060'.

#### `my_uri` parameter usage

    ...
    modparam("ims_isc", "my_uri", "sip:scscf.ims.smilecoms.com:6060")
    ...

### `expires_grace` (integer)

This is the expires value to add to the expires during 3rd party registration to prevent expiration in Application Server.

Default value is 120.

#### `expires_grace` parameter usage

    ...
    modparam("ims_isc", "expires_grace", 120)
    ...

### `isc_fr_timeout` (integer)

This is the time in ms that we will wait for an AS response before we consider it dead. It has to be lower than the SIP transaction timeout to prevent downstream timeouts. But not too small as ASs tend to take a long time to respond.

Default value is 5000.

#### `isc_fr_timeout` parameter usage

    ...
    modparam("ims_isc", "isc_fr_timeout", 5000)
    ...

### `isc_fr_inv_timeout` (integer)

This is the time in ms that we will wait for an AS INVITE response before we consider it dead. It has to be lower than the SIP transaction timeout to prevent downstream timeouts. But not too small as ASs tend to take a long time to respond.

Default value is 20000

#### `isc_fr_inv_timeout` parameter usage

    ...
    modparam("ims_isc", "isc_fr_inv_timeout", 20000)
    ...

### `add_p_served_user` (integer)

This boolean indicates if a P-Served-User should be added on the ISC interface, according to RFC 5502.

Default value is 0 (false)

#### `add_p_served_user` parameter usage

    ...
    modparam("ims_isc", "add_p_served_user", 1)
    # p-served user header will be enabled
    ...

## Functions

### `isc_match_filter_reg(reg_state,domain)`

This function checks if a REGISTER messages matches Initial Filter Criteria - if so it inserts the necessary route headers and modifies the destination URI to forward to the relevant Application Server.

A positive return code (1) means that the REGISTER message has matched to Initial Filter Criteria and is armed for routing.

This function handles also the Service Info (if sent by the HSS), the InsertRegisterRequest flag (if sent by the HSS) or the InsertRegisterResponse flag (if sent by the HSS). Either the Service Info OR the original REGISTER request OR the original REGISTER response is added to the body of the REGISTER message, before it is forwarded to the relevant Application Server. Multipart body is not supported in this case.

Meaning of the parameters is as follows:

- reg_state if the user was previously registered 0 - for initial registration, 1 for re/de-registration.

- domain that usrloc_scscf uses to store user information.

This function can be used from REQUEST_ROUTE.

#### `isc_match_filter_reg` usage

    ...
    isc_match_filter_reg("1","location");
    ...

### `isc_match_filter(direction,domain)`

This function checks if a non-REGISTER messages matches Initial Filter Criteria - if so it inserts the necessary route headers and modifies the destination URI to forward to the relevant Application Server.

A positive return code (1) means that the message has matched to Initial Filter Criteria and is armed for routing.

Meaning of the parameters is as follows:

- direction the direction of this message - orig, term, etc.

- domain that usrloc_scscf uses to store user information.

This function can be used from REQUEST_ROUTE | FAILURE_ROUTE.

#### `isc_match_filter` usage

    ...
    isc_match_filter("orig","location");
    ...

### `isc_from_as(direction)`

This function checks if this message has come from an Application Server.

A positive return code (1) means that the message has come from an Application Server.

Meaning of the parameters is as follows:

- direction the direction of this message - orig, term, etc.

This function can be used from REQUEST_ROUTE | FAILURE_ROUTE.

#### `isc_from_as` usage

    ...
    if (!isc_from_as("orig")) {
        remove_hf("P-Asserted-Identity");
    }
    ...