JSON API for YateSMSC Configuration

From YateBTS
Jump to: navigation, search

Request: set_node

This request is used to configure the SS7/SMPP/etc settings for a YateSMSC server.

The main parameters are:

  • node_type: "smsc"
  • ss7
    • local - information about the local node (the actual YateSMSC server that you are configuring). The information about the local node is organized in:
      • common - common settings for the network, but also equipment specific information
    • linksets - configure the linksets and links to the STP
    • gt_route - configure the GT routes table
  • smpp
    • listeners - define SMPP server listeners
    • clients - define clients' authentication information
  • smsc - operational parameters that define the functioning of the SMSC
  • restart- boolean. Whether to restart now and apply settings sent in the same request or previously.
 "node_type": "smsc",
 "restart" : boolean,
 "ss7": {
   "local": {
      "common": {
         "dialect": "ITU" / "ANSI",
         "netindicator": "national" / "reservednational" / "international",
         "pointcode": NNN,                   // Local pointcode, integer representation, range depends on dialect
         "gt": ["NNNNNNNNNN", ...],          // List of local GT. The first element is the GT we are sending from
         "hlr": "NNNNN...",                  // Optional, HLR number (GT) returned in Update Location
         "msisdn": ["ABC","DEF", ...],       // List of MSISDN prefixes to which the HLR will respond
         "ip": ["x.x.x.x" / "xx:xx::xx"],      // Local IP address for signaling protocols
         "sccp_tt": boolean,                 // Optional, use Translation Type in SCCP messages, defaults to false
         "sccp_pc": boolean,                 // Optional, use Point Code in SCCP source address, defaults to false
   "linksets": [
         "type": "M2PA" / "M3UA",
         "pointcode": NNN,                   // Adjacent point code, integer representation, range depends on dialect
         "route": [ NNN, NNN, ... ],         // Optional list of PCs in integer representation to route through this STP
                                             //  the string "default" may be used as point code to indicate a default route
                                             //  e.g. route: [23, "default"]
         "links": [                          // M2PA: list of links. M3UA: 1 entry with connection data
               "ip": ["x.x.x.x" / "xx:xx::xx"],// Remote IP address
               "port": ,                     // Integer: 1-65535. Port on the adjacent node
               "local_ip": [""],               // Optional local IP address (use common if missing)
               "local_port": ,               // Optional. Integer: 1-65535. Local port number,
                                             //  ignored for M3UA. Otherwise: use remote port as default if missing
               "sctp_params": {              // Optional SCTP params. All params are optional.
                                             // All integer params are unsigned. See lksctp.conf for info
                  "rto_initial": NNN,
                  "rto_min": NNN,
                  "rto_max": NNN,
                  "max_retrans": NNN,
                  "hb_interval": NNN,
                  "hb_enabled": boolean,
                  "sack_delay": NNN,
                  "sack_freq": NNN,
            // ... other links if necessary
         // M3UA only
         "aspid": NNN,                       // Optional ASP identifier (unsigned 32 bit)
         "contexts": [N, N, ...],            // Optional list of routing context numbers (unsigned 32 bit)
         "traffic": "unused" / "override" / "loadshare" / "broadcast", // Optional traffic type
         "network_appearance": NNN,          // Optional network appearance (unsigned 32 bit)
      // ... linkset for the second STP 
   "gt_route": [                             // GT route table
         "pc": NNN,                          // Remote point code (must a configured one if there is no default route)
         "prefix": ["NNNNN", ...],           // List of GT prefixes to route to this PC, can be just [ "*" ]
      // ... other routes

 "smpp": {
   "listeners": [
         "addr": "x.x.x.x" / "xx:xx::xx",// Local IP address to listen on
         "port":  // Optional. Integer: 1-65535. Local port number to listen on
   "clients": [
         "username": "",
         "password": ""

 "smsc": {
    "my_cc" : "", // REQUIRED. Network country code
    "auth_mo_sms": true/false, // Boolean. Default false. Authentify MO sms
    "sgsn_sms": true/false, // Boolean. Default false
    "sms_attempts": , // Integer. Default 3. How many times to try delivery of MT SMS
    "sms_expire": // Integer. Default 14. Days. How long to ways before deleting SMS

Request: get_node_type

Retrieve installed node type and software version on an equipment.
In special cases you might have more components on a single physical machine.


{ "request":"get_node_type" }

Example response when multiple nodes are installed:


Request: get_node_config

Retrieve the specific node configurations (packaged and generated) as a tarball.
Note: In case of success, the response Content-Type is application/octet-stream.

To request parameters:

  • node: "smsc"


{ "request":"get_node_config", "node":"smsc" }

Request: get_net_address

Retrieve configured interfaces and IP addresses per equipment:

Ex request:
 { "request":"get_net_address","node":"smsc","params":"net_address"} 
Ex response:
 { "code":0,

Request: get_node_logs

Retrieve the logs of the specific node as text.

Note: In case of success, the response Content-Type is text/plain.

To request parameters:

  • node: "smsc"


  • level: Optional minimum log level: "mild" / "call" / "note" / "info" / "all", defaults to "warn". Can be numeric, between 6-10
  • lines: Optional maximum number of lines to retrieve, range 10 - 1000, default 50


{ "request":"get_node_logs",
  "params": {
    "level": "info",
    "lines": 20