Opencell icon

Opencell

Consume Opencell API

Overview

The Opencell Mediation: Charge CDR List operation allows you to send a list of Call Detail Records (CDRs) to the Opencell API for charging. This is typically used in telecom or billing scenarios where batches of usage records (such as phone calls, SMS, or data sessions) need to be rated and charged according to business rules. The node supports both manual entry of CDRs and JSON input, and provides options to control processing modes, error handling, and the level of detail returned.

Common use cases:

  • Batch rating and charging of telecom events.
  • Automated mediation and charging workflows for service providers.
  • Integration with upstream systems that generate CDRs for billing.

Example:
A telecom operator receives thousands of CDRs daily from its network. Using this node, they can automate the process of sending these records to Opencell for rating and charging, optionally retrieving detailed information about counters, EDRs, and wallet operations generated during the process.


Properties

Name Type Meaning
Authentication options Selects the authentication method for connecting to Opencell (Basic Authentication or OAuth2).
JSON Input boolean If enabled, allows direct input of CDRs as a JSON array. If disabled, CDRs are entered via UI fields.
CDRs fixedCollection Allows manual entry of one or more CDR codes (when JSON Input is disabled). Each CDR should match the format used in mediation jobs.
CDRs (JSON) json Accepts a JSON array of CDR lines (when JSON Input is enabled). Each line should follow the expected CDR format for mediation jobs.
Max Depth number Required. Specifies the maximum depth for recursive processing of CDRs. Controls how deeply related entities are processed.
Additional Fields > Mode options Determines how the CDR list is processed:
- Process All
- Rollback on Error
- Stop on First Fail
Additional Fields > Rate Triggered EDRs boolean If enabled, the API will rate all triggered EDRs created by the rating of the charge.
Additional Fields > Return Counters boolean If enabled, returns the list of counter updates produced, even if they are virtual.
Additional Fields > Return EDRs boolean If enabled, returns the list of IDs of all EDRs produced (applies to non-virtual mode only).
Additional Fields > Return Wallet Operations boolean If enabled, returns the list of IDs of all wallet operations produced (applies to non-virtual mode only).
Additional Fields > Return Wallet Operation Details boolean If enabled, returns details of all wallet operations produced, even if they are virtual.
Additional Fields > Virtual boolean If enabled, no changes performed during rating are persisted (dry-run/virtual mode).

Output

  • The output is a JSON object containing the response from the Opencell API after processing the CDR list.
  • The structure of the output depends on the options selected (e.g., whether counters, EDRs, or wallet operations are requested).
  • Typical fields may include:
    • result or status: Indicates success or failure.
    • counters: List of updated counters (if "Return Counters" is enabled).
    • edrs: List of EDR IDs (if "Return EDRs" is enabled).
    • walletOperations: List of wallet operation IDs (if "Return Wallet Operations" is enabled).
    • walletOperationDetails: Detailed info about wallet operations (if enabled).
    • Any errors encountered during processing.

Note:

  • The exact structure of the output mirrors the Opencell API's /opencell/api/rest/v2/mediation/cdrs/chargeCdrList endpoint response.
  • No binary data is produced by this operation.

Dependencies

  • External Service: Requires access to an Opencell instance with the Mediation API enabled.
  • Authentication: Needs either Basic Auth or OAuth2 credentials configured in n8n.
  • n8n Configuration: Credentials must be set up under the names opencellApi (for Basic Auth) or opencellOAuth2Api (for OAuth2).

Troubleshooting

Common Issues:

  • Invalid CDR Format: Ensure each CDR matches the expected format used in mediation jobs. Malformed CDRs may cause API errors.
  • Authentication Errors: Incorrect credentials or missing permissions will result in authentication failures.
  • API Endpoint Unreachable: Network issues or incorrect Opencell base URL configuration can prevent successful API calls.
  • Max Depth Too Low: Setting Max Depth too low may result in incomplete processing of related entities.

Error Messages & Resolutions:

  • "Username/password error. Error code : ...": Check your credentials and try again.
  • "Host error. Error code : ...": Verify the Opencell server address and network connectivity.
  • "Invalid credentials (unknown error)": Double-check credential setup in n8n.
  • "Unable to get custom fields. Server response: ...": Likely a misconfiguration or unsupported resource; check your input parameters.

Links and References

Discussion