JSON API for Subscriber Management

From YateBTS
Jump to: navigation, search

YateHSS/HLR provides a JSON API to build your own subscribers management interface/platform. You can also use Mobile Management Interface.

You use this API to define subscriber profiles for the offered services: CS/PS/EPS/IMS and SIMs profiles.
You then add SIM ranges and then subscribers that reference a SIM and use the defined SIM and service profiles.

Request: set_operator

This request creates or updates a mobile operator profile. It is expected that a MVNE would create one profile per MVNO.

{ "request":"set_operator",
  "params": {
    "operator_id": "", // required for editing, don't set for creation
    "name":"", // required when creating a new operator
    "home": {
        "gts": [ "...", ], // array of GT prefixes to match home (non-roaming) VPLMN nodes
        "realms": [ "...", ], // array of home Diameter realms
        "gmscs": [ "...", ], // array of home GMSC GTs
        "smscs": [ "...", ] // array of home SMSC GTs
    },
    "visited": {
        "prefix": 5-15, // number of digits to consider for VPLMN identification
        "check": "http://url/template", // called to validate roaming in a new PLMN
        "hook": "http://url/template" // called to notify roaming in a new PLMN
    }
  }
}

The HTTP hooks support the following parameters:

  • always present
    • imsi: 15 digit IMSI of the SIM
    • net: GT prefix or Diameter realm
    • roaming: boolean
    • type: cs, ps or ims
    • node: vlr, sgsn, mme, mme-sgsn or cscf
    • proto: MAP or DIAMETER
  • sometimes present
    • imei: 15 digit IMEI or 16 digit IMEISV
    • old: GT prefix or Diameter realm
    • tech: geran, utran or e-utran
    • plmn: PLMN ID
    • gt: full GT of the node if applicable

The check URL is expected to return a one line text/plain answer:

  • plmnRoamingNotAllowed, operatorDeterminedBarring, supportedRAT-TypesNotAllowed, unknownSubscriber, unexpectedDataValue, systemFailure
  • anything else to allow roaming

The hook URL ignores any answer or failure. Its purpose is to trigger some multi-IMSI mechanism.

Example:

{ "request":"set_operator",
  "params": {
    "name":"Default",
    "home": {
        "gts": [ "882" ],
        "realms": [ "example.com" ],
        "gmscs": [ "8820003" ],
        "smscs": [ "8820003" ]
    },
    "visited": {
        "prefix": 8,
        "check": "http://127.0.0.1/check.php?imsi=${imsi}&imei=${imei}&node=${node}&net=${net}",
        "hook": "http://127.0.0.1/hook.php?imsi=${imsi}&imei=${imei}&net=${net}&old=${old}"
    }
  }
}

Request: get_operator

This request retrieves an operator profile or list the available operators.

{} -- retrieve operators count
{ "limit": , "offset": }  --  
{ "name": / "operator_id": } -- retrieve specific operator by id or name

Example:

{ "request":"get_operator",
  "params": {
    "offset":0,
    "limit":100
  }
}

Request: del_operator

This request deletes an operator. You cannot delete an operator that still owns profiles, SIMs or subscribers.

{ "name": "..." }  --  delete operator by name
{ "operator_id": NNN } -- delete operator by ID

Example:

{ "request":"del_operator",
  "params": {
    "name": "Example"
  }
}

Request: set_sim_profile

This request creates or updates a profile for SIM cards describing their type, supported card applications and authentication details.

{  "sim_profile_id": "", // required when editing profile, don't set when adding profile
   "name": "",
   "vendor": "",
   "algorithm": comp123-v/milenage,
   "amf: "",
   "use_opc": true/false,
   "cs": { "active": true/false,
           "flat_sqn": true/false,
           "sqn_start": 0-31/missing,
           "sqn_end": 0-31/missing
   },
   "ps": { "active": true/false,
           "share_sqn": true/false,
           "flat_sqn": true/false,
           "sqn_start": 0-31/missing,
           "sqn_end": 0-31/missing
   },
   "lte": { "active": true/false,
            "amf": ""
   },
   "ims": { "active": true/false,
            "use_opc": true/false, 
            "share_ki": true/false,
            "share_sqn": true/false,
            "flat_sqn": true/false,
            "sqn_start": 0-31/missing,
            "sqn_end": 0-31/missing
   },
   "wlan": { "active": true/false,
           "use_opc": true/false, 
           "share_ki": true/false,
           "share_sqn": true/false,
           "flat_sqn": true/false,
           "sqn_start": 0-31/missing,
           "sqn_end": 0-31/missing
   }
}

Note that the SQN start+end, share and flat are mutually exclusive:

  • flat indicates no indexes are used and the sequence is just a 48 bit number
  • start+end allow to specify a range of indexes, assumes standard 5 bits for index
  • share indicates that same sequences are shared with other authentication mode
    • PS shares with CS
    • IMS shares with CS
    • WLAN shares with PS

Example:
This SmartJac ISIM has an IMS application interface that holds independent authentication Ki, Op and sequence numbers.

{ "name":"ISIM", "vendor":"SmartJac", "algorithm":"milenage", "amf":"0000", "use_opc":false,
  "cs": { "active":true, "sqn_start":0, "sqn_end":15 },
  "ps": { "active":true, "sqn_start":16, "sqn_end":31 },
  "lte": { "active":true, "amf":"9001" },
  "ims": { "active":true, "use_opc":true, "share_ki":false, "share_sqn":false, "sqn_start":0, "sqn_end":31 },
  "wlan": { "active":true, "use_opc":false, "share_ki":true, "share_sqn":true }
}

Request: get_sim_profile

This request retrieves a SIM profile or list the available profiles.

{} -- retrieve SIM profiles count
{ "limit": , "offset": }  --  
{ "name": / "sim_profile_id": } -- retrieve specific profile by id or name

Request: del_sim_profile

This request deletes a SIM profile. You can delete a profile even if you used it earlier to populate SIMs.

{ "name": "..." }  --  delete profile by name
{ "sim_profile_id": NNN } -- delete profile by ID

Example:

{ "request":"del_sim_profile",
  "params": {
    "name": "Generic SIM"
  }
}

Request: set_sim_range

This request populates information for one or more SIM cards in the database. Common details about the cards are taken from the referenced SIM profile.

{ "sim_profile": "",
  "sims": [
     { "imsi": "",
       "imsi_aux": "",
       "iccid": "",
       "ki": "",
       "op": "",
       "ims_ki": "",
       "ims_op": "",
       "wlan_ki": "",
       "wlan_op": "",
       "pin": "",
       "puk": "",
       "pin2": "",
       "puk2": "",
       "adm1": "",
       "ota": ""
     },
     {..}
  ]
}

Example:

{ "request":"set_sim_range",
  "params": {
    "sim_profile":"ISIM",
    "sims": [
      { "imsi":"001980123456789", "ki":"00112233445566778899aabbccddeeff", "iccid":"8988200150123456789" },
      { "imsi":"001980123456788", "ki":"00112233445566778899aabbccddeeff", "iccid":"8988200150123456788" }
    ]
  }
}

Request: set_sim

This request edits information for one SIM card in the database. It also supports 2 IMSI's.

{  "sim_id": "",     // you need to specify sim_id or imsi in request
   "imsi": "",
   "imsi_aux": "",
   "iccid": "",
   "ki": "",
   "op": "",
   "ims_ki": "",
   "ims_op": "",
   "wlan_ki": "",
   "wlan_op": "",
   "pin": "",
   "puk": "",
   "pin2": "",
   "puk2": "",
   "adm1": "",
   "ota": ""
}

Example of a SIM with 2 IMSI's:

{ "request":"set_sim",
  "params": {
    "sim_id":7,
    "imsi":"460990010001001",
    "imsi_aux":"310410992261045",
    "ki":"00112233445566778899aabbccddeeff",
    "op":"00000000000000000000000000000000",
    "use_opc":false,
    "amf":"0000",
    "amf_lte":"9001",
    "cs_active":true,
    "ps_active":true,
    "lte_active":true,
    "wlan_active":true,
    "ims_active":true
  }
}

Request: get_sims

{} -- retrieve SIM count in parameter 'count'
{ "limit": , "offset": }  -- retrieve SIMs in parameter 'sim_range'
{ "profile": / "imsi": / "iccid":/ "in_use": true/false } -- retrieve specific SIMs based of various criteria in parameter 'sim_range'

When using "imsi" or "iccid" at most one SIM is returned (exact match).

If is possible to combine "profile" with "in_use" to return only SIMs that match both criteria. In this case you may use "limit" and "offset" to retrieve a shorter range.

Request: del_sim

This request deletes a SIM. You cannot delete a SIM that is still allocated to a subscriber.

{ "imsi": "..." }  --  delete SIM by IMSI
{ "sim_id": NNN } -- delete SIM by ID

Example:

{ "request":"del_sim",
  "params": {
    "sim_id": 134
  }
}

Request: set_subscriber

This request is used to configure a subscriber. The presence/absence of specific fields determines the type of subscriber and the allowed services:

  • the type of subscriber
    • sim (you identify the associated SIM by setting 'imsi' or 'iccid'. The other parameters present will modify the associated SIM)
    • sip (in case your subscriber uses only SIP, instead of a SIM)

When subscriber has a SIM card associated you can enable the following services by associating profiles and other additional parameters for:

  • ims (calls over VoLTE)
  • cs (Circuit switching - calls/SMS over GSM)
  • ps (Pachet switching - data over GPRS/EDGE)
  • eps (Evolved pachet system - data over LTE)

Additionally when creating a subscriber you can define:

  • ss (Suplementary services)
  • odb (Operator determined barring)
Note! Take care when defining SS and ODB parameters, because they are case sensitive.
Additionally, setting one of the supplementary services to null, means that service is not provisioned and user is not allowed to set it from him phone.
{ "subscriber_id" "", // required when editing subscriber, don't set when adding subscriber
  "msisdn": "",
  "sim": { "iccid": "",
         "imsi": ""
         // other sim params
    },

  "ims": { "profile": "",
         "fullname": "",
         "active": true/false,
         // private or public identities
         // if missing, the public and private identities are computed based on the subscriber msisdn
         "private_ident": "", 
         "public_ident": "", 
         "public_ident_alt": ""
   },
  "eps": { "profile": ""
   },
  "ps": { "profile": "",
   },
  "cs": { "profile": "",
   },
  "ss": {
      // Setting one of the ss to null, marks it as not provisioned, so user is not able to set it from his phone
     "cfu": ""/null,
     "password": "",
     "cfb": ""/null,
     "cfnrc": ""/null,
     "cfnry": ""/null,
     "cfnry_time": 5/10/15/20/25/30 
     "clir": true/false/null,
     "baoc": true/false/null,
     "boic": true/false/null,
     "boicExHC": true/false/null,
     "baic": true/false/null,
     "bicRoam": true/false/null,
     "cw": true/false/null,
     "hold": true/false/null,
     "multiPTY": true/false/null,
   }
  "odb": {
     "roam": true/false
     "baoc": true/false,
     "boic": true/false,
     "boicExHC": true/false,
     "baic": true/false
     "bicRoam":true/false
     "ps":true/false,
     "psRoam": true/false,
     "hplmnAP": true/false,
     "vplmnAP": true/false
  }
 }
Note! YateHSS/HLR supports a single pair of identities by setting the parameter $dual_subscriber = false in config.php.
      By default both pair of identities are supported.

Examples:

{ "msisdn": "407483550521",
  "sim": {"iccid": "894070123456789"},

  "ims": { "profile": "default_ims",
         "fullname": "Diana Cionoiu",
         "active": true,
         "private_ident": "407483550521@ims.mnc001.mcc001.3gppnetwork.org", 
         "public_ident": "sip:+407483550521@example.com;user=phone", 
         "public_ident_alt": "tel:+407483550521"
   },
  "eps": { "profile": "default_eps"
   },
  "ps": { "profile": "default_ps",
   },
  "cs": { "profile": "default_cs",
   }
  "odb": { 
       "roam": true,
       "baoc": true
  } 
}
{  "msisdn": "407483550522",

   "sip": { "fullname": "Diana Cionoiu",
          "active": true,
          "username": "407483550522",
          "realm": "SIP service",
          "ha1": "ad38ebf120253979403a4d2dcbc0105b"
     }
 }

Request: get_subscriber

{} -- retrieve subscriber count in parameter 'count'
{ "limit": , "offset": }  -- retrieve subscribers in parameter 'subscribers'
{ "subscriber_id": ,/ "msisdn": ,/ "cs_profile": ,/ "ps_profile": ,/ "imsi": ,/ "username": ,/ } -- retrieve specific subscriber based of various criteria in parameter 'subscribers'

Request: del_subscriber

This request deletes a subscriber. It will also delete any registrations and subscriber data.

{ "msisdn": "..." }  --  delete subscriber by IMSI
{ "subscriber_id": NNN } -- delete subscriber by ID
{ "sim": { "sim_id": / "imsi": / "iccid": } }  -- delete subscriber by various SIM identities

Example:

{ "request":"del_subscriber",
  "params": {
    "sim": { "sim_id": 134 }
  }
}

Request: set_ims_profile

This request is used to add/edit an IMS profile:

  • name of the profile
  • domain
  • s_cscf: address of the S-CSCF
  • s_cscf_alt: address of the additional S-CSCF
  • ifc: Initial filter criteria used for defining provisioned subscription of a user to an application (equivalent of CAMEL subscriptions). The array of spt define the logical conditions for applying the service.
  • csi - CAMEL subscription information:
    • various types of CAMEL subscriptions: o/vt/d. For each type of CSI you define the tdp (trigger detection points):
      • dp - name of the detection point: string or numeric
      • the SCF to be notified
      • the min - max CAMEL versions when the tdp can be applied.
      • The combination of critical fields in the CSI or in the tdp defines what happens when none of the tdp can be applied: subscriber is not allowed to roam in a specific network/ operator determined barring applies/ nothing happens
{ "ims_profile_id": "", // required when editing profile, don't set when adding profile
  "name": "",
  "domain": "",
  "s_cscf": "",
  "s_cscf_alt": "",
  "ifc":  [ {"priority": , "profile_part": true/false/null, "cond_cnf": true/false, "app_server": "", "def_handling": true/false,
             "spt": [
                { "group": integer (0-2^31-1), "negated": true/false, "type": "", "value": "", "match": "" (optional), "value": "" (regexp) },
             ]
            },
            { .. }
   ],
  "csi": {
     "csi_type": {   // o, vt, d
        "active": true/false,
        "notify_cse": true/false,
        "critical": noroam/odb/null,
        "tdp": [
           { "version_min": , "version_max": , "dp": "", "sk": , scf: "", "critical": true / false},
         ]
     }
   }  
}

Example:

{  "name": "default_ims",
   "domain": "example.com",
   "s_cscf": "sip:ims1.example.com",
   "s_cscf_alt": "sip:ims2.example.com",
   "ifc":  [
               {  "priority": 0, "profile_part": 0, "cond_cnf": true, "app_server": "sip:as.example.com", "def_handling": true,
                  "spt": [
                         { "group": 0, "negated": false, "type": "Method", "value": "INVITE" },
                         { "group": 0, "negated": false, "type": "Method", "value": "MESSAGE" },
                         { "group": 1, "negated": true, "type": "SIPHeader", "match": "From", "value": "voicemail@" ),
                      ]
                },
                { "priority": 1, "profile_part": 0, "cond_cnf": true, "app_server": "sip:foreign.com", "def_handling": true }
      ],
   "csi":  {
     "o":{"active":true,"notify_cse":true,"critical":"odb",
          "tdp":[
             {"version_min":3,"version_max":4,"dp":"routeSelectFailure","sk":2,"scf":"40700000150","critical":false},
             {"version_min":4,"version_max":4,"dp":"collectedInfo","sk":1,"scf":"40700000150","critical":false},
             {"version_min":2,"version_max":3,"dp":"collectedInfo","sk":1,"scf":"40700000123","critical":false}
            ]
      },
      "vt":{"active":true,"notify_cse":true,"critical":"noroam",
            "tdp":[
               {"version_min":3,"version_max":4,"dp":"termAttemptAuthorize","sk":3,"scf":"40700000150","critical":false}
              ]
       },
       "d":{"active":true,"notify_cse":true,
            "tdp":[
               {"version_min":3,"version_max":4,"dp":"120","sk":120,"scf":"40700000155","critical":false},
               {"version_min":3,"version_max":4,"dp":"130","sk":130,"scf":"40700000155","critical":false},
               {"version_min":3,"version_max":4,"dp":"140","sk":140,"scf":"40700000155","critical":false}
            ]
        } 
    }
 }

Request: get_ims_profile

{} -- retrieve IMS profiles count
{ "limit": , "offset": } --
{ "brief":true }  --  retrieve just the names and ids of the profiles
{ "name": / "ims_profile_id": } -- retrieve specific ims profile by id or name

Request: del_ims_profile

This request deletes an IMS profile. You cannot delete a profile still in use by subscribers.

{ "name": "..." }  --  delete profile by name
{ "ims_profile_id": NNN } -- delete profile by ID

Example:

{ "request":"del_ims_profile",
  "params": {
    "name": "Simple IMS"
  }
}

Request: set_cs_profile

This request is used to add/edit a circuit switching profile:

  • name - name of the profile
  • bearers - list of supported bearers
  • teleservices - list of associated services
  • gmls_list - list of GT for the Gateway Mobile Location Centres that are allowed to request location of a subscriber
  • charging - type of charging
  • ar_priority: Allocation and Retention Priority
  • naea_pref_cic: NAEA preffered CIC
  • ist_timer:
  • USSD:
    • prefix
    • gw
  • csi - CAMEL subscription information:
    • tif: Translation Information Flag
    • various types of CAMEL subscriptions: o/mo_sms/mt_sms/d/.. For each type of CSI you define the tdp (trigger detection points):
      • dp - name of the detection point: string or numeric
      • the SCF to be notified
      • the min - max CAMEL versions when the tdp can be applied.
      • The combination of critical fields in the CSI or in the tdp defines what happens when none of the tdp can be applied: subscriber is not allowed to roam in a specific network/ operator determined barring applies/ nothing happens
{  "cs_profile_id": "", // required when editing profile, don't set when adding profile
   "name": "",
   "category": "",  
   "bearers": ["", ],      // text,list     
   "teleservices": ["", ], // text,list
   "gmlc_list": ["", ],    // text,list
   "charging": ,
   "ar": {"priority":""},
   "naea_pref_cic": ,
   "ist_timer": ,
   "ussd": [ 
     {"prefix":"", gw:""}
   ]
   "csi": {
      "tif": true/false,
      "csi_type": {   // o, mo_sms, mt_sms, d, ..
         "active": true/false,
         "notify_cse": true/false,
         "critical": noroam/odb/null,
         "tdp": [
            { "version_min": , "version_max": , "dp": "", "sk": , scf: "", "critical": true / false},
          ]
      }
    }
}

Example:

Configure a typical circuit-switched profile for prepaid services.

{ "cs_profile_id":1,
  "name":"Prepaid voice",
  "category":"ordinary",
  "bearers":["general-dataCDA", "general-dataCDS"],
  "teleservices":["telephony", "shortMessageMT-PP", "shortMessage"],
  "charging":2048,
  "gmlc_list":["40700000999", "40700000666"],
  "ussd":[
    {"prefix":"101", "gw":"40700000155"},
    {"prefix":"100", "gw":"40700000155"} 
  ],
  "csi":{
    "tif":true,
    "o":{
      "active":true, "notify_cse":true, "critical":"odb",
      "tdp":[
        {"version_min":3,"version_max":4,"dp":"routeSelectFailure","sk":2,"scf":"40700000150","critical":false},   
        {"version_min":4,"version_max":4,"dp":"collectedInfo","sk":1,"scf":"40700000150","critical":false},  
        {"version_min":2,"version_max":3,"dp":"collectedInfo","sk":1,"scf":"40700000123","critical":false}
      ]
    },
    "mo_sms":{
      "active":true, "notify_cse":true, "critical":"noroam",
      "tdp":[
        {"version_min":3, "version_max":4, "dp":"sms-DeliveryRequest", "sk":3, "scf":"40700000150", "critical":false}
      ]
    },
    "mt_sms":{
      "active":true, "notify_cse":true, "critical":"noroam",
      "tdp":[
        {"version_min":3, "version_max":4, "dp":"sms-DeliveryRequest", "sk":4, "scf":"40700000150", "critical":false}
      ]
    },
    "d":{
      "active":true, "notify_cse":true,
      "tdp":[
        {"version_min":3, "version_max":4, "dp":"120", "sk":120, "scf":"40700000155", "critical":false},   
        {"version_min":3, "version_max":4, "dp":"130", "sk":130, "scf":"40700000155", "critical":false},
        {"version_min":3, "version_max":4, "dp":"140", "sk":140, "scf":"40700000155", "critical":false}
      ]
    }
  }
}

Request: get_cs_profile

{} -- retrieve CS profiles count
{ "limit": , "offset": }  --  
{ "brief":true }  --  retrieve just the names and ids of the profiles
{ "name": / "cs_profile_id": } -- retrieve specific cs profile by id or name

Request: del_cs_profile

This request deletes a CS profile. You cannot delete a profile still in use by subscribers.

{ "name": "..." }  --  delete profile by name
{ "cs_profile_id": NNN } -- delete profile by ID

Example:

{ "request":"del_cs_profile",
  "params": {
    "name": "Postpaid voice"
  }
}

Request: set_ps_profile

Request is used to add/edit a packet switching profile. A PS profile is defined by:

  • name - uniquely identifies the profile
  • category. Usually "ordinary".
  • bearers - list of supported bearers
  • teleservices - list of associated services
  • apn_oi_rpl - APN-OI Replacement
  • ap - list of allowed access points. An AP is defined by:
    • name
    • type: ipv4/ipv6/ipv4v6
    • qos - Quality of Service
    • qos_ext - Quality of Service Extension
    • qos_ext2
    • qos_ext3
    • qos_ext4
    • rest_priority
    • charging
    • apn_oi_rpl - APN-OI Replacement
    • ambr_max_ul - The maximum aggregate bit rate for uplink
    • ambr_max_dl - The maximum aggregate bit rate for downlink
    • vpaa - VPLMN Address Allowed flag
    • sipto - Selective IP Traffic Offload
    • sipto_local - Local Selective IP Traffic Offload
  • csi - CAMEL subscription for gprs, mg


{ "ps_profile_id": "", // required when editing profile, don't set when adding profile
  "name": "",
  "category": "",
  "bearers": [ "",  ],
  "teleservices": [ "",  ],
  "ambr":[ "max_ul": , "max_dl": ]
  "ap": [
    { "apn": "internet", "type": ipv4/ipv6/ipv4v6, "qos": "", "qos_ext": "", "qos_ext2": "", "qos_ext3": "",
      "qos_ext4": "", "charging": 0xXXXX, "vpaa": true/false/null, "sipto": true/false/null,"sipto_local": true/false/null },
  ],
  "csi": {
    "gprs": {
      "active": true, "notify_cse": true, "critical": noroam/odb/null,
      "tdp": [
        { "version_min": , "version_max": , "dp": "", "sk": , "scf": "", "critical": true/false }
      ]
    },
    "mg":{
      "active":true,"notify_cse":true,
      "tdp":[
        {"version_min": ,"version_max": ,"dp":"","sk": ,"scf":"","critical":true/false}
      ]
    }
  }
}

Example:

{ "name":"Prepaid data",
  "category":"ordinary",
  "bearers":["general-dataCDA","general-dataCDS"],
  "teleservices":["shortMessageMT-PP","shortMessageMO-PP"],
  "ap":[
    {"apn":"internet","type":"ipv4v6","charging":2048,"vpaa":true,"sipto":false,"sipto_local":false,
     "qos":"23921f","qos_ext":"029396B0E974000000"},   
    {"apn":"mms","type":"ipv4","charging":2048,"vpaa":false,"sipto":false,"sipto_local":false,"qos":"23921f"}
  ],
  "csi":{
    "gprs":{
      "active":true,"notify_cse":true,"critical":"noroam",
      "tdp":[
        {"version_min":3,"version_max":4,"dp":"attach","sk":1,"scf":"40700000150","critical":false},
        {"version_min":3,"version_max":4,"dp":"pdp-ContextEstablish","sk":2,"scf":"40700000150","critical":false}
      ]
    },
    "mg":{
      "active":true,"notify_cse":true,
      "tdp":[
        {"version_min":3,"version_max":4,"dp":"0102","sk":3,"scf":"40700000150","critical":false}
      ]
    }
  }
}

Request: get_ps_profile

{} -- retrieve PS profiles count
{ "limit": , "offset": }  -- 
{ "brief":true }  --  retrieve just the names and ids of the profiles 
{ "name": / "ps_profile_id": } -- retrieve specific ps profile by id or name

Request: del_ps_profile

This request deletes a PS profile. You cannot delete a profile still in use by subscribers.

{ "name": "..." }  --  delete profile by name
{ "ps_profile_id": NNN } -- delete profile by ID

Example:

{ "request":"del_ps_profile",
  "params": {
    "name": "Postpaid data"
  }
}

Request: set_eps_profile

This request is used to add/edit an EPS profile (data in LTE). An EPS profile is defined by:

  • name
  • ambr: aggregated maximum bit rate: maximum uplink, maximum downlink
  • srvcc: whether to allow SRVCC
  • vsrvcc: whether to allow VSRVCC
  • apn_oi_repl: APN-OI Replacement
  • ap: list of access points
    • name
    • is_default
    • type
    • qci QoS Class Identifier
    • charging type
    • vpaa: VPLMN Address Allowed flag
    • sipto: Selective IP Traffic Offload
    • sipto_local: Local Selective IP Traffic Offload
    • ar: Allocation and Retention
    • ambr: agregated maximum bit rate : maximum uplink, maximum downlink for AP
    • pgw: defined by the ipv4/ipv6 IP or name (in this case DNS requests will be used)
{ "eps_profile_id": "", // required when editing profile, don't set when adding profile
  "name": "",
  "ambr": { "max_ul": , "max_dl":  },
  "srvcc": true/false,
  "vsrvcc": true/false,
  "apn_oi_repl": text/NULL,
  "ap": [
    { "apn": "internet", 
      "type": ipv4/ipv6/ipv4v6, 
      "qci": 1 - 9, 
      "charging": (0,65535),
      "apn_oi_repl": text/NULL,
      "vpaa": true/false/null,
      "sipto": true/false/null,
      "sipto_local": true/false/null,
      "ar": { "priority": , "preempt_cap": true/false, "preempt_vuln": true/false },
      "ambr": { "max_ul": , "max_dl": },
      "pgw": { "ipv4": "", "ipv6": "", "name": "" },
    },
  ],
}

Example:

{ "name":"Prepaid data",
  "srvcc":true,
  "vsrvcc":true, 
  "ambr":{"max_ul":10000000,"max_dl":25000000},
  "ap":[
    {"apn":"internet","type":"ipv4v6","charging":2048,"vpaa":true,"sipto":false,"sipto_local":false,"qci":"9","is_default":true,
     "ambr":{"max_ul":5000000,"max_dl":15000000},
     "ar":{"priority":15,"preempt_cap":false,"preempt_vuln":true}
    },
    {"apn":"mms","type":"ipv4","charging":2048,"vpaa":false,"sipto":false,"sipto_local":false,"qci":"9","is_default":false,
     "ar":{"preempt_cap":false,"preempt_vuln":true}
    },
    {"apn":"ims","type":"ipv4v6","charging":0,"vpaa":false,"sipto":false,"sipto_local":false,"qci":"5","is_default":false,
     "ambr":{"max_ul":500000,"max_dl":500000},
     "ar":{"priority":5,"preempt_cap":false,"preempt_vuln":true},
     "pgw":{"ipv4":"192.168.25.15","ipv6":"fd00:1::190f"}
    }
  ]
}

Request: get_eps_profile

{} -- retrieve EPS profiles count
{ "limit": , "offset": }  --  
{ "brief":true }  --  retrieve just the names and ids of the profiles
{ "name:" / "eps_profile_id": } -- retrieve specific eps profile by id or name

Request: del_eps_profile

This request deletes an EPS profile. You cannot delete a profile still in use by subscribers.

{ "name": "..." }  --  delete profile by name
{ "eps_profile_id": NNN } -- delete profile by ID

Example:

{ "request":"del_eps_profile",
  "params": {
    "name": "LTE data"
  }
}


Request: unregister

This request is used to unregister a subscriber (cancel location).

{ "request":"unregister",
  "params": {
    "subscriber_id": "",      // Identify registration by subscriber id
    "msisdn": "",             // Identify registration by MSISDN
    "sim_id": NNN,            // Identify registration by SIM ID
    "imsi": "",               // Identify registration by IMSI
    "iccid": "",              // Identify registration by SIM ICCID
    "reg_type": [],           // Array of registration type to cancel. May contain: "cs", "ps", "ims"  
    "reg_del": true/false,    // Delete registration (subscription withdraw)
    "reg_keep": true/false    // Keep registration (no state change), send protocol request only. 'reg_del' is ignored if this parameter is true
  }
}

NOTE: Fields used to identify the registration are handled in the order mentioned above. The first found identity field will be used to identity the registration.

Examples:

{ "request":"unregister",
  "params": {
    "subscriber_id": 104,
    "reg_type": ["cs","ps"],
  }
}
{ "request":"unregister",
  "params": {
    "imsi":"001900000000001",
    "reg_type": ["ps"],
    "reg_del": true
  }
}