# Integration Guidelines for Partner Relationship Management

# Service Provider CDR Utility

## Web Service

The Service Provider Utility Web Service allows the Service Provider to retrieve the CDRs it has generated from Oracle Communications Services Gatekeeper.

### Interface: SpCdrUtil

The endpoint for this interface is: `http://<host>:<port>/prm_sp/services/SpCdrUtil`

where the value of host and port depend on the Oracle Communications Services Gatekeeper deployment.

### countCdrs

Counts the number of CDRs for a certain Service for a specified time interval

Note: | A Service is the generic name for a Oracle Communications Services Gatekeeper communication service, without regard for the Web Service version or the network plug-in being used. So, for example, the Service name for Parlay X 2.1 Third Party Call using SIP or INAP or Parlay X 3.0 using Parlay 3.3 MPCC is simply Third Party Call
Table 8-1 countCdrs(serviceName, fromDate, toDate, completionStatus, appAccountId)
Parameter Name | Type | Description
--- | --- | ---
Input |  |
serviceName | xsd:string | The name of the Service for which to retrieve CDRs. Use null to not filter on this parameter
fromDate | xsd:dateTime | From date and time. Use null to not filter on this parameter
toDate | xsd:dateTime | To date and time. Use null to not filter on this parameter.
completionStatus | tns1:CdrCompletionStatus | Completion status of the CDR. See CdrCompletionStatus. Use null to not filter on this parameter.
appAccountId | xsd:string | ID of the Application Account to filter the result on. Use null to not filter on this parameter
Returns |  |
countCdrsReturn | xsd:long | The number of CDRs matching the given criteria.
Possible Exceptions |  |
ACCESS_DENIED |  |
CommonException |  |

### listCdrs

Retrieves all CDRs matching the given criteria

Table 8-2 listCdrs(serviceName, fromDate, toDate, completionStatus, appAccountId, startIndex, maxEntries)
Parameter Name | Type | Description
--- | --- | ---
Input |  |
serviceName | xsd:string | The name of the Service for which to retrieve CDRs. Use null to not filter on this parameter
fromDate | xsd:dateTime | From the date and time. Use null to not filter on this parameter.
toDate | xsd:dateTime | To the date and time. Use null to not filter on this parameter.
completionStatus | tns1:CdrCompletionStatus | Completion status of the CDR.See CdrCompletionStatus. Use null to not filter on this parameter.
appAccountId | xsd:string | ID of the Application Account to filter the result on. Use null to not filter on this parameter.
startIndex | xsd:long | Which entry, in the overall result set, to start the result list on (cursor).
maxEntries | xsd:int | The maximum number of alarms returned.
Returns |  |
listCdrsReturn | Array of tns1:CdrInfo | List of CDRS. See CdrInfo.
Possible Exceptions |  |
ACCESS_DENIED |  |
CommonException |  |

.

### Exceptions

#### CommonException

This exception is raised when the login session has expired (BC only) or there are communication problems with the underlying platform.

### Data types

#### CdrInfo

Data structure defining a CDR. All services that produce charging data do not use all fields, and they use the fields in a slightly different, depending on the type of the service. See the Communication Service Reference for details of which fields that are relevant for the different services.

Table 8-3 CdrInfo
Element name | Datatype | Description
--- | --- | ---
transactionId | xsd:long | The Oracle Communications Services Gatekeeper transaction sequence number.
serviceName | xsd:string | The communication service whose use is being tracked
timeStamp | xsd:dateTime | The time at which the event was triggered (in milliseconds from midnight 1 January 1970)
origAddr | xsd:string | The address of the originating party.
destAddr | xsd:string | The address of the destination party.
spAccountD | xsd:string | The ID of the Service Provider that generated the CDR.
appAccountID | xsd:string | The ID of the Application Account that generated the CDR.
completionStatus | tns1:CdrCompletionStatus | Completion status of the CDR. See CdrCompletionStatus.
info | xsd:string | Additional info provided by the communication service
additionalProperties | impl:ArrayOf_tns1_Property | Application defined data. See Property.

#### CdrCompletionStatus

Defines the completion status of a CDR. Enumeration

Table 8-4 CdrCompletionStatus
Element name | Datatype | Description
--- | --- | ---
COMPLETED | xsd:string | The operation generating the CDR succeeded.
FAILED | xsd:string | The operation generating the CDR failed.
PARTIAL | xsd:string | The operation generating the CDR succeeded partially. May be supported, depending on the communication service.
COMPLETED_NOTIFICATION_FAILED | xsd:string | The CDR is completed, but the notification was not delivered to the application.
POLICY_DENIED | xsd:string | Policy denied the operation.

#### Property

Array of name-value pairs.

Table 8-5 Property
Element name | Datatype | Description
--- | --- | ---
Name | xsd:string | Name of the property, with the value defined in Value. Unique within the array.
Value | xsd:string | The data associated with Name.