API Function: mocall_cdr
API Function Application:
Send MO Call CDR data to your server
API Function Request Type: HTTP Request is sent from Cloud9 to your server.
API Function Status:
Requires enablment by Cloud9 before use.
API Function Examples: Click Here to view online examples.


The mocall_cdr function enables you to receive mobile originated call CDR data to your server.
Our system will pass a URL string like so to your server:

 

http://api.yourdomain.net/cdr.asp?request_type=MOCALL_CDR&timestamp=2008-08-14%2012:03:22
&call_date=2008-0814%2012:00:49&transactionid=10000&cdr_id=123456&carrierid=1&mcc=0&mnc=0
&imsi=234180000000000&msisdn=%2B447700000000&destination=%2B441283123456&leg=A
&leg_duration=185&reseller_charge=11.1605&client_charge=0.0000&user_charge=22.0000&IOT=0
&user_balance=10.00&ecc=0

IMPORTANT: The string we send you will be URL encoded.
Please Note: For a call back calls as there are two legs you will receive two HTTP CDR requests, one for the Aleg and one for the Bleg. See below for further details.

 

The URL is made up of the following variables:

 

REQUEST_TYPE

This variable will be set to MOCALL_CDR.

TIMESTAMP

The date and time the HTTP request was created in yyyy-mm-dd HH:mm:ss format. This time stamp is used for the API CDR records.

CALL_DATE

This variable will contain the date and time of the call in yyyy-mm-dd HH:mm:ss format.

TRANSACTIONID

This variable will be set to a numerical value by our system. The ID is used to track the HTTP request through the Cloud9 system.

CDR_ID

This variable will contain a unique ID which has been assigned to the CDR. With an MO CALL you will receive two CDR's one for the Aleg and one for the Bleg. Each CDR will contain the same unique ID so the CDR's can be linked together.

CARRIERID

This variable will contain the carrier ID that has been assigned to you for use with our API.

MCC

This variable will contain (if the data is available) the MCC country code of where the subscriber is located. For example 234 for the UK.

MNC

This variable will contain (if the data is available) the MNC operator code (The network name that the subscriber is logged onto). For example 18 for the Wire9 Network.

IMSI

This variable will contain the IMSI of the subscriber who has made the outbound call request.

MSISDN

This variable will contain the MSISDN of the subscriber who has made the outbound call request.

DESTINATION

This variable will contain the destination number that was called by the subscriber. The destination number will be in full international format prefixed with a '+' (so for the UK you will see +44xxx)

LEG

This variable will contain either 'A' or 'B'. If A then the CDR will be for the Aleg of the call (call back to the handset). If B then the CDR will be the Bleg of the call (The dialed destination).

LEG_DURATION

This variable will contain the duration of the call leg in SECONDS.

RESELLER_CHARGE

This variable will contain the reseller charge (your charge) in 0.00 format. The currency will be in your system default currency.

CLIENT_CHARGE

This variable will contain the client charge (your clients charge) in 0.00 format. The currency will be in your system default currency.

USER_CHARGE

This variable will contain the user charge (your users charge) in 0.00 format. The currency will be in your system default currency.

IOT

If the user is in an IOT chargeable country then this variable will be set to 1 else this variable will be set to 0

USER_BALANCE

This variable will contain the users balance after charges have been deducted (your users charge) in 0.00 format. The currency will be in your system default currency.

ECC

This variable will contain a value of 0 or 1. If 0 then the Sim Call Control application was not used when the call was placed (so the user dialed the destination number suffixed with a '#') If 1 then the destination number was dialed by the Sim Call Control application.

 

When a MOCALL_CDR request is sent to your server your server is required to respond like so:

 

<?xml version="1.0" ?>

<CDR_response>

<cdr_id>123456</cdr_id>

<cdr_status>1</cdr_status>

</<CDR_response>


The XML output is made up like so:

<CDR_RESPONCE>

The <CDR_response> tag is required so our system can detect your server’s XML reply.

<CDR_ID></CDR_ID>

This variable must contain the CDR ID we passed you within the HTTP post.

<CDR_STATUS></CDR_STATUS>

This variable must contain either 0 or 1 If 0 then this tells our system that the CDR post failed, if 1 then this tells are system the CDR post was successful. By default reply with these field set to 1.

</CDR_RESPONCE>

The </CDR_response> tag is required so our system can detect your server’s XML reply.

 

If our server is unable to process the request or a system error occurs we will send back a formatted XML
error message like so stating what error occurred within the <Error_Message></Error_Message> tag:

 

<? xml version="1.0" ?>

<Error>

 <Error_Message>Error: Unknown user </Error_Message>
</Error>

 

ERROR_MESSAGE

This variable will contain information to why the request could not be processed by our system.

 

Top of page      Email page    Print page

Last Review 16/08/2008 @ 21:08:19

Privacy Statement | HTTP/XML System API © 2010 Cloud9 Mobile International Ltd. All Rights Reserved.