API Function: ddi_mapping
API Function Application:
Set or Configure MSISDN to DDI mappings
API Function Request Type: HTTP Request is sent from your server to our server.
API Function Status:
Requires enablment by Cloud9 before use.
API Function Examples: Click Here to view online examples.


To set the DDI mappings for a Cloud9 MSISDN you need to send a HTTP string like so:

 

http://api.wire9.com/api.cgi?transaction_id=1001&msisdn=%2B447700000000&request_type=ddi_mapping
&carrier_id=1&password=test&timestamp=2007-03-08%2023:43:43&ddi=%2B44123456789
&ddi_cmd=1&set_cli=0

IMPORTANT: You must URL Encode your HTTP string. URL Encoding replaces unsafe ASCII characters with "%" followed by their hex equivalent. Safe characters are defined in RFC2396. For example a '+' will become '%2B'

 

The URL is made up of the following variables:

 

URL

http://api.wire9.com/api.cgi

TRANSACTION_ID

This variable must be set to a numerical value by your system. The ID is used to track the HTTP request through the cloud9 system. The data returned by our system will contain the ID that you assign. The transaction ID can be assigned a value from 0 – 999999.

MSISDN

This variable must contain the MSISDN that you wish to MAP to or query. If passing a MSISDN you may use the following formats: 07xxx, 447xxx or +447xxx.

REQUEST_TYPE

This variable must be set to DDI_MAPPING. This setting tells our system that you wish to carry out a DDI Mapping request.

CARRIER_ID

This variable must contain the carrier ID that has been assigned to you for use with our API. Please contact support@cloud9-mobile.co.uk if you do not have your API carrier ID.

PASSWORD

This variable must contain the password that has been assigned to you for use with our API. Please contact support@cloud9-mobile.co.uk if you do not have your API password.

TIMESTAMP

This variable is set by your system. It should contain a valid date and time in yyyy-mm-dd HH:mm:ss format. This time stamp is used for the API CDR records.

DDI

This variable must contain the DDI that you would like to use to map to or set to. This variable MUST BE populated when setting the DDI_CMD value to 2,3 or 4.

SET_CLI

This variable can be set at 0,1 or 2. When set to 0 and a outbound call is made the Cloud9 MSISDN will be used as the CLI. When set to 1 the DDI will be used as the CLI. When set to 2 then NO CLI will be used. This field must be populated when the DDI_CMD varibale is set to 2 or 3

DDI_CMD

This variable has four options. Setting this variable to 1,2,3 or 4 will allow you to carry out one of the following functions:

1 = Query DDI mapping. This will return the MSISDN and DDI mapping associated to it along with the CLI option.

2 = Set a DDI mapping. This will create a DDI mapping to the MSISDN that is specified and set the CLI options.

3 = Set a DDI mapping CLI option. This when set the outbound CLI to either the MSISDN or the CLI

4 = Remove a DDI mapping. This when set will remove the DDI mapping for the MSISDN specified.

 

Please Note: All of the above variables are required within the HTTP request string. The DDI Mapping request will fail
if the required variables are not passed in the correct format.

When a valid DDI Mapping request is made the Cloud9 system will return a standard XML (version 1 tree)
which will contain the following data which your system must phase through and pull out the required data:

 

<?xml version="1.0" ?>

<Wire9_data>

<DDI_Response>

<CLI>+44123456789</CLI>

<DDI>+44123456789</DDI>

<MSISDN>+447700000000</MSISDN>

<MESSAGE>MSISDN +447700000000 is assigned to +44123456789 The system will use +44123456789 as the cli</MESSAGE>

<REQUEST_STATUS>1</STATUS>

<TIME_STAMP>2007-03-08 23:43:43</TIME_STAMP>

<TRANSACTION_ID>1000</TRANSACTION_ID>

</DDI_Response>

</Wire9_data>


The XML output is made up like so:

CLI

This variable contains the CLI that will be used when an outbound call is made by the subscriber.

DDI

This variable contains the DDI that has been mapped to the Cloud9 MSISDN. If multiple DDI's have been mapped this field will contain a comma delimiter list.

MSISDN

This variable contains the assigned MSISDN that has been linked to the DDI Mapping

REQUEST_STATUS

Options: 0 = IMSI is disabled 1 = IMSI is enabled

TIME_STAMP

The returned TIMESTAMP that you passed within the HTTP request string.

TRANSACTION_ID

The transaction ID your system assigned to the IMSI Status request.

MESSAGE

This variable contains a text message describing the outcome of the DDI Mapping request.

 

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:20

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