Beruflich Dokumente
Kultur Dokumente
Handbook for CP
May 2009
Product Name: SMS Gateway
Document Title: SMS Gateway Handbook for CP
Confidentiality statement:
All information contained in this document is confidential and proprietary to XL, and intended only for
the addressee to whom this copy is addressed. The recipient shall not copy, distribute, disclose, or
use the information contained in it for any purpose other than that for which this document has been
made available or permit anyone else to do the same, without the express written permission of XL.
Amendment Record
Table of Contents
Table of Contents...................................................................................................................ii
1 Introduction..................................................................................................................... 1
4 SMPP Pipeline.............................................................................................................. 14
4.2 MT Charging.......................................................................................................................... 16
5.1.3 Delivery Report: HTTP GET Request from SMSGW to Content ...................................... 26
Table of Figures
Figure 6.1: Push SMS: HTTP POST/GET HTTP Response MT SMS ......................................... 33
Figure 6.7: Delivery Report: HTTP GET Request from SMSGW to Content ........................................ 45
Figure 6.8: Delivery Report: HTTP Response from Content to SMSGW ............................................. 46
1 Introduction
Before June 2009, SMS Gateway (SMSGW) managed traffic between SMSC and CP on the transport
level. Starting from June 2009, SMSGW manages the transport level and more things from the
application level. This is quite a big change. Therefore this document is provided to detail the changes
and also serves to supersede any previous documents on SMSGW and CP interaction.
Chapter 4- 6 will explain about the technical detail for each protocol.
2 Service Management
CP needs to input its services into SMSGW. A service is a combination between Short Destination
Code (SDC) and a keyword.
Use the tool provided with SMSGW to input your services. The tool is a web based application. Ask
XL’s system administrator for the URL of the tool.
1. Push
This type of service requires subscription. Usually daily Mobile Terminated (MT) SMS will be sent
to the subscriber.
2. Pull
This type of service requires no subscription. MT SMS will be sent only on request from Mobile
Originated (MO) SMS.
3. Quiz
This type of service requires subscription and the rules for this service will be explained in section
[].
Since services are differentiated by the keywords, the following rules apply:
• On one SDC, if a keyword has been used for Push service, it can still be used for Pull service.
• However, if the keyword is already used for service with type Quiz, the keyword can no longer be
used for Push and Pull services.
First, ask for an account to the service management tool from your Account Manager (AM). After you
get the account, use it to login to the tool. The following figure shows the login screen:
Check your username and password if you get “Invalid username and password” message. Password
is case sensitive.
Click on Service Management menu to list your services. There is a filter where you can choose to
view all services, or only services with: ACTIVE, REJECTED, and PROPOSED status.
Click on the Add Service button to add new service. The following screen will show:
• Shortname is used to tell which service relates to the MT. If you specify the same shortname
for more than one service, the tool will notify the error.
• Select the most appropriate category for your service.
• Select the type of your service as explained in section 2.1.
• Select the SDC for the service.
• Select the channel for the service. You should create one service for each channel. For
example: if your service runs on SMS and WAP, you should create one service for SMS and
another WAP.
• Put a checkmark on the Set Expired Date if your service is set to expire on certain date.
Otherwise, for long running services, you don’t have to check the box.
• Type a short description for the service.
• Type in the keywords. At least 1 keyword has to be provided. Separate the keywords using
comma
• After you finish, click on the Propose button.
• A notification will be sent to the AM.
• The proposed service should show up in the service list with the status column showing
“Proposed”.
• Check back to find out whether the proposed service is accepted or rejected by the AM. You
can tell by watching the status of your service.
If you leave required fields unfilled, you will get error messages like shown below. Please fill all
required fields.
You can edit the keywords for your service before or after your service becomes ACTIVE. When your
service is still PROPOSED, editing keywords just means sending newer notifications to your AM.
However, if your service is ACTIVE, be very careful when you want to edit keywords.
Please make sure your AM approves the keyword changes for ACTIVE services as soon as possible.
This is so because when ACTIVE service undergoes keyword editing, the service will change status
to PROPOSED. You need to make sure the AM approves this immediately to ensure the well running
of your service.
3. Find the service which keywords need to be edited. Click the link on service name.
4. Modify the keyword as necessary. After you have finished, click the Modify Keyword button.
5. Your service will become PROPOSED. This is why you need your AM to approve as soon as
possible so it can be ACTIVE.
3 Changes to MO and MT
Subscription for SMS services is controlled by the customer. Customer sends MO with REG as the
first word to subscribe. On the contrary, he sends MO with UNREG as the first word to unsubscribe.
Unlike the previous version of SMSGW, the current one will record the REG and UNREG.
CP will no longer receive clear MSISDN from MO and it can no longer submit MT with clear MSISDN.
In case of complaint from customer, CP will face a problem handling the complaint since it no longer
has the clear MSISDN in its database. For this situation a tool is provided.
The tool is very easy to use; just follow these simple steps after you ask the URL from XL’s system
administrator:
4. Input the CAPTCHA text. Type correct letters or digits from distorted image that appears on the
CAPTCHA screen.
In case the limit is reached, CP cannot perform anymore encryption, as the figure below shows:
Whenever CP receives an MO, a token called TX_ID will be embedded in the optional parameter.
Simply copy the value and embed the same token in MT.
3.3.2 Shortname in MT
As previously mentioned in page 6, SMSGW has to know which service relates to the MT. Just embed
shortname inside the optional parameter.
MT for Quiz service must include Content-Type inside the optional parameter. There are 2 values:
• INFO
• QUESTION
SMSGW keeps track of the number of MT submitted by CP for its Push services. Please do not
submit more MT than specified in the Product Brief.
For Quiz services, CP is allowed to send 1 INFO and 1 QUESTION per day. If the subscriber has not
answered the QUESTION for that day, CP will not be able to send more QUESTIONs. However, CP
is welcome to send more QUESTIONs if the subscriber answers.
There will be time when CP’s subscription records differ from SMSGW’s. The possible causes are:
If SMSGW receives MO with either one of: UNSUB, STOP, or OFF; SMSGW will not pass
the MO to CP and it will conduct auto unsubscribe of the MSISDN from all services in all
SDC.
If SMSGW receives MO with only UNREG, SMSGW will not pass the MO to CP and it will
conduct auto unsubscribe of the MSISDN from all services on that SDC.
When subscriber of QUIZ service does not answer 5 consecutive QUESTIONs, SMSGW
th
will conduct auto unsubscribe of the MSISDN from that QUIZ service on the 6
QUESTION. Thus, please remove the MSISDN from your (CP) subscription record if you
receive MAX UNANSWERED QUESTIONs ERROR.
• MSISDN is obsolete
SMSGW will remove all subscription of an MSISDN if the network tells SMSGW that the
status of MSISDN is DEACT.
4 SMPP Pipeline
If your content is registered as an SMPP Pipeline application in the gateway, please read this section.
Ask your contact person at Excelcomindo to find out what your application is registered as.
Short Message Peer to Peer Protocol (SMPPP) is an open message-transfer protocol that enables
short message entities (SMEs) outside the mobile network to interface with SMSGW. SMPP is based
on the exchange of request and response protocol data units (PDUs) between your Content
Application and the SMS Gateway over an underlying TCP/IP or X.25 network connection.
The exchange of messages between your Content Application and SMSGW via SMPP may be
categorized under three distinct groups of transactions as follows:
• Messages sent from your Content Application (Transmitter) to SMS Site Server
• Messages sent from SMS Site Server to your Content Application (Receiver)
• Messages sent from your Content Application (Transceiver) to SMS Site Server and
messages sent from SMS Site Server to your Content Application (Transceiver)
An SMPP session between an SMSGW and your Content Application is initiated by the Content
Application first establishing a network connection with the SMS Site Server and then issuing an
SMPP Bind request to open an SMPP session. Your Content Application wishing to submit and
receive messages is required to establish two network connections (TCP/IP or X.25) and two SMPP
sessions (Transmitter and Receiver). Alternatively, in this version of the protocol, you may establish
an SMPP Transceiver session over a single network connection. During an SMPP session, you may
issue a series of requests to an SMSGW and shall receive the appropriate responses to each
request, from SMSGW. Likewise, you may issue SMPP requests to you, which must respond
accordingly.
The SMPPP session may be defined in terms of the following possible states:
• OPEN
Your content application has established a network connection to the SMSGW but has not yet
issued a bind request.
• BOUND_TX
A connected Content Application has requested to bind a content application transmitter (by
issuing a bind_transmitter PDU) and has received a response from the SMSGW authorizing its
bind request.
• BOUND_RX
A connected content application has requested to bind as a content application receiver (by
issuing a bind_receiver PDU) and has received a response from the SMSGW authorizing its bind
request.
1. Shortname = excelcom
The value for length (pictured above inside the third and fourth box from the left) must be the
same as the length of the string. In this example “excelcom” length = 8 characters, that’s why the
value in length field is 00 08.
2. Content-Type = question
3. Content-Type = info
4. TX_ID
4.2 MT Charging
When you’re connected directly to the MT Charging Unit, you will know that your MT SMS is
successfully charged to the subscriber as soon as you receive a positive SUBMIT SM Response from
the unit regardless of whether the subscriber has received the SMS on their mobile.
• MT charging successful
• MT charging unsuccessful
If you receive a negative SUBMIT SM Response (status NOT EQUAL 0), you know that the MT
charging does not succeed. Specifically, if you receive status = ESME_RSUBMITFAIL (0x00000045),
you know that the subscriber has no sufficient balance and MT charging does not succeed In this
case you will mark in your record that the particular MT SMS is not chargeable and you may optionally
retry (subject to your agreement with Excelcomindo). You can retrieve the status of SUBMIT SM
Response by looking to column command status of packet SUBMIT_SM_RESP, please see the
status ID of Submit SM Response.
Submit SM response from SMSGW will contain the status ID of the MT. There are 3 kind of status ID:
100d Invalid SMS Data To Send Retry with the data fixed
Size
field Type Description
(octets)
Size
field Type Description
(octets)
submit 10 C-Octet Fixed The time and date at which the short message
date Length String was submitted. In the case of a message which
has been replaced, this is the date that the
original message was replaced. The format is as
follows:
YYMMDDhhmm where:
MM = month (01-12)
DD = day (01-31)
hh = hour (00-23)
mm = minute (00-59)
done 10 C-Octet Fixed The time and date at which the short message
date Length String reached its final state. The format is the same as
for the submit date.
stat 7 C-Octet Fixed The final status of the message. For settings for
Length String this field see Table B-2.
Size
field Type Description
(octets)
Final Message
Message State Description
States
Here are the items that you must pay attention to the following important notes in handling your
transactions: please see SMPP Specification for more details.
1. Please use timeout value 60 seconds for waiting SUBMIT SM responses from SMS Site Server. If
after 60 seconds at maximum your Content Application hasn't received SUBMIT SM responses,
then the transaction can be considered as failed transaction.
2. SUBMIT SM responses tell you everything you need to know about the charging state of your
transactions.
3. You CAN ONLY perform retries on SUBMIT SM responses with status id other than 0. However,
please also notify that it MUST NOT break XL rules about which error code can be retried and
which error code cannot. Please see Appendix, for the list of those special error codes and the
treatment CP should taken care based on them.
5. You MUST NOT do retry for failed MT transaction due to timeout waiting SUBMIT_SM_RESP
from SMSGW.
6. By default, you will not receive a Delivery Report anymore, but you can ask to activate Delivery
Report. Even though Delivery Report has been requested, it would be the Delivery Report will not
be sent to you because as default, Delivery Report is disabled.
5 iSMS Protocol
iSMS protocol is an HTTP-based protocol that enables the SMSGW to pass a mobile originating (MO)
SMS to a content application/service and get a response back from the content application that will be
sent back to the originating mobile as a mobile terminated (MT) SMS.
iSMS also includes a mechanism of passing a delivery report from SNSGW to a content application.
Diagram below describes the interaction between the SMSGW and content application.
When a mobile sends an SMS that is received by SMSGW from the SMSC, SMSGW will decide
which content application the MO SMS belongs to and forward it to the correct one.
Here the explanation below about how the server passes the MO SMS to the content application and
how the content application should respond.
SMSGW passes the MO SMS to the chosen content application by sending an HTTP POST request
to the content application.
• Headers
X-Dest-Addr The destination of the SMS, usually the short code i.e.
9090, 9554
• Request Parameters
Note that the HTTP request is sent to the URL registered for the content application.
There will be other header information passed as part of a complete HTTP request but they are not
significant as far as the iSMS protocol goes.
If you tap the TCP/IP traffic form the SMSGW to the content application, you will get something like
the following (let’s assume that the URL path of the content is /quiz.jsp):
POST/quiz.jsp HTTP/1.1
X-Source-Addr: 0697055743607
X-Dest-Addr: 1235
User-Agent: Jakarta Commons-HttpClient/2.0rc1
Content-Length: 39
Content-Type: application/x-www-form-urlencoded
_sc= TEMPO+A+tidak+manusiawi&_tid=610410BFFBED3E3B9FF7
When a content application receives the HTTP request from SMSGW, it must respond with HTTP
status code 200 and carry valid iSML document in the response body.
SMSGW will parse the iSML document and if applicable, send an MT SMS to originating mobile
according to the instruction in the iSML document.
HTTP response headers other than the content type are not significant as far as the iSMS protocol
goes.
HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 139
Date: Wed, 05 Nov 2002 14:38:01 GMT
Server: Apache Coyote/1.0
<?xml version=”1.0”>
<isml>
<card id=”thanks” title=”Thanks”>
<p> Terima kasih atas opini anda.</p>
</card>
</isml>
When SMSGW receives delivery report from the SMSC, it will forward the report to the corresponding
content application by sending an HTTP GET request to the content application.
• Request Parameters
Mandatory Parameters
101 = Undeliverable
102 = Delivered
dtdone The time and date the MT SMS reached its final state, in
YYYYMMDDHHMISS format where
HH = hour (00-23)
MI = minute (00-59)
SS = second (00-59)
Optional Parameters
smpp_status_code The error code from the SMPP server (see SMPP
specification)
POST/delivery.jsp HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/2.0rc1
Content-Length: 61
Content-Type: application/x-www-form-urlencoded
_tid=610410BFFBED3E3B9FF7&status_id=102&dtdone=20031105214333
Upon receiving the HTTP GET request from SMSGW, a content application must respond with HTTP
status code 200. SMSGW will ignore the HTTP response body.
If a content application responds with HTTP status code other than 200, SMSGW will ignore the
response.
iSML is an XML document that defines the SMS response from a content application.
<?xml version=”1.0”?>
<isml>
<card id=”hello”>
<p>Hello World!</p>
</card>
<isml>
When SMSGW receives the above iSML from a content application, it will send an MT SMS back to
the originating mobile containing the text “Hello World!”
<?xml version=”1.0”?>
</isml>
When SMSGW receives the above iSML from a content application, it will not send any MT SMS back
to originating mobile.
The previous iSML examples are simple, i.e. a mobile sends an MO SMS and the content sends back
a reply MT SMS and it stops there.
What if you want to have a session (a state) into the interactivity? For example, suppose you want to
have an interactive question and answer survey application with keyword “XX” as follows:
User sends an SMS “XX SURVEY”, which will be routed to the survey content service.
The content service will send back with an SMS prompting the user to enter his name. When the
system receives the name, it will send back the first survey question and so forth. This kind of survey
application can be implemented with the following iSML document:
First document:
<?xml version=”1.0”?>
<isml>
<card id=”hello”>
<menu showchoice=”off”>
<prompt>Halo, terima kasih atas ketersediaan anda ikut survey
Silahkan ketik nama anda.<prompt>
<nomatch><goto next=”/savename.jsp”/></nomatch>
</menu>
</card>
</isml>
In the above iSML example, whatever response the user sends will cause SMSGW to issue an HTTP
POST to URL path /savename.jsp (the same host and port as the current context), passing the usual
header and request parameters (see section 3.1.1 MO SMS: HTTP Request from SMSGW to
Content).
Your application at /savename.jsp should process the SMS, which should contain the user name.
Then your application will produce the following second document (either by redirecting to another
URL or outputting it directly on the response).
Second document (after you process the user name in /savename.jsp in the above example):
<?xml version=”1.0”?>
<isml>
<card id=”survey”>
<menu showchoice=”off”>
<prompt><%=username%>, setujukan anda Abubakar Baasyir divonis 4 tahun sebagai
teroris? <prompt>
<choice next=”/setuju.jsp” token=”setuju”>SETUJU</choice>
<choice next=”/tidak.jsp” token=”tidak”>TIDAK</choice>
<nomatch><goto next=”/showhelp.jsp”/></nomatch>
</menu>
</card>
</isml>
This time the above document tells the SMSGW to send back an SMS to the user and present the two
options, i.e. SETUJU or TIDAK. When the user responds with an SMS “SETUJU”, the SMSGW knows
that it has to issue an HTTP POST request to the URL /setuju.jsp.
If the user responds with an SMS other than SETUJU or TIDAK (and assuming there is no other
application matching that answer keyword defined for the short code), SMSGW will issue an HTTP
POST request to URL /showhelp.jsp, as indicated by the no match element.
Note that in order to take advantage of this feature, the interactive session must be explicitly enabled
for your content application. Please contact the operator administrator.
<!ELEMENT isml
(card+)+ >
<!ELEMENT card
( menu | p ) >
<!ATTLIST card
%coreattrs;
title CDATA #IMPLIED
display-only (yes|no)”no”
registered (yes|no)”no” >
<!ELEMENT menu
( prompt?,choice+, nomatch?) >
<!ATTLIST menu
showchoice (on|off) “off”
timeout CDATA #IMPLIED >
<!ELEMENT p
( %text; ) >
<!ELEMENT prompt
( %text; ) >
<!ELEMENT choice
( %text; ) >
<!ATTLIST choice
next %uri; #REQUIRED
token CDATA #REQUIRED >
<!ELEMENT nomatch
( goto ) >
<!ELEMENT timeout
( %text; ) >
6 Push Protocol
Push protocol is an HTTP-based protocol that enables content applications to send an SMS to an
MSISDN proactively and optionally receive its delivery report.
Below is a diagram that describes the interactions between the SMSGW and content application.
1. The HTTP POST/GET request for MT SMS from content applications to SMSGW.
2. The HTTP response XML from SMSGW to content applications, which acknowledges the MT
SMS transmission request.
3. The HTTP GET request for delivery report from SMSGW to content applications, if delivery
report option for the corresponding content application is enabled.
4. The HTTP response from content applications to SMSGW acknowledging the delivery report.
tx_id Transaction ID
Simple text enables a content application to send an SMS text using the default alphabet with no
delivery report. If parameter “text” is longer than 160 characters, SMSGW will send 2 (two) or more
MT SMS that form a concatenated long SMS as according to GSM 03.40.
• Example:
http://202.152.224.18:10099/webpush/pushText.jsp?dest_addr=628176711016&app_id=2000006
6&app_pwd=testurl&text=Terima+kasih+anda+telah+berpartisipasi+dalam+poling+sms+kami&sh
ort_name=cndxx&source_addr=9999. This example shows the http request using the mandatory
parameters.
Mandatory Parameters
E,g, “45A06132”
Optional Parameters
Default is “no”.
Default is “0”.
Default is “1”.
Default is “0”
Default is “no”.
Full option enables a content application to send an SMS data including binary data such as
ringtones, picture logos, WAP push, etc. Full option exposes the complete options for sending an
SMS.
If a content partner wants to send text SMS with delivery report enabled, then they should use this
feature.
• Example:
o http://202.152.224.18:10099/webpush/push.jsp?dest_addr=628176711016&app_id=2000
0066&app_pwd=testurl&data=0B0504C34FC0020003040202296A010186071103687474
703A2F2F7761702E646B0001&udhi=yes&alphabet_id=1
This example in the above shows the http request using the mandatory parameters. The
data that being sent is part of a ring tone binary that has been encoded into hexadecimal.
Maximum byte that can be sent in one sms is about 140 bytes, which when encoded into
hexadecimal are about 280 characters. If you split the ringtone into two or more parts,
then you must supply the udhi parameters (set it to yes), so that the ring tone can be
joined again after arrived in the user mobile phone. For sending binary data, you must
supply the alphabet_id parameter (set it to 1).
o http://202.152.224.18:10099/webpush/push.jsp?dest_addr=
20000066&app_pwd=testurl&data=0B0504C34FC0020003040202296A01018607110368
7474703A2F2F7761702E646B0001®istered=yes
This example in the above shows the http request using the mandatory parameters. The
data that being sent is part of a ring tone binary that has been encoded into hexadecimal
and that the content is requesting a Delivery Report. The CP must supply the address
where the delivery report is going to be sent.
o http://202.152.224.18:10099/webpush/push.jsp?dest_addr=628176711016&app_id=2000
0066&app_pwd=testurl&data=Terima+kasih+anda+telah+mengirim+sms+kuis+hari+ini&r
egistered=yes&msg_class=0
This example in the above shows when the content partner sent a flash sms (define by
msg_class parameter set to 0).
Upon receiving the HTTP request from a content application, SMSGW will respond back with HTTP
status code 200 and a push response XML in the HTTP response body.
<?xml version="1.0"?>
<push-response>
<tid>the transaction id</tid>
<status-id>the status of the request</status-id>
</push-response>
or
<?xml version="1.0"?>
<push-response>
<status-id>the status of the request</status-id>
<message>the error message</message>
</push-response>
0 = OK
When MT SMS is successfully charged to the subscriber as soon as you receive a positive HTTP
Response from the SMS Site Server regardless of whether the subscriber has received the SMS on
their mobile.
If you receive a HTTP Response (status EQUAL 0), the MT charging succeed.
If you receive a HTTP Response (status NOT EQUAL 0), you may know that the MT charging does
not succeed.
HTTP responses from SMSGW will contain the status ID of the MT. There are 3 kind of status ID:
100d Invalid SMS Data To Send Retry with the data fixed
Error Code
Status Description Error Handling
Hexa Dec
Error Code
Status Description Error Handling
Hexa Dec
MSISDN Invalid
In case :
MSISDN is not XL
MSISDN or MSISDN
not in White List while
application still in Delete this MSISDN from your
0x011 11 Rejected Testing stage database start from now
Error Code
Status Description Error Handling
Hexa Dec
this MSISDN
b. Aggregating this error code into one general error code (Declined – Other)
Error Code
Status Description Error Handling
Hexa Dec
Error Code
Status Description Error Handling
Hexa Dec
1. As default, delivery report will be disabled for all you, but you can ask to activate delivery
report. Even though delivery report has been requested, it would be the delivery Report will
not be sent to you because as default, Delivery Report is disabled.
2. Please use http connection timeout value 60 seconds for waiting HTTP Response from SMS
Site Server. If after 60 seconds at maximum your Content Application hasn't received the
response, then the transaction can be considered as failed transaction.
3. You CAN ONLY perform retries on HTTP responses with status id other than 0. However,
please also notify that it MUST NOT break XL rules about which error code can be retried and
which error code cannot. Please see enclosure Table 1, for the list of those special error
codes and the treatment CP should taken care based on them.
5. You MUST NOT do retry for failed PUSH transaction due to timeout waiting HTTP response
from SMSGW.
When SMSGW receives delivery report from the SMSC, if the delivery report option for the
corresponding content provider is enabled, then SMSGW will forward the report to the content
provider by sending an HTTP GET request to the content application with the following details:
Figure 6.7: Delivery Report: HTTP GET Request from SMSGW to Content
• Request Parameters
Mandatory Parameters
Optional Parameters
smpp_status_code The error code from the SMPP server (see SMPP
specification)
Upon receiving the HTTP GET request for delivery report form SMSGW, a content application must
respond with HTTP status code 200. SMSGW will ignore the HTTP response body.
If a content application responds with HTTP status code other than 200, SMSGW will ignore the
response.