Release

Search

Let’s have a look on how the Application works.

A service provider provisions subscriber details to their HSS when a mobile user is added to, modified (e.g., a phone number/SIM card/product is changed, etc.) or removed from PortaBilling.

External systems may require different configuration parameters. For example, some HSSs only require SIM card details to activate a SIM card while others require SIM card details and a profile name. That is why the information that the Application requests from PortaBilling depends on the external system to be provisioned.

In our example we assume that HSS requires SIM card details such as MSISDN, IMSI and a profile name that corresponds to the LTE service name.

Example 1. A mobile account is created in PortaBilling
Link copied to clipboard
  1. PortaBilling sends the POST request with Subscriber/Created event type and the i_account to the Application.

    Date: Fri, 11 May 2018 13:28:08 GMT

    Authorization: Signature keyId="test",algorithm="hmac-sha1",signature="b+Y3I1ymQTsuq0h3HNiIl3P3SdE="

    Host: 192.168.243.244:5000

    Referrer: http://192.168.243.244:5000/

    TE: trailers

    Content-Length: 83

    Content-Type: application/json

    {

        "event_type": "Subscriber/Created",

        "variables": {

             "i_account": 1000889,

             "i_event": "5"

        }

    }

  2. The Application receives the request.
  3. The Application sends a POST request to PortaBilling to establish an API session. Used parameters: params={"login":"demo","password":"exAmple"}

    POST /rest/Session/login HTTP/1.1

    Host: demo.portaone.com

    Content-Type: application/x-www-form-urlencoded

    Content-Length: 70

    params=%7B%22login%22%3A%22demo%22%2C%22password%22%3A%22exAmple%22%7D

  4. The Application receives the response from PortaBilling with the session_id.
  5. The Application takes the i_account and the session_id values and calls PortaBilling API to retrieve subscriber details such as service (e.g., LTE) and SIM card details (e.g., MSISDN, IMSI). The API methods are:
    • Account/get_account_info to get the list of included services and ensure that the LTE service is enabled for this subscriber. Used parameters: auth_info={"session_id":"527865ee75368ff2d2c4f4881"} params={"i_account":1000889,"get_included_services":1}

      POST /rest/Account/get_account_info HTTP/1.1

      Host: demo.portaone.com

      Content-Type: application/x-www-form-urlencoded

      Content-Length: 139

      auth_info=%7B%22session_id%22%3A%22527865ee75368ff2d2c4f4881%22%7D&params=% 7B%22i_account%22%3A1000889%2C%22get_included_services%22%3A1%7D

    • SIMCard/get_card_list to get the MSISDN and IMSI. Used parameters: auth_info={"session_id":"527865ee75368ff2d2c4f4881"} params={"i_account":1000889}

      POST /rest/SIMCard/get_card_list HTTP/1.1

      Host: demo.portaone.com

      Content-Type: application/x-www-form-urlencoded

      Content-Length: 105

      auth_info=%7B%22session_id%22%3A%22527865ee75368ff2d2c4f4881%22%7D&params=% 7B%22i_account%22%3A1000889%7D

Once the subscriber’s information is received, the Application interacts with the HSS via the HSS API to add a new subscriber with the following parameters:

  • MSISDN: 12065551122
  • IMSI: 310019901000045
  • Profile name: LTE

Once the subscriber is provisioned, the Application replies to PortaBilling with 200 OK status code.

The ESPF removes the event from the event queue.

Example 2: The existing subscriber has been updated (a new SIM card is assigned)
Link copied to clipboard
  1. PortaBilling sends the POST request with the Subscriber/Updated event type and the i_account to the Application.

    Date: Fri, 21 May 2018 13:28:08 GMT

    Authorization: Signature keyId="test",algorithm="hmac-sha1",signature="b+Y3I1ymQTsuq0h3HNiIl3P3SdE="

    Host: 192.168.243.244:5000

    Referrer: http://192.168.243.244:5000/

    TE: trailers

    Content-Length: 83

    Content-Type: application/json

    {

       "event_type": "Subscriber/Updated",

        "variables": {

             "i_account": "1000889"

             "i_event": "6"

        }

    }

  2. The Application receives the request.
  3. The Application verifies that the API session is active and reuses the session ID for the request. Othervise, the application establishes a new API session.
  4. The Application uses the i_account and the session_id to call the following PortaBilling API methods:
    • Account/get_account_info to get the list of included services, account status and account balance. Used parameters: auth_info={"session_id":"527865ee75368ff2d2c4f4881"} params={"i_account":1000889,"get_included_services":1}

      POST /rest/Account/get_account_info HTTP/1.1

      Host: demo.portaone.com

      Content-Type: application/x-www-form-urlencoded

      Content-Length: 139

      auth_info=%7B%22session_id%22%3A%22527865ee75368ff2d2c4f4881%22%7D&params=% 7B%22i_account%22%3A1000889%2C%22get_included_services%22%3A1%7D

    • SIMCard/get_card_list to get the MSISDN and IMSI. Used parameters: auth_info={"session_id":"527865ee75368ff2d2c4f4881"} params={"i_account":1000889}

      POST /rest/SIMCard/get_card_list HTTP/1.1

      Host: demo.portaone.com

      Content-Type: application/x-www-form-urlencoded

      Content-Length: 105

      auth_info=%7B%22session_id%22%3A%22527865ee75368ff2d2c4f4881%22%7D&params=% 7B%22i_account%22%3A1000889%7D

  5. Upon the response from PortaBilling, the Application requests the SIM card details from HSS via its API.
  6. The Application compares the SIM card parameters received from PortaBilling (MSISDN: 12065551122, IMSI: 310685901111133) with the ones received from the HSS (MSISDN: 12065551122, IMSI: 310685900000045).
  7. The Application detects that the IMSI has changed from 310685900000045 to 310685901111133 and notifies the HSS to delete a subscriber with the IMSI: 310685900000045.
  8. The Application then instructs the HSS to add a new subscriber with the following parameters:
    • MSISDN: 12065551122
    • IMSI: 310685901111133
    • Profile name: LTE

    If the Application detects that the account’s status has changed to blocked or suspended, it notifies the HSS to block a SIM card. If the Application detects that the account has no available funds or has reached the credit limit, it notifies the HSS to act respectively. Note that the actions here depend on the requirements of the HSS.

  9. Once the HSS is updated, the Application responds to PortaBilling with 200 OK status code.
  10. The ESPF removes the event from the event queue.
Example 3: The existing subscriber has been terminated
Link copied to clipboard
  1. PortaBilling sends the POST request with Subscriber/Deleted event type and the i_account to the Application

    Date: Fri, 11 May 2018 13:28:08 GMT

    Authorization: Signature keyId="test",algorithm="hmac-sha1",signature="b+Y3I1ymQTsuq0h3HNiIl3P3SdE="

    Host: 192.168.243.244:5000

    Referrer: http://192.168.243.244:5000/

    TE: trailers

    Content-Length: 83

    Content-Type: application/json

    {

       "event_type": "Subscriber/Deleted",

        "variables": {

             "i_account": "1000889"

             "i_event": "8"

        }

    }

  2. The Application verifies that the API session is active and reuses the session ID for the request. Othervise, the application establishes a new API session.
  3. The Application uses the i_account and the session_id to call the following API methods:
    • Account/get_account_info to get the MSISDN (e.g., account ID). Used parameters: auth_info={"session_id":"999865ee75368ff2d2c4f4881"} params={"i_account":1000889}

      POST /rest/Account/get_account_info HTTP/1.1

      Host: demo.portaone.com

      Content-Type: application/x-www-form-urlencoded

      Content-Length: 105

      auth_info=%7B%22session_id%22%3A%22999865ee75368ff2d2c4f4881%22%7D&params=% 7B%22i_account%22%3A1000889%7D

    • SIMCard/get_card_list method to verify that the sim card is no longer assigned to the account. Used parameters: auth_info={"session_id":"999865ee75368ff2d2c4f4881"} params={"i_account":1000889}

      POST /rest/SIMCard/get_card_list HTTP/1.1

      Host: demo.portaone.com

      Content-Type: application/x-www-form-urlencoded

      Content-Length: 105

      auth_info=%7B%22session_id%22%3A%22999865ee75368ff2d2c4f4881%22%7D&params=% 7B%22i_account%22%3A1000889%7D

  4. Upon the response from PortaBilling, the Application notifies the HSS to remove/terminate a subscriber with 12065551122 MSISDN.
  5. Once the SIM card is removed from the HSS, the Application replies to PortaBilling with 200 OK status code.
  6. The ESPF removes the event from the event queue.

On this page

Release
What's new
Admin manuals
Handbooks
API
UI help
Search