For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

You are reading Travelping Open Subscriber Server 6.16, an older release. The newest release is 6.20. Go to 6.20

Session API

TPOSS Session API exposes different models depending on the requested session type. The current version of the Session API supports the following session types:

  • ggsn - network session
  • scg - service session
  • combinedGGSNandSCG - combined network and service session

TPOSS HTTP Session API allows you to read and manage PCS sessions using the following RPC methods:

  • Session.List - to fetch the list of PCS sessions filtered by the given criteria
  • Session.Stop - to stop a network session by the given identifier

Data model

Network session

A network session is represented by an object with the following properties:

Service session

A service session is represented by an object with the following properties:

Combined network and service session

The combined network and service sessions object has the following properties:

API methods

Session.List

The method allows you to fetch the list of sessions based on the given query parameters. If the number of sessions exceeds the internal query limit, only the initial subset is returned. In the case when query parameters are invalid, TPOSS returns an error.

You can pass the following parameters in the request:

Note

The Limit, Offset, Sort, and Fields parameters are supported only for the ggsn and scg session types. The combinedGGSNandSCG session type supports only theFilter parameter which is mandatory.

The Filter field allows you to filter sessions. The filter format is: FilterKey:FilterOperator:FilterValue. The FilterKey parameter represents the session field name. The possible fields are listed in the data model section. The FilterOperator values can be one of the following:

  • is - equal to
  • neq - not equal to
  • lte - lower than or equal to
  • gt - greater than
  • lt - lower than
  • gte - greater than or equal to
  • starts_with - match objects which start with the given pattern
  • ends_with - match objects which end with the given pattern
  • contains - match objects which contain the given pattern

For example, this query requests sessions with IMSI that ends with 5:

json

This query requests sessions with the BalanceId equal to test_balance:

json

In the case of the combinedGGSNandSCG session type, only these filter operations are supported:

  • is - equal to
  • in - match objects contained in the given set of values. The limit is 30 values.

For example:

json

Example of the SessionType="ggsn" request:

bash

Example of the successful response:

json

Example of the SessionType="combinedGGSNandSCG" request:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

The following error codes may be returned:

  • -30000 - Required field is missing.
  • -31411 - Invalid list parameter. This error may occur under different circumstances, such as the wrong format of the Filter parameter or the missing Filter parameter.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.

Session.Stop

The method allows you to stop a running session with the given IMSI. The method works only for network sessions and only if the radius.ggsn_creation_on_accounting configuration parameter is set to false.

You can pass the following parameters in the request:

Example of the request:

bash

Example of the successful response:

json

In the case of an error, the response contains the error object with an error code and message:

json

The following error codes may be returned:

  • -30000 - Required field is missing.
  • -31808 - Session for the given IMSI was not found.
  • -32700 - Can't decode JSON request body.
  • -33333 - Not authenticated.