> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/tposs/6.15/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/tposs/6.15/configuration/diameter.md).

# Diameter settings

To receive incoming Diameter requests from SMF/TDF, specify a Diameter listener along with other Diameter options. Use these configuration options to enable the Diameter listener:

```yaml
scg:
  diameter:
    # Enables Diameter server
    enabled: true
    # TPOSS Diameter listener address
    listener: "aaa://0.0.0.0:3868"
```

To identify TPOSS as a Diameter agent, specify its Origin-Realm:

```yaml
scg:
  diameter:
    # Origin-Realm used by TPOSS
    realm: "tposs-realm"
```

Here are the additional Diameter configuration options that you can use to control Diameter connections, timeouts, and behaviour of other aspects of Diameter:

```yaml
scg:
  diameter:
    # Timeout in milliseconds for ASR requests
    asr_timeout: 5000
    # Timeout in milliseconds for RAR requests
    rar_timeout: 5000
    # Size of the Diameter receive buffer in bytes
    recbuf: "1048576"
    # Size of the Diameter send buffer in bytes
    sndbuf: "1048576"
    # Size of the in-memory buffer for Diameter requests/responses
    buffer: "1048576"
    # Timeout in seconds for Gy terminate requests
    wait_time_gy_terminate: 10
    # Number of connections that the Diameter server accepts
    pool_size: 100
    # The values configure the upper limits for time intervals of handling incoming Diameter requests. 
    # The limits are translated into Prometheus histogram buckets. The values are provided in milliseconds.
    rtt_buckets: "10, 30, 50, 75, 100, 1000, 2000"
```

TPOSS allows you to create sessions in different modes using Diameter requests. The following options control this behaviour:

```yaml
scg:
  diameter:
    # Allows TPOSS to create service sessions based on Diameter NASREQ-AAR requests
    creation_on_nasreq: false
    # Returns user data (like IMSI, IMEISV, and Calling-Station-Id) from TPOSS on Diameter NASREQ-AAR requests
    userdata_on_nasreq: false
```

If the **scg.diameter.userdata_on_nasreq** configuration option is set to `true`, TPOSS returns the following user data in the Diameter NASREQ AAR response:

- IMSI
- IMEISV
- Calling-Station-Id

>**NOTE:** Not all data might be returned. For example, if TPOSS does not know the IMEISV for the given session, this AVP is omitted in the Diameter NASREQ AAR response.

To make both configuration options **scg.diameter.creation_on_nasreq** and **scg.diameter.userdata_on_nasreq** work, TPOSS must handle Diameter NASREQ requests. For this case, enable the following configuration option:

```yaml
scg:
  diameter:
    # Enables NAT-binding on Diameter NASREQ-AAR requests
    enable_cgnat: true
```

For more information, see the [TPOSS chart configuration](https://docs.cennso.com/components/tposs/6.15/installation/configuration.md#diameter-configuration) document.
