Quick Start

Complete these tasks to set up your environment and then use the REST API that is required before managing the various Cloud Native Session Border Controller applications and files.

Prerequisites

  1. Install the Cloud Native Session Border Controller application to get all services up and running.
  2. Access your REST API platform to send request and receive response. For example - POSTMAN

    Note:

    You can also use the Cloud Native Session Border Controller GUI to send and receive HTTP requests.
  3. Import the Cloud Native Session Border Controller Open API Specification file into your API platform.

Note:

You can also use any programming language capable of sending and receiving HTTPS requests. For example - cURL

Task 1: Obtain account information

From your account administrator, obtain the appropriate account credentials to enable you to log in. Specifically, you will need:
  • User name and password
  • The Cloud Native Session Border Controller service IP address or service FQDN.

Task 2: Get an Access Token

Request an access token by sending a POST request to https://<IAM-IP>/console/auth/realms/sbc/protocol/openid-connect/token.

In the above, <IAM-IP> specifies either Identity Access Management IP (IAM_IP) address or IAM FQDN.

For example:

$ curl -s --location -k --request POST 'https://<IAM_IP>/console/auth/realms/sbc/protocol/openid-connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=password' --data-urlencode 'username=user1' --data-urlencode 'password=mypassword' --data-urlencode 'client_id=sbc'
{
  "access_token": "eyJhbGci759rgXd",
  "refresh_token": "eyJhbGciKdcWRw",
  "token_type": "Bearer",
  "expires_in": 300,
  "refresh_expires_in": 1800,
  "not-before-policy": 0,
  "session_state": "42acd2-afe8-f9100f14dfc6",
  "scope": "profile"
}

The expires_in specifies the time when the access token expires. For example - expires_in: 300 specifies that the access token will expire in 5 minutes.

The refresh_token is used to obtain a subsequent access token once the previous one expires.

Send HTTP request

Once you have the access token, send HTTP request. For example:

$ curl -k -H "Content-Type: application/json" -X POST https://<Cloud_Native_SBC_IP>/config/v1/sd/codec-policy -d  '{"name": "codectest"}'  --header 'Authorization:Bearer eyJhbGciOiJSUzI1NiIsInR5cCSA'
{
  "name": "codectest",
  "packetization-time": 20,
  "force-ptime": false,
  "secure-dtmf-cancellation": false,
  "dtmf-in-audio": "disabled",
  "tone-detect-renegotiate-timer": 500,
  "reverse-fax-tone-detection-reinvite": false,
  "fax-single-m-line": "disabled",
  "evrc-tty-baudot-transcode": false,
  "_elementKey": "codectest"
}

The Cloud Native Session Border Controller Open API Specification file supports (Oauth2, password) authorization.