Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

This protocol is used for sending and receiving SMS messages and MMS ones, processing WAP requirements, and playing SMS games.
The protocol is built on the standards such as TCP, HTTP (or HTTPS), and XML. GAP server (GAme Platform) on the Orange side and an application (D2000 KOM process) are the communication partners.
The implementation in D2000 System supports the following messages:

...

MessageDirectionMeaning
HELLOKOM->GAPLogging on (name + password) to the GAP platform when starting the connection.
INQUIRE_LINKKOM->GAP
GAP->KOM
Testing the functionality of connection after a longer period of inactivity.
INQ_RSPKOM->GAP
GAP->KOM
Response to INQUIRE.
RECEIVE (sms)GAP->KOMReceiving SMS from GAP server.
RCV_RSP (sms)KOM->GAPConfirmation of receiving SMS by D2000 KOM.
SEND (sms)KOM->GAPSending SMS message.
SND_RSP (sms)GAP->KOMConfirmation of receiving SMS by GAP server.
ACCEPTEDGAP->KOMConfirmation of receiving SMS or MMS by SMS/MMS center.
ACC_RSPKOM->GAPResponse to ACCEPTED from D2000 KOM.
RECEIPT (sms)GAP->KOMConfirmation of receiving SMS by an end-user.
REC_RSPKOM->GAPResponse to RECEIPT from D2000 KOM.
BYKOM->GAPEnd of connection by D2000 KOM.
BY_RSPGAP->KOMResponse to BY from GAP server.
NAKGAP->KOMUnacceptable An unacceptable message is declined.

The following messages have not been implemented yet:

...

MessageDirectionMeaning
RECEIVE (wap)GAP->KOMReceiving WAP requirement from GAP server.
RCV_RSP (wap)KOM->GAPWAP requirement by D2000 KOM.
RECEIVE (mms-xml)GAP->KOMReceiving MMS from GAP server.
RCV_RSP (mms-xml)KOM->GAPConfirmation of receiving MMS by D2000 KOM.
SEND (mms-xml)KOM->GAPSending MMS.
SND_RSP (mms-xml)GAP->KOMConfirmation of receiving MMS by GAP server.
RECEIPT (mms)GAP->KOMConfirmation of receiving MMS by an end-user.
SCOREKOM->GAPChanging the player's score.
SCO_RSPGAP->KOMResponse to SCORE from GAP server.
NICKKOM->GAPAdministration of nicknames: creation, canceling, adding, deleting, and searching.
NICK_RSPGAP->KOMResponse to NICK from GAP server.

...

Note: GDEP protocol is built over HTTP or HTTPS protocol. D2000 KOM process does not include HTTPS communication. It uses the stunnel program (modular method). The stunnel program is able to wrap both the client and server communication in the SSL layer. As GDEP protocol needs the implementation the of both client and server on each side (both GAP server and D2000 KOM), you must start two stunnel processes:

  • one of them is in a server mode, which will wait on the connection of the GAP server. After processing the SSL layer, it will send data to the defined port, on which D2000 KOM is waiting as a GDEP server (see the parameter Server Port).
  • the other one is in a client mode, which waits on the defined port. D2000 KOM (client-side) will be connected with it. After wrapping data in the SSL layer, the stunnel will send them to a target computer and port (server port of GAP server). Therefore, in the the Host parameter Host , there will be localhost and in the the Port parameter Port , there will be the port number on which the stunnel process is waiting in a client mode.

...

Key woreFull nameMeaningUnitDefault value
Kotva
rd
rd
RD
Relogin DelayWaiting before repeated attempt to log on to GAP server.sec10
Kotva
tki
tki
TKI
TCP KeepInit optionKeepInit setting of TCP protocol.-False
Kotva
ce
ce
CE
Station Communication ErrorNumber A number of failed attempts to connect to the server when the station switches to StCOMERR status.-1
Kotva
he
he
HE
Station Hard ErrorNumber A number of failed attempts to connect to the server when the station switches to StHARDERR status.-3
Kotva
u
u
U
User NameUser name to log on to GAP server.--
Kotva
p
p
P
UserPasswordPassword The password to log on to the GAP server.--
Kotva
hh
hh
HH
HTTP HostIP address or server name, which is specified in the HTTP request.--
Kotva
hp
hp
HP
HTTP PortPort of server, which is specified in the HTTP request.-0
Kotva
sp
sp
SP
Server PortPort The port on which KOM is listening as a server.-1000
Kotva
tsi
tsi
TSI
Timeout Send InquireAfter this timeout, KOM will send INQUIRE message (0=disabled).sec90
Kotva
tri
tri
TRI
Timeout Receive Inq_RspTill this timeout, KOM will wait for INQ_RSP (response to INQUIRE).sec10
Kotva
tra
tra
TRA
Timeout Receive AcceptAfter this timeout, the KOM process denotes the message as being expired (confirmation level 2), if an ACCEPTED message does not come.sec10
Kotva
trr
trr
TRR
Timeout Receive ReceiptAfter this timeout, the KOM process denotes the message as being expired (confirmation level 3), if a RECEIPT message does not come.sec60
Kotva
k1
k1
K1
H1
P1
K2
H2
P2
KOM Name 1
Host Address 1
Port Number 1
KOM Name 2
Host Address 2
Port Number 2
When using in D2000 System redundancy (two D2000 KOM): if the name of workstation, on which D2000 KOM is running, is the same than K1 (or K2) parameter, when connecting to GAP server, HELLO message will contain the optional parameters host and port with values H1 and P1 (or H2 and P2). This way, the GAP server knows on which of two D2000 KOM shall connect.

Kotva
merany_bod
merany_bod
I/O tag configuration

...

I/O tag is defined by itsr its address, which must correspond with the address specified in the tables below. I/O tag names can be different.

...

AddressTypeI/O tag nameMeaning
1TxtORcv_Id

A 64-bit ID of received SMS (RECEIVE message). After processing of the message by an application, the KOM process should be informed, by writing into this I/O tag, to confirm the receiving by RCV_RSP message and make accessible next SMS to the application (if it is in a queue).
[message sequence ID on the Game Platform (64-bit number displayed decimally in ASCII format). It is used for duplicate receipt detection when a session has been re-established after the connection failure.]

2TxtIRcv_Serv_IdParameter servServ_id parameter of the received message.
[service ID that this message belongs to.]
3TxtIRcv_AppAddrParameter appaddr of Appaddr parameter  of the received message.
[destination number. It can be a short or long number dedicated to the service (External Application). It is the identification of the game. It is never encrypted. ]
4TxtIRcv_AppAddrTypeType The type attribute of of appaddr parameter appaddr.
5TxtIRcv_MsisdnParameter msisdn Msisdn parameter of the received message.
[source number. Can be encrypted, see the type attribute.]
6TxtIRcv_MsisdnTypeAttribute type of  attribute of msisdn parameter msisdn.
7CiRcv_EmployeeParameter employee of the received message.
[if application have enabled mark of the employee, then element employee has value
  0 – if source MSISDN is NOT an employee
  1 – if source MSISDN is employee]
8CiRcv_DcsParameter dcs of the received message.
[parameter data_coding of the GDEP protocol (DCS) [SMPP PS v3.4]. (8-bit integer defined in the ASCII). Default = 0.]
9CiRcv_EsmParameter esm of the received message.
[parameter esm of the SMPP protocol (DCS) [SMPP PS v3.4]. (8-bit integer defined in the ASCII). Default = 0.]
10TxtIRcv_Recv_DateParameter receive_date of the received message.
[time of receive SMS to the SMS center.]
11TxtIRcv_CodingAttribute coding of the content parameter content.
[type of coding in the element content. Currently used are:
  text ASCII text,
  base64 content is coded by code base64 – this is used for binary data.]
12TxtIRcv_ContentParameter content of the received message.
[nothing but data. Data sent by the subscriber to the External Application (SMS).]
13TxtIRcv_MsgPartParameter msg_part of received message (trio ref_num/seg_num/tot_seg).
[ref_num - contain an originator generated reference number so that a segmented short message may be reassembled into a single original message
seg_num - sequence number of the particular message within the concatenated message
tot_seg - indicating the total number of fragments]


SMS sending: When sending an SMS message, you should set the values for the following I/O tags (if they have been configured). The message will be sent after setting the value of the I/O tag Snd_AppDefId.
The symbol (o), stated at the I/O tag means that the tag is optional (it may not be configured because GDEP protocol denotes this attribute as optional).

...

AddressTypeI/O tag nameMeaning
101TxtOSnd_Serv_IdParameter serv_id of the sent message.
[service ID that this message belongs to.]
102TxtOSnd_Rcv_Msg_Id (o)Parameter rcv_msg_id of the sent message.
[ID of the received message (RECEIVE) that this message is a response to]
103TxtOSnd_AppAddrParameter appaddr of the sent message.
[source number. It can be either a short or long (MSISDN) number assigned to the service.]
104CoSnd_AppAddrType (o)Attribute A type of attribute of appaddr parameter appaddr.
105TxtOSnd_MsisdnParameter msisdn of the sent message.
[destination number. In the case of a mobile telephone number, it can be encrypted. In the case of a short number, the destination number is the short number only.
Can be encrypted, the type is present in the type attribute.]
106CoSnd_MsisdnType (o)Attribute type of  attribute of msisdn parameter msisdn.
107TxtOSnd_BillMsisdn (o)Parameter billmsisdn of the sent message.
[MSISDN to which the message will be billed (this tag is only used with specific applications, where the billed subscriber is not the recipient of the message. This option must be approved at the Game Platform by agreement with the marketing dept.)
Can be encrypted, the type is present in the type attribute.]
108CoSnd_BillType (o)Attribute type of  attribute of billmsisdn parameter billmsisdn.
109CoSnd_Flags (o)Parameter flags of the sent message.
[32-bit numbers displayed decimally in ASCII format. Flags are combined with the OR binary function. Unused bits are reserved.
SMS_FLAG_RECEIPT bit 1 - delivery receipt requested
SMS_FLAG_REPLACE bit 2 - SM replacement requested on SIM card position under bits 4-6
SMS_FLAG_POSITION bit 4-6 - SIM position for SM replacement
position range: from 1 to 7, 0 is unused]
110TxtOSnd_Expiration (o)Parameter expiration of sent message.
[validity period of the SM in the GSM time encoding (i.e. YYMMDDhhmmsst), or the character „-", if not defined]
111TxtOSnd_Delivery (o)Parameter delivery of the sent message.
[delivery time of the SM in the GSM time encoding (i.e. YYMMDDhhmmsst), or the character „-", if not defined.]
112TxtOSnd_BillKeyParameter billkey of the sent message.
[billing key, 4 characters long string consisting of (0..9) and (A .. Z). Each application will have 4 keys to be used in this field]
113TxtOSnd_Evbill_Id (o)Parameter evbill-id of the sent message.
[service identifier in the event billing in case this type of billing method should be used.]
114TxtOSnd_EvbillIdSeq (o)Parameter evbill-id-seq of the sent message.
[service identifier in the event billing in case this type of billing method should be used.]
115CoSnd_Dcs (o)Parameter dcs of the sent message.
[parameter data_coding of the SMPP protocol (DCS) [SMPP PS v3.4]. (8-bit integer defined in the ASCII). Default = 0.]
116CoSnd_Esm (o)Parameter esm of the sent message.
[parameter esm of the SMPP protocol (DCS) [SMPP PS v3.4]. (8-bit integer defined in the ASCII). Default = 0.]
117TxtOSnd_Score (o)Parameter score of the sent message.
[the game is sending score for the subscriber with – MSISDN. Format:
+score – Game Platform adds this score value to the daily counter
-score – Game Platform subtracts this score value from the daily counter
score – Game Platform replaces the daily counter by this score value
(daily counter is a parameter, which is bind to MSISDN, nick, game, and day. This counter will be changed only by GDEP protocol)]
118TxtOSnd_ScoreNick (o)Attribute nick of score parameter score.
[– if this attribute will be used it will define the particularly used nick of the subscriber defined by MSISDN. Score The score will update the daily counter for this MSISDN and nick. If this attribute will not be used daily counter for MSISDN and default value nick="" will be used.]
119TxtOSnd_ScoreFinish (o)Attribute finished finished of score parameter score.
[if this attribute will be used (with the any value, the default value will be empty string ""), the Game Platform will add the new issue to the table C_SCORE, where will be add each player so many time how many will finish the game successfully. Use this attribute only after successful finishing of the game by the player.]
120TxtOSnd_CodingParameter content of the sent message.
[type of coding in the element content
Currently used are:
text ASCII text base64 content is coded by code base64 – this is used for binary data.]
121TxtOSnd_ContentParameter content of the sent message.
[nothing but data. Data sent by the External Application (SMS) to the subscriber.]
122TxtOSnd_Category (o)Parameter category of the sent message.
[element can be used to specify the category of content that is to be sent, character string 1-64 bytes long]
123Co
Kotva
snd_appdefid
snd_appdefid
Snd_AppDefId
Any positive integer, generated by the application, that (for application) defines the sent SMS. The confirmation of delivery or nondelivery non-delivery will contain this number (I/O tag Rsp_AppDefId) , if the KOM process has not been restarted.
130TxtISnd_64bit_IdA 64-bitový identifier that sets bit identifier set by the KOM process when setting sending an SMS message. As the GDEP protocol uses a unique 64-bit identifier (GDEP server initiates its value when connecting to D2000 KOM process), the confirmation of delivery is marked internally by this 64-bit ID. If the KOM process is restarted, after start-up the GAP server could send the confirmations of delivery, which have been sent before restart. In such a case, D2000 KOM sets Snd_AppDefId to -1. The application may couple the confirmations according to Snd_64bit_Id.

...

Confirmation of SMS delivery: After receiving the ACCEPTED, RECEIPT, and NAK messages, the following I/O tags will be set (Rsp_AppDefId will be set as the last).

...

AddressTypeI/O tag nameMeaning
131Co
Kotva
rsp_appdefid
rsp_appdefid
Rsp_AppDefId
Snd_AppDefId of sent message or -1, if the message with this number has not been found in the list of sent and unconfirmed messages (e.g. after restart restarting of KOM process).
After processing the confirmation of delivery, the application must set Rsp_AppDefId on 0. It causes that the confirmation will be sent to the GAP server (ACC_RSP message or REC_RSP, depending on the message on which D2000 KOM responds) and  D2000 KOM can set the next value , if it has other confirmation of delivery.
132CiRsp_ErrNoNumber of The error number: 0 - no error, any other values are mentioned in the literature [1].
If the RECEIPT message has been received, Rsp_ErrNo copies the value of the state, except the value 2 (delivered) and 6 (accepted) - the message is considered to be delivered successfully and Rsp_ErrNo=0.
133CiRsp_CnfTypeLevel of confirmation:
level 1 - the message has been sent to the GAP server (Rsp_ErrN=0) or an error occurred when sending (Rsp_ErrNo=-1)
level 2 - the ACCEPTED message has been received (with zero or nonzero error code, whose value is in Rsp_ErrNo) or timeout Timeout Receive Accept has expired (Rsp_ErrNo=-2)
level 3 - RECEIPT message has been received or timeout Timeout Receive Receipt has expired (Rsp_ErrNo=-3)
134TxtIRsp_ErrDescText description of the error (when expiring the timeout) or value err_type when there is the negative message ACCEPT.
[err_type - a type of error, one of SMSC, MMSC, INTERNAL
  • SMSC means the error occurred in SMSC
  • MMSC means the error occurred in MMSC
  • INTERNAL means the error occurred in GAP
]
135TxtI
Kotva
rsp_serv_id
rsp_serv_id
Rsp_Serv_Id
A 64-bit ID of the sent SMS message to which this report relates.
The values of these I/O tags are valid only when receiving RECEIPT.
136TxtIRec_Submit_DateParameter submit_date of RECEIPT message.
[date of delivery of sent SMS message to SMS center]
137TxtIRec_Done_DateParameter done_date of RECEIPT message.
[date of delivery of sent SMS message to destination]
Kotva
state
state
138
CiRec_StateParameter state state of RECEIPT message.
[state of the message, can have the following values (as described in [2] SMPP 3.4, chapter 5.2.28 message_state):
  • 1 – enroute - the message is in enroute state
  • 2 – delivered – the message is delivered to the destination
  • 3 – expired – message validity period has expired
  • 4 – deletedthe message has been deleted
  • 5 – undeliverablethe message is undeliverable
  • 6 – acceptedthe message is in an accepted state (i.e. has been manually read on behalf of the subscriber by customer service)
  • 7 – unknownthe message is in an invalid state
  • 8 – rejectedthe message is in a rejected state
]
Note: If the RECEIPT message with state=1 (temporary enroute state) has been received, the application waits once more with the timeout Timeout Receive Receipt to receive the RECEIPT message of the final state.


139


TxtI


Rec_MsisdnParameter msisdn of RECEIPT message.
[msisdn that the message is delivered to. It can be encrypted.]
140TxtIRec_MsisdnTypeAttribute An attribute type of msisdn parameter.


Identification of communication status:

...

AddressTypeI/O tag nameMeaning
199Di
Kotva
gap_srvconnected
gap_srvconnected
GAP_SrvConnected
Information on whether the GAP server is connected to the D2000 KOM process. After breaking the communication, there can happen the situation when D2000 KOM will connect to the GAP server, but the GAP server will not connect to the D2000 KOM process. If for example, the value of GAP_SrvConnected is FALSE within a minute after reconnection to the GAP server (the status of the station is StON), we recommend you to restart restarting the D2000 KOM. If it fails, contact the responsible person for the GAP server.


Kotva
type
type
Attribute type (Rcv_AppAddrType, Rcv_MsisdnType) can acquire values listed in the table below (the numeric values are entered when sending SMS messages, the text ones when receiving SMS messages):

...

ValueNumberMeaning
msisdn1Cell phone number in the format +421905123456.
alias2Encrypted number of user An encrypted user phone number (encryption is done by GAP server). It is a 32-character string (hexadecimal code). Example of encryption: 421905014940 -> 2F8E47BCAAAB12CA3E19B7DCC2DFDE84.
ow3The specification [1] does not contain a detailed definition, but this type is used only for MMS messages.

...

Kotva
revizie
revizie
Document revisions

...

  • Ver. 1.0 – May 2, 2006: the protocol implementation

Info
titleRelated pages:

Communication protocols

...