JSON API for YateUCN Configuration

From YateBTS
Revision as of 16:22, 19 December 2016 by Monica (Talk | contribs) (Request: set_node)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

YateUCN replaces the MSC/VLR, SGSN, GGSN, STP and GMSC of a 2G network, and the MME,SGW and PGW of a 4G network.

The main request to configure a node is set_node. You will send it multiple times to an UCN server, depending on the type of node you want to configure.

  • ucn (MSC/VLR, SGSN, GGSN, MME, SGW, PGW)
  • stp

You can enable each of the above 3 types of nodes from above or even all three of them in a YateUCN server.

Request: set_node

This request is used to configure a YateUCN server. It mainly configures the SS7/Diameter settings, but also access points and other information needed for the ps/eps features.

The main parameters are:

  • node_type: "ucn" / "stp"
  • ss7
    • local - information about the local node (the actual YateUCN server that you are configuring). The information about the local node is organized in:
      • common - common settings that will probably be used for all the subnodes. Some of this information are network settings while others are equipment specific
      • vlr/sgsn/mme/pgw (only when configuring node_type ucn). You can override some of the common parameters. Ex: set a different gt for the VLR subnode.
    • linksets - configure the linksets and links to the STP
    • gt_route - configure the GT routes table
  • access_points - configure the access points that the customers are allowed to use
  • tunnels - configure the tunnels (GTP) used the the ps/eps service
  • diameter
    • identities - configure local nodes
    • listeners - configure the listeners
    • connections - configure outgoing connections
  • s1ap
    • common - configure common/default S1AP parameters
    • listeners - configure the S1AP listeners
  • restart - boolean. Whether to restart now and apply settings sent in the same request or previously
{  "node_type": "ucn" / "stp",
   "ss7": {
     "local": {
       "common": {
         "dialect": "ITU" / "ANSI",
         "netindicator": "national" / "reservednational" / "international",
         "pointcode": NNN,  // integer representation, range depends on dialect
         "gt": "NNNNNNNNNN",
         "ip": ["x.x.x.x" / "xx:xx::xx"],  // Local IP address for signaling protocols
         "nnsf_node": NNN,  // Node Resource Index for Network Node Selection Function
         "nnsf_bits": N,  // Bits used from (P)TMSI for NNSF
         "ip_gtp": "x.x.x.x" / "xx:xx::xx",  // IP address for GTP
         "def_smsc": "NNNNNNNNNN",  // optional GT to use instead of malformed SMSC
         "empty_begin": false / true / 0 / 1,  // start SMS delivery with an empty TCAP Begin
       },
       "vlr": {  // parameters and overrides for UCN/VLR+MSC only
         "nnsf_node": NNN,  // optional override
         "nnsf_bits": N,  // optional override
       },
       "sgsn": {  // parameters and overrides for UCN/SGSN only
         "nnsf_node": NNN,  // optional override
         "nnsf_bits": N,  // optional override
       },
       "mme": {  // parameters and overrides for UCN/MME only
         "identity": {
            "plmns": [ "NNNNN", "NNNNNN", ... ],  // List of MCCMNC
            "tac": NNN,
            "group": NNN,
            "code": NN,  // LTE specific nnsf_node override, must be unique per group, 0 to 255
            "name": "some-name-here",  // optional
         },
       },
       "pgw": {  // parameters and overrides for UCN/PGW only
         "ip_gtp_c": "x.x.x.x" / "xx:xx::xx",  // IP address for GTP-C
         "ip_gtp_u": "x.x.x.x" / "xx:xx::xx",  // IP address for GTP-U
       },
     },
     "linksets": [
	{ "type": "MTP3" / "M3UA",
         "pointcode": NNN,  // integer representation, range depends on dialect
         "route": [ NNN, NNN, ... ],  // List of PCs in integer representation to route through this STP
         "gt": [ "NNNNN", "NNNNN", ... ],  // List of GT prefixes to route through this STP, can be just [ "*" ]
         "ip": ["x.x.x.x" / "xx:xx::xx"],  // Remote IP address
         "aspid": NNN               // only for M3UA
         "contexts": N, N, ...      // only for M3UA, comma separated list of context numbers
         "links": [
            {  "port": ,     // port on the adjacent node
               "local_ip": []  // optional local IP address
               "local_port": // optional local port number
            },
            // ... other links if necessary
         ]
       },
       // ... linkset for the second STP 
     ],
  }
  "access_points": [                 // only for ucn node
       {  "name": "ap-name-without-dots",
          "tunnel": "name-of-the-tunnel",  // must match one entry in tunnels - see below
          "aliases": "comma, separated, list, of.other.names",  // optional
          "ipv": "ipv4" / "ipv6" / "ipv4v6" / "ipv4_or_v6" / "ipv6_or_v4",
          "qos": "xx xx xx",  // optional, 2G/3G specific, hex encoded
          "qci": N,  // optional, 4G specific, 1 to 9
          "ordered_delivery": false / true / 0 / 1,  // not recommended - advanced setting
          "charging": false / true / 0 / 1,
          // Protocol Configuration Options
          "primary_dns_ipv4": "x.x.x.x",  // optional but likely needed
          "secondary_dns_ipv4": "x.x.x.x",  // optional
          "primary_dns_ipv6": "xx:xx::xx",  // optional but likely needed for IPv6 capable APs
          "secondary_dns_ipv6": "xx:xx::xx",  // optional
          "p_cscf_ipv4": "x.x.x.x",  // optional but likely needed for AP "ims"
          "p_cscf_ipv6": "xx:xx::xx",  // optional
          "mtu_ipv4": NNNN,  // optional, 552 to 9216
       },
       // ... arbitrary number of APs
    ],
  "tunnels": [                           // only for ucn node
       {  "name": "name-of-the-tunnel",
          "ipv4_gtpu_address": "x.x.x.x",  // optional
          "ipv6_gtpu_address": "xx:xx::xx",  // optional, but at least one of them should be present
          "dscp": "normal" / "expedited" / ... ,  // search in Socket.cpp for: // DSCP
          "dscp_per_qci": { // optional
             "N": "normal" / "expedited" / ... ,  // N can be 1 to 9
             "N": "normal" / "expedited" / ... ,  // can be repeated multiple times
          },
          // End user IP allocation pools
          "pool_ipv4": [  // optional
             "x.x.x.x-x.x.x.x",
             "x.x.x.x-x.x.x.x",  // can be repeated multiple times
          ],
          "pool_ipv6": [  // optional
             "xx:xx:xx:xx::-xx:xx:xx:xx::",  // only the upper 64 bits can be specified
             "xx:xx:xx:xx::-xx:xx:xx:xx::",  // can be repeated multiple times
          ],
       },
       // ... arbitrary number of tunnels
    ]
}


Set S1AP example:

{
   "common": {
      "streams": 5
   },
   "listeners": [
      {
         "local_ip": "192.168.168.194",
      },
      {
         "local_ip": "192.168.168.194",
         "local_port": 36413,
         "streams": 2,
         "payload": 19,
         "dscp": "expedited",
         "sctp_params": {
           "max_retrans": 3
         }
      }
   ]
}

Request: set_numbers

Only for the UCN node.

{  "type": "roaming"/"handover",
   "numbers": [ .. ]
}