Content.asmx WebService




Table of contents

API documentation
Delivery reports For receiving delivery reports for content when requested
Parameters
Statuses
Error codes
Home Location Registry Response when placing a home location registry enquiry
Facts What is HLR, and what information does it give?
Parameters
Content MO Requests from Sendega when receiving MO Content
Facts
Parameters
Number enquiry response Response for number enquireys - Norwegian subscribers only
Parameters
Positioning enquiry result Response for positioning enquireys - Norwegian subscribers only
Facts
Parameters
 
Code examples
Receive dlr Examples to how to receive and parse a delivery report
C#.net
vb.net
php All versions

Delivery reports

Parameters

Parameter Description
msgid Sendega message id
clientMsgId Transparent client message id
msisdn Recipient of the sms MT
status 4 - Delivered, 5 - Not delivered
statustext either "delivered" or "failed"
errorcode Sendega error code - See Error Codes
ErrorMessage
operatorErrorCode Error code received from MNO/MNVO


Statuses

Status Description Comment
1 Not sent Registered, but not sent operator
2 Queued Queued internally at Sendega and will be sent very soon
3 Sent Sent operator. Awaiting final delivery report
4 Delivered
5 Not delivered Not delivered. See errorcode for details
6 Queued for HLR Awaiting information about operator and will be sent as soon as this is received
7 Scheduled Scheduled to be sent in the future


Error codes

Errorcode Errordescription Extended description
100Successfully executedMessage was successfully delivered
101Invalid msisdnRecipient number is incorrect
102Invalid fromAlphaAlphanumeric sender is incorrect
103Invalid fromNumberNumeric sender is incorrect
104Invalid deliverytimeThe format of the field sendDate is incorrect
105Invalid pricegroup or not supportedPricegroup is invalid for the given msisdn
106Unknown subscriberSubscriber is unknown at operator
107Absent subscriber - Remove from databaseSubscription is cancelled. Number should ALWAYS be deleted from any database.
108Subscriber busy for MT-SMS or SIM card fullSIM card full, handset is switched off or sms queue full at operator. Message cannot be delivered to handset at this point.
109Invalid reference IDField refID is invalid
110Invalid content or content lengthMessage content or content length is invalid. Contact Sendega if you have further questions.
111Subscriber barred for mobile billingSubscriber cannot receive premium sms. Should be deleted from any subscription services.
112Subscriber is too youngSubscriber is too young for this premium service. Should be deleted from any subscription services.
113Subscriber reached monthly turnover limitSubscriber cannot be billed the rest of this month. Please retain any resending of premium sms in this period.
114Subscriber is temporarily barredSubscriber is temporarily barred and cannot receive any messages at the moment
115Subscriber is permanently barredSubscriber is permanently barred. Should be deleted from any subscription services.
116Subscriber account balance is to lowSubscriber account balance on prepaid card is too low for the current billing.
117Invalid Msisdn or operator not coveredSubscriber does not exist, or Sendega does not cover this operator. May also occur if submitting a illegal pricegroup for the subscribers operator
118Operator returned internal error Internal operator at operator.
119Network timeoutMessage timed out. Validity period expired or network error.
120Communication error with operatorCould not contact operator
121Operator not supported or not reachableOperator not covered by Sendega, or temporarily unavailable.
122Message queued at operator smscMessage queued at operator. A new delivery report will come at a later point.
123Billing failed. Content delivered to subscriberSubscriber could not be billed, but message was delivered end-user.
124Billing successful. Content not delivered to subscriberSubscriber was billed, but message could not be delivered.
125Subscriber is not registered for this service at the operatorThis error code usually occurs at operators that require MO opt-in, when this is missing while trying to send premium sms.
126Message acked by carrier - Awaiting statusMessage queued at operator or other aggregator. A new delivery report will come at a later point.
127Message not delivered. Carrier returned unknown errorUnknown error. Message probably not delivered due do unknown returncode, or general error.
128Rejected by operatorOperator rejected message. May be absent subsriber. Delete from any list if this error code occurs several times for one msisdn.
129Message filteredMessage filtered by Sendega or operator. Contact Sendega for more information.
130Subscriber is already registered for this service at the operatorError code occurs when trying to opt-in end-user when end-user allready is opted in.
131Not registered in payment systemRejected by Payment operator
197Prepaid account at Sendega does not have sufficient foundsPrepaid account at Sendega does not have sufficient founds
198Other operator error. Contact Sendega for more informationError at operator or other aggregator
199Other Sendega error. Contact Sendega for more informationInternal error at Sendega.
200Rejected by Sendega SMSCRejected by Sendega SMSC

Home Location Registry

Facts

The home location registry will return which network and country the subscriber currently is connected to. The response will come as two codes, called mcc (mobile country code) and mnc (mobile network code). This combination (often called mno) wil give an unique identifier for the network.

e.g. mcc 242, mnc 1 tells ut that the mobile subscriber is connected to Telenor, Norway.

To download the complete mcc/mnc list in csv format click here.

Parameters

Parameter Description
msgid Sendega message id
clientMsgId Transparent client message id
msisdn Subscriber number inquired
mcc Mobile country code
mnc Mobile network code
errorcode Sendega error code
ErrorMessage

Content MO

Facts

Content MO stands for Content Mobile Originated. As opposed to MT (mobile terminated) which is content You as a customer sends through Sendega's services to mobile subscribers.

When receiving MMS, the content data will be deliveres as a Base64 encoded string representation of the mms zip file. This contains a .smil-file with instructions to how to display the message, and other content files. In most cases an .txt file containing the content text of the mms, and a .jpg, .gif, .3gp, .mp3 or .wav (respectively images, videos or sound files)

Parameters

Parameter Description
msgid Sendega message id
msg Message content
mms 1 or 0 - indicating if message is MMS. Contains Base64 encoded string representation of mms content
mmsData Only present when mms=1
shortcode The shortcode or msisdn which was recipient of message
msisdn Senders msisdn
mcc Mobile country code
mnc Mobile network code
pricegroup Tariff for content MO

Number enqiry result

Parameters

Parameter Description
msgid Sendega message id
clientMsgId Transparent client message id
msisdn Subscriber number inquired
firstname
surname
address1 Address line 1
address2 Address line 2
zip
city
errorcode Sendega error code
ErrorMessage

Positioning enquiry result

Facts

The positioning service is only available for Norwegian subscribers located in Norway. It will give You a map with a pinpointed location, and the municipal, area and place name where the subscriber is located.

The degree of accuracy depends on where the subscriber is located. In a large city we are able to provide much more accurate results, than if the subscriber e.g. is on a mountain plateau.

Parameters

Parameter Description
msgid Sendega message id
clientMsgId Transparent client message id
msisdn Subscriber number inquired
mapUrl Relative url to map showing location
Maps are located at http://content.sendega.com/maps/<mapUrl>
errorcode Sendega error code
errorMessage Sendega error message

Code examples - Receive delivery reports

This is code you can add into the dlr handler script that is passed as an argument (dlrUrl) to the Send method

C#.net

In Page_Load add the following:
double messageID        =   Convert.ToDouble(Request.QueryString["msgid"]);     // Sendega message id
string clientMessageID  =   Request.QueryString["clientMsgId"];                 // Transparent client message id
int status              =   Convert.ToInt16(Request.QueryString["status"]);
int errorCode           =   Convert.ToInt16(Request.QueryString["errorCode"]);
string errorMessage     =   Request.QueryString["errormessage"];

if( status == 4 )
{
    // Message is delivered. 
}
else
{
    // Message is not delivered. errorcode and errormessage indicates why message is not delivered.
}

VB.net

In Page_Load add the following:
Dim messageID As Double        =   Convert.ToDouble(Request.QueryString("msgid"))     ' Sendega message id
Dim clientMessageID As String  =   Request.QueryString("clientMsgId")                 ' Transparent client message id
Dim status As Integer          =   Convert.ToInt16(Request.QueryString("status"))
Dim errorCode As Integer       =   Convert.ToInt16(Request.QueryString("errorCode"))
Dim errorMessage As String     =   Request.QueryString("errormessage")

If status = 4 Then
    ' Message is delivered
Else
    ' Message is not delivered. errorCode and errorMessage indicates why message is not delivered.
End If

php

Get all posted values in a script by using the following:
$messageID          = $_GET["msgId"];       // Sendega message id
$clientMessageId    = $_GET["clientMsgId"]; // Transparent client message id
$status             = $_GET["status"];
$errorCode          = $_GET["errorCode"];
$errorMessage       = $_GET["errorMessage"];

if( $status == 4 )
{
    // Message is delivered.
}
else
{
    // Message is not delivered. $errorCode and $errorMessage indicates why message is not delivered
}
Written by: Manfred Bjørlin
Last edit: 28/08-2008