Documente Academic
Documente Profesional
Documente Cultură
Table of Contents
i
User Manual
PPS Prepaid Service Management Open Interface Table of Contents
ii
User Manual
PPS Prepaid Service Management Open Interface Table of Contents
Appendix ........................................................................................................................................A-1
A.1 Acronyms and Abbreviations............................................................................................A-1
A.2 SMOI Client Demo Code..................................................................................................A-2
iii
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
1.1 Introduction
This manual describes the interface protocol between Service Management Point
(SMP) and Medial Device (MD), and the Man-Machine Language (MML) commands
supported. SMP software provides an open interface protocol, whose main contents
consist of standard MML commands. Thus, MD can communicate with SMP via MML
commands and receive the operation result returned by SMP. Any third-party
manufactured access device abiding by this interface protocol can operate SMP.
The networking mode of SMP with MD and business hall terminal is illustrated in Figure
1-1.
SCP
SMP
Business Hall
Browser Bank
Terminal
The outer terminal can be connected to SMP via MD. SM interface protocol applies to
MD and SMP, whereas the protocol applying to MD and outer entities shall be defined
by the operator. In this case, MD is regarded by SMP as the terminal with SM interface.
For the protocol about the interaction of SMP with the terminal, please refer to section
“1.6 Interaction of MD with SMP”. The lower layer of SM interface adopts TCP/IP
protocol. The interface protocol stack is shown in Figure 1-2.
1-1
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
MD
SMP
SMOI
SM Interface SM Interface
protocol layer protocol layer
TCP/IP TCP/IP
Before MD and SMP send messages, the TCP/IP connection with SMP shall first be
established. When MD no longer needs to interact with SMP, the SOCKET connection
with SMP shall be released. In case of IDLE, it’s OK to remain the connection with SMP,
while sending only heartbeat messages.
The maximum number of connections that can be established between SMP and each
MD correlates to SMP hardware processing capability. The minimum number of
connections supported by SMP is 250.
Please refer to "Chapter 2 SMOI Program Operation” for the operation of SMOI
program interface.
I. Overview
An MML command begins with a command code. It specifies what the system needs to
execute. Its additional information is expressed by its parameters tailed, which are
separated from the command code by colon (:) at the end of a command code.
1-2
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
Parameter Block
Prefix is used to identify whether this command is an ACK or not. Prefix is separated by
colon (:) from the command body. Prefix has other two forms: MON -meaning a
detecting command, and NOTIFY -meaning a notification message. Prefix MON has
not yet been provided currently.
Command body can only have a maximum of 3 identifiers, and each of them is
separated by space(s), as shown in Figure 1-4.
Identifier 2: Identifier with a maximum length of 8-character. It stands for the service
name at which this executive action enforces, such as PPS.
Identifier 3: Identifier with a maximum length of 8-character. It stands for the object
entity of executive actions, such as ACNT and OPER.
1-3
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
Parameter block contains the information required by the specific functions of the
executive commands. This information is specified by some specific parameters
according to a certain command.
Parameter blocks, including more than one parameter, are separated by commas (,).
Also, the input sequence of the parameters by user will not influence the command’s
executing result.
z Definition of parameters
A parameter consists of a name and its value, separated by an equal mark (=).
In the case of omitting a given parameter, it’s considered that a default value has been
designated. Or, it’s OK to specify a given parameter value to represent the default
value.
If there is not any valid character between the equal mark and comma after the
parameter name, then default parameter will also be used.
z Parameter name
Parameter name consists of a maximum of 16 characters.
Identifier
Decimal
Date
Time
String
1-4
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
Assemble several information units into a compound, and then we can input more than
one information unit to a single parameter. Here, the assembling of compound units will
not be considered. The assembling of information units mentioned hereafter all refer to
the combination of simple information units, instead of compound information units.
The way to specify several information units within one parameter is to delimit these
values by using “&”. For example, 5&9 represents the compounding of unit 5 and 9.
N’ 11990000 &&N’ 11990999 stands for the number segment with 10,000 numbers.
Refer to relevant MML commands to determine whether && marks are supported.
The assembling number is decided by the size of a single message within a protocol.
The current size is 64KB.
z Default parameters
Parameters in an MML command can be requisite parameters, optional parameters
and default parameters. Requisite parameters can not be omitted when the command
is executed, optional parameters can be chosen to input by the user, and default
parameters will be provided automatically by the system in case there is no parameter
input.
As long as a default value can be given, the parameter shall be specified as a default
parameter (for example, when adding a user, even non-key parameter can be
designated with a default value).
z The value of a default parameter shall be unique within the same command.
z A default parameter can take different values in different commands.
z The same default parameter in different commands can have different values.
z Default value should be the one used in most cases.
Example of MML command
1-5
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
I. Alphabet
All alphabet characters, upper case or lower case (a-z and A-Z), and characters, * and
#, are also included.
II. Digit
III. Delimiter
The following marks are used to separate different units of an input session.
z Colon (:): To separate the first parameter from the command code or command
name.
z Equation (=): To separate the first value from the parameter name or parameter
code.
z Comma (,): To separate different parameters.
z Ampersand (&): To separate all of the values for a parameter.
z Double-ampersand (&&): To separate the lower limitation value from the upper
one in a parameter’s value range.
z Apostrophe (‘): To separate the valued-indicator from its value.
z Semicolon (;): To separate different commands.
B Binary system
O Octal system
D Decimal system
H Hexadecimal system
N Numeric string
V. Special character
1-6
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
I. Identifier
Digit
Alphabet/Underline Alphabet or
Underline
II. Number
z Decimal number
Decimal number consists of an array of digital characters, which are preceded by
characters D' to identify themselves. If the default number scale is decimal, then
characters D' can be omitted.
D' Digit
z Numeric string
Numeric string can be used to express some information, which are composed of digital
characters, yet cannot be expressed by decimal numbers. For instance, MSISDN and
the PPS card No..
N' Digit
z Character string
Character string (or context) permits inputting literal characters, including any delimiter,
which will have its grammar meanings when input outside this character string.
Character string is composed of zero to several characters, and bracketed with one
1-7
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
double-quote (“) at both end. Character string includes all valid characters, and if
double-quote (“) appears in a sting, it shall follow a backslash.
Character
(excluding ")
" "
III. Date
Date is expressed by digits, with double-quote (“) at both ends. It shall follow such
sequence as year, month, and day. Year is a 4-digit decimal number, while month and
day are 2-digit decimal numbers. There shall be hyphens between year and month, and
between month and day.
IV. Time
The 24-hour timing system is adopted here, with double-quote (“) at both ends of the
time. The sequence is from left to right: hour, minute, and second. Hour is a 2-digit
decimal number, ranging between 00 to 23 (23 included). Minute and second are both
2-digit decimal numbers, ranging between 00 to 59 (59 included).
1-8
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
Figure 1-10 shows the complete procedure of the interaction of MD with SMP. To be
simple, the handling of abnormal circumstances and the process of setting up multiple
dialogs are omitted here.
Start
Establish SOCKET
connection w ith SMP
Succeed?
SMP returned
successfully ? Parellel operation
Yes
No
Get session ID
All sent out? Receiv e MML ACK
No
End
1-9
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
Application layer
1-10
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
z Configuration management mechanism layer: This layer is above the session and
transaction mechanism layer and completes the functions of registration,
application, and dynamic management of each service.
z Log and alarm monitoring management layer : This layer is above the
configuration management mechanism layer,
z Application layer: This layer is established above the mechanism and makes use
of the services provided by the mechanism.
To realize SM interface, the following system processes are necessary: client access
agent process, service configuration management process, external entity agent
process, and application service process.
z Client access agent process provides standard protocol interface to the outside,
and is the only path that peripheral access device with standard protocol interface
can operate on SMP.
z Service configuration management process mainly functions to achieve the
dynamic configuration, operator login, and operator management of each service.
z External entity agent process is the only path through which system interacts with
external entities. External entities mainly include SCP, INFORMIX database, etc.
z Application service process is in charge of completing the real tasks accomplished
by SMP, such as the various operations of PPS (the prepaid service).
1.8.1 Overview
To ensure the security of system and convenience of operation, system shall provide
the security management function for device access and setting user operation
authority, which includes access security management, security management of
various operators, and security management of system supervisor (referred to as
operator hereafter).
The system will perform operator authority management both from operation authority
and from data authority. Relevant authority parameters will be set for each module and
function operation. In real cases, we shall determine the operator security before
setting the operation authority.
SMP access security includes two indices: number of on-line subscriber and how busy
the system is. The system will decide whether to allow new user to log in or new
1-11
User Manual
PPS Prepaid Service Management Open Interface Chapter 1 SMOI Protocol
external device to access, depending on the number of currently logged-in users and
the occupancy of CPU and the IO of disk.
SMP shall perform authentication for the commands sent by the operator. And the
commands sent by operator without authority will be returned with error information.
SMP shall not only perform authentication for the commands sent by the operator, but
also check the data security for the data processed by the operator. The latter also
concerns the function operation. To make judgment on the data security, operators of
higher authority can process the data that are able to be handled by operators of lower
authority.
1-12
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
2.1 Connection
TCP/IP SOCKET connection must be established when SMP client communicates with
SMP and then released after interaction. In idle state, heartbeat message is required to
connect SMP client and SMP.
2.2 Message
Service message over SMP open interface protocol is the smallest unit to transfer
operative information of users. When the connection is established, the client sends a
MML command to SMP in a message packet after transaction ID of the session is
determined, and then decodes packets received. Format of message involved in this
process is determined by SMP open interface protocol.
See the figure below for the structure of messages transmitted through SMP open
interface.
Heartbeat message over SMP open interface protocol is used to detect the connection
between the client and SMP. It is sent 180 second (It can be configured.) later when the
connection is idle. See the figure below for the structure of heartbeat message.
This Version number is 1.00. Code of parameter configured over SMP open interface
protocol must conform to the following rules:
2-1
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
For the integral of 16 or 32 bits in hexadecimal format, the upper significant Octet must
be the first, and then is the lower significant Octet. Fill with blank spaces when the
character string cannot reach the specified length.
Length: 4 Byte
Code: `SC `
It denotes the total length of the interval between the message header and operative
message. Its value is denoted by an integral of 4 bits in hexadecimal format ranging
from 0-65535 (0000-FFFF).
-----Version number: It denotes the version of SMP open interface protocol with the
code of 4 Octet character strings. The current version number is 1.00.
Note: Terminal identifier of the front end processor in BSS/OSS must be contained in
the message header in case of initial access, because SMP performs authentication
only to the terminal identifier of front end processor. From then on, the terminal
identifier of a specific terminal must be filled in.
-----Service name: It denotes the service that the operator applies for, and its code is
composed of 8 Octet character strings. The service name is specified in MML
commands. See the following service names.
2-2
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
Session ID is filled in with the value larger than 0 when BSS/OSS sends a message,
and it cannot repeat.
One or more sessions can be established based on one connection between BSS/OSS
and SMP. MML commands can be sent through the session newly established when
the message of login success is received from SMP. Execute the logout command to
notify SMP to clear information of the session when the session is not required.
Session header consists of session ID, session control characters and reserved field.
2-3
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
Note:
SMP keeps the result obtained from an operation for certain a period that can be
configured.
It denotes MML commands executed. See Section 3 for the format of MML command.
Fill with blank spaces if the length of MML command is not the multiple of 4.
2-4
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
This Version number is 1.01. It keeps the same with version 1.00 except for added
languages in coding MML messages. And SMP can handle MML messages in version
1.00 and 1.01 simultaneously.
Length: 4 Byte
Code: `SC`
It denotes the total length of the interval between the message header and operative
message.
-----Version number: It denotes the version of SMP open interface protocol with the
code of 4 Octet character strings. Current version number is 1.01.
-----Service name: It denotes the service that the operator applies for, and its code is
composed of 8 Octet character strings.
------Language: It is designated by the client with the code of 8 Octet character strings
to describe information returned from SMP. For example, information returned from
SMP is in English if English is selected.
2-5
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
Start flag, message length and checksum of heartbeat message are identical with
those of service message. "HBHB" is used to identify the heartbeat message.
SMP must return ACK message as the response of MML command sent from
BSS/OSS within period T. When multiple ACK messages are involved, they must be
sent with an interval of T until the transaction ends. SMP timeout occurs if BSS/OSS not
receives the ACK message sent from SMP within period T.
2-6
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
SMP processing
Format of message (Downlink message: websmap->caa
Uplink message: caa -> websmap )
Message start flag (4B) It is fixedly configured to 60 53 43 60 (that is, `SC`)
Reserved field
It is used for subsequent extended services.
(4B)
It is allocated by the client (BSS/OSS) to identify a
Transaction ID
transaction. In the same session, they (value: larger than 0)
(8B)
are different from each other.
Transaction Transaction
TxBeg: Transaction start; TxCon: Transaction proceed;
header (18B) control character
TxEnd: Transaction end
(6B)
Reserved field
It is used for subsequent extended services.
(4B)
Operative
It denotes MML command. See Section 3 for details.
Operative information
information Fill with blank spaces if the length of MML command is not
Blank space
the multiple of 4.
2-7
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
SMP processing
Format of message (Downlink message: websmap->caa
Uplink message: caa -> websmap )
Perform XOR for "Message header + Session header +
Checksum 8B
Transaction header + Operative information" as 32 Byte.
A command is started with a command code that specifies its function executed by the
system. And further information is contained in parameter part following the command
code. This part is separated from the command code with a colon and defined by the
parameter block. Among multiple commands, semicolon is adopted, while it is omitted
in one command. In addition, parameter part is always omitted.
Command code :
Parameter block
Note:
Several commands are not listed.
Command prefix denotes the type of command. A command with the prefix of ACK is
an acknowledgement one, and the prefix is separated from the command body with a
colon, while a command started with MON refers to a detection command. In addition,
the command is a notice message when NOTIFY is taken as the prefix. Prefix "MON" is
not supported temporarily in current version.
Command body is composed of 3 identifiers at most, which are separated with blanks.
2-8
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
Meaning:
-Identifier 2: With a maximum length of 8 Byte, it denotes the service involving the
operation.
ACNT, OPER.
For example:
Execute the command DISP VPN ACNT : MSISDN="13900001234" to list the VPN
account.
I. Definition
A parameter consists of a name and a value, which are separated with "=".
If value of a parameter is omitted, the corresponding name, "=" and "," (between
parameters) must be omitted as well.
A default value is designated when the parameter is omitted. However, the default
value can be replaced with a specified parameter value.
II. Name
Upper and lower cases are not matched for a parameter name.
2-9
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
III. Value
Identifier
Decimal number
Date
Time
Character string
To count the number of them, separate information elements in the parameter value
with "&". For example, 5 & 9 denotes 5 and 9.
Information elements of least and most significant bits as well as && (between the two)
are required to denote a sequence (Incremental = 1) of information elements. For
example, 5 & & 9 refers to 5, 6, 7, 8, and 9, while N'62280000 && N'62289999 denotes
a number segment with 10,000 numbers.
Note:
"&&" is supported in part of MML commands.
Parameter in a command can be divided into mandatory one, optional one and default
one.
2-10
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
4. Default value must be the one commonly configured for this parameter.
I. Letter
II. Digit
(:): It is used to separate the command name or code from the first parameter.
(=): It is used to separate the parameter name or code from the first value of the
parameter.
&&: It is used to separate the upper and lower limit of an equivalent character.
B: Binary
O: Octal
2-11
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
D: Decimal
H: Hex
V. Special character
Chinese character
(-)
2.5.1 Identifier
Identifier refers to a character string containing one or more characters. Started with a
letter or an underline, it involves figure, "/", letter and underline. For example, UPDATE
and NO7.
Figure
Letter/underline
Letter/underline
I. Decimal number
Decimal number is composed of "D'" and a group of characters involving one or more
figures. Numerical system is applied to information element, in which D’ can be omitted.
2-12
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
Figure
D’
N’ Figure
Character(excluding")
" "
Text and delimiter can be input in a character string (text string). The delimiter is of
grammatical meaning when input beyond the text string.
Text string is a string of characters with the number of 0 or more and contained between
quotation marks. All characters even double quotation marks ("\" must be input before
it.) can be input in a text string.
IV. Date
The date is denoted by putting the date in digital format into the quotation mark. It
conforms to the order of "Year, Month, Day", among which "Year" is denoted by a
decimal number of 4 digits, while "Month" and "Day" are denoted by a decimal number
of 2 digits. Between the three, hyphens are put.
2-13
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
V. Time
The time is denoted by putting the time expressed with digit and colon into double
quotation marks in the timing system of 24 hours. Time elements are ordered like that:
Hour, Minute, Second, which are denoted by a decimal number of 2 digits. Among them,
Hour is denoted by the number ranging from 00 to 23, while Minute and Second are
from 00 to 59 (59 is included).
For example: 25 minutes and 1 second past 12 can be denoted like that: "12:25:01".
Date and time are denoted based on formats mentioned above, between which there is
a blank space.
For example: 25 minutes and 1 second past 12 October 13 2003 can be denoted as
below:
2003-10-13 12:25:01"
It indicates that only one command is executed to implement certain a process (such as
adding, deletion, modification and query) for objects of the same kind. For example,
subscription for multi-function card service.
2. A result must be output when a small batch operation is completed and a statistical
result is output when all operations end.
2-14
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
2.7.1 Procedure
The complete procedure of interaction between BSS/OSS and SMP is illustrated in the
figure below. For a brief description, handling of abnormal cases and establishment of
multiple sessions are not involved.
BSS/OSS SMP IN
Establish a SOCKET
connection
Send a LOGIN
message
LOGIN success
Return a ACK
message to SMP
Send a MML
ACK message
Send a LOGOUT
message
LOGOUT success
Release SOCKET
connection
2-15
User Manual
PPS Prepaid Service Management Open Interface Chapter 2 SMOI Program Operation
Start
No
Operation starts
Success or not?
Yes
No
Whether SMP succeeds in Concurrent operations
returning a message
Yes
TransactionID+1 Yes
Send all commands or not? Receive MML ACK messages
No
Transaction ends or not?
No Whether operations are not
Send the next MML command
required
Yes
Yes
Release SOCKETconnection
Operation ends
End
Note:
z Multiple sessions can be established concurrently based on one TCP connection.
z Each session starts with DlgLgn and ends with DlgEnd.
z Multiple transactions can be started concurrently in a session.
z Each transaction starts with TxBeg and ends with TxEnd.
z Each transaction can contain multiple messages.
z Only one MML or MML ACK command can be stored in the operative information
field of a message.
2-16
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
An MML command is sent from MD to SMP, while an MML command with prefix ‘ACK:’
is sent from SMP to MD.
All the parameters of character string should be put in the double quotation marks.
z This symbol has special meaning in MML command: It represents one parameter
corresponds to multiple values. For example:
To create a subscriber: CREATE PPS MULTISUB:
z If the input parameter is larger than or equal to zero, it cannot include any symbols.
For example:
3-1
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
The universal returned information of parameters RETN and DESC in the ACK of MML
command is as follows:
0: Succeeded
5: Session created
3-2
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
90: Service area is not allocated to the MSISDN or HLR does not exist.
On receipt of the operator command, if the input command has grammatical errors, or
the message format is illegal, an error-indicating message will be returned.
Output format:
Output parameters:
3-3
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
3.3.1 Logging in
Input format:
Input parameters:
Represented by a character
PSWD Password for operator login.
string of 1 through 8 digits.
This prompt returns to receipt of the login command from the operator.
Output format:
Output parameters:
3-4
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
End the conversation between the operator and the SMS system.
Input format:
LOGOUT :[ USER=]
Input parameters:
3-5
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Output format:
Output parameters:
Create PPS subscribers, loads them to SCP where they are activated.
Input format:
3-6
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Input parameters:
Unit: Dollar.
Decimal integer type: an integer
larger than 0.
MAXCHR Max. charge amount.
DEFAULT: Specified by the service
level data table in light of diverse
subscriber types.
Decimal integer type. Range:
CMFLG Call Roaming Flag 0: Not Allowed
1: Allowed
3-7
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Output format:
Output parameters:
3-8
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
3-9
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
3-10
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
The operation is to delete designated overdue subscriber from the SMS and SCP
systems. Overdue subscribers refer to those who exceed the Disable period, account
service stop date and latest date of first use.
Input format:
Input parameters:
Output format:
Output parameters:
3-11
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
The operation is to delete overdue PPS subscribers from the SMS and SCP systems.
Overdue subscribers refer to those who exceed the Disable period, account service
stop date and latest date of first use.
Input format:
Input parameters:
Instance:
Output format:
Output parameters:
3-12
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Accumulated number of
Decimal integer type: an integer
SUCCNUM successfully-created
larger than 0.
MSISDNs
Decimal integer type. Range:
FINISHED Finish Flag 0: Not Finished
1: Finished
Instance:
Modify the calling privilege of the subscriber according to entered MSISDN and TYPE
parameters.
Input format:
Input parameters:
3-13
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Return this message on receipt of the command of modifying subscriber calling limit
Type.
Output format:
Output parameters:
3-14
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Modify the Roaming flag of PPS subscribers according to the subscriber MSISDN and
TYPE parameters.
Input format:
Input parameters:
3-15
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Return this message on receipt of the command of modifying subscriber roaming flag.
Output format:
Output parameters:
3-16
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Query the overdue PPS subscribers meeting the deletion conditions. Overdue
subscribers refer to those who exceed the term of validity, account expiry date and
latest date of first use.
Input format:
Input parameters:
3-17
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
This prompt returns on receipt of the command of querying PPS subscribers meeting
the deletion conditions.
Output format:
Output parameters:
3-18
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Query PPS subscriber basic service data on the SMS system. The PPS subscriber
basic information includes MSISDN, account state, account balance, credit amount,
max. balance, score for volume discount, end date of volume discount, MSISDN type,
blacklist, language type, end date of active state, end date of suspend state, end date
of disable state, end date of service, calling authority, roaming authority, subscriber
class, service class, home AreaZone, score for bonus promotion, end date of bonus
promotion, promotion talk duration, accumulated recharge amount, recharge failure
3-19
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
times before blacklist, call fee preference, number of SM in accumulation period and
expired date of SM accumulation period.
Input format:
Input parameters:
Instance:
This prompt returns on receipt of the command of querying PPS subscriber basic
information.
Output format:
Output parameters:
3-20
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
Input parameters:
3-21
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
This prompt returns on receipt of the command of releasing subscriber from blacklist.
Output format:
Output parameters:
Instance:
Input format:
3-22
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Input parameters:
Mandatory, non-negative
SUBCOS Service type.
integer (SUBCOSID).
Instance:
Output format:
Output parameters:
3-23
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
3-24
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Modify the balance of PPS subscribers according to the subscriber MSISDN. The
balance of subscribers in pool status is not allowed to be modified. Balance
modification does not involve status modification.
Input format:
Input parameters:
Instance:
Output format:
Output parameters:
3-25
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
ORGBALAN
Original balance Decimal integer type
CE
LASTBALA
Last balance Decimal integer type
NCE
Instance:
Modify the validity stop date (Active Stop) of PPS subscribers. The validity period of the
subscribers in an IDLE status is not allowed to be modified.
Input format:
Input parameters:
3-26
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Return this message on receipt of the command of modifying subscriber validity period.
Output format:
Output parameters:
3-27
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
3-28
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Input parameters:
Instance:
Instance:
Output format:
Output parameters:
3-29
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
By trigger service, Modify the balance of PPS subscribers according to the subscriber
MSISDN. The balance of subscribers in Idle or Pool status is not allowed to be modified.
Balance modification does not involve status modification.
Input format:
3-30
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Input parameters:
Instance:
Output format:
Output parameters:
3-31
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance
3-32
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Creates GPRS service subscriber, loads them to SCP where they are activated.
Input format:
Input parameters:
Instance:
This prompt is returned on receipt of the command of creating a batch of GPRS service
subscriber.
Output format:
Output parameters:
3-33
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
3-34
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Input format:
Input parameters:
Instance:
Output format:
Output parameters:
3-35
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
3-36
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
The manual recharge is to recharge the amount of the recharge card via the SMP-MD
interface to a handset account.
Input format:
Input parameters:
3-37
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Note:
If CHRGTYPE=3, then the three parameters VALUE, BATCHNO, SERIALNO can’t be
input, otherwise these three parameters must be input.
If CHRGTYPE=3, then the parameter CARDPIN must be input, otherwise this
parameter is an optional one.
Instance:
Output format:
Output parameters:
3-38
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
3-39
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
3-40
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
Input parameters:
3-41
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Output format:
Output parameters:
3-42
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
Input parameters:
Instance:
Output format:
3-43
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Output parameters:
Instance:
Input format:
Input parameters:
3-44
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Output format:
Output parameters:
3-45
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
Input parameters:
Instance:
Output format:
Output parameters:
3-46
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
0-Idle (Created)
Instance:
Creates FN service subscriber, loads them to SCP where they are activated.
Input format:
Input parameters:
3-47
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Output format:
Output parameters:
3-48
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
3-49
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
Input parameters:
Instance:
3-50
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Output format:
Output parameters:
3-51
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
SET PPS FNTELNO: MSISDN= [, FN1=] [, FN2=] [, FN3=] [, FN4=] [, FN5=] [, FN6=]
[, FN7=] [, FN8=] [, FN9=]
3-52
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Input parameters:
Instance:
Output format:
Output parameters:
3-53
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
3-54
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
Input format:
Input parameters:
Instance:
Output format:
Output parameters:
3-55
User Manual
PPS Prepaid Service Management Open Interface Chapter 3 Commonly-used MML Commands Set
Instance:
3-56
User Manual
PPS Prepaid Service Management Open Interface Appendix
Appendix
DP Disconnect-Pending
FN Familiarity Number
MD Medial Device
MF Monthly Fee
MML Man-Machine Language
A-1
User Manual
PPS Prepaid Service Management Open Interface Appendix
#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
struct msg_head
{
char flag[4];
char len[4];
char ver[4];
char terminal[8];
char serv[8];
char dlg_id[8];
char dlg_ctrl[6];
char dlg_ext[4];
char tx_id[8];
char tx_ctrl[6];
char tx_ext[4];
} *msg;
A-2
User Manual
PPS Prepaid Service Management Open Interface Appendix
memset(buf,0,buflen);
msg=(struct msg_head*)buf;
mml_len=(strlen(mml)+3)&~3;
printf("mml_len=%d\n",mml_len);
msg_len=sizeof(struct msg_head)+mml_len+8;
printf("msg_len=%d\n",msg_len);
i=((char*)&msg->ver)-((char*)&msg->flag);
chksum_len=msg_len-i-8;
printf("chksum_len=%d\n",chksum_len);
if(msg_len>buflen)
return(-1);
p_mml=buf+sizeof(struct msg_head);
p_chksum=&p_mml[mml_len];
p_calc=(char*)&msg->ver;
sprintf((char*)&msg->flag ,"%-4.4s" ,"`SC`" );
sprintf((char*)&msg->len ,"%04.4x" ,chksum_len );
sprintf((char*)&msg->ver ,"%-4.4s" ,"1.00" );
sprintf((char*)&msg->terminal,"%-8.8s" ,term );
sprintf((char*)&msg->serv ,"%-8.8s" ,srv );
sprintf((char*)&msg->dlg_id ,"%08.8lx" ,dlgid );
sprintf((char*)&msg->dlg_ctrl,"%-6.6s" ,dlgctrl );
sprintf((char*)&msg->dlg_ext ,"%-4.4s" ,"0000" );
sprintf((char*)&msg->tx_id ,"%08.8lx" ,txid );
sprintf((char*)&msg->tx_ctrl ,"%-6.6s" ,txctrl );
sprintf((char*)&msg->tx_ext ,"%-4.4s" ,"0000" );
sprintf(p_mml,"%s ",mml);
for(i=0;i<4;i++) sum_c[i]=0;
for(i=0;i<chksum_len;i+=4)
{
sum_c[i%4 ]^=p_calc[i+0];
sum_c[i%4+1]^=p_calc[i+1];
sum_c[i%4+2]^=p_calc[i+2];
sum_c[i%4+3]^=p_calc[i+3];
}
A-3
User Manual
PPS Prepaid Service Management Open Interface Appendix
for(i=0;i<4;i++)
{
sum_c[i]=(~sum_c[i])&0x0ff;
p_chksum[i*2] = hex_asc[sum_c[i]>>4];
p_chksum[i*2+1] = hex_asc[sum_c[i]&0x0f];
}
return(msg_len);
}
if(argc<2)
{
printf("\nCAA-TEST for SMP Open Interface"
"\nCopyright@, 1999-2001, Huawei Tech. Co., Ltd.\n"
"\nUsage: %s [-i CAA_IP] [-p CAA_PORT] [-u USER] [-s PASSWORD]
[-t TERMINAL]\n",argv[0]);
}
strcpy(caa_ip,CAA_IP);
strcpy(user,USER);
strcpy(pswd,PSWD);
strcpy(terminal,TERMINAL);
for(i=1;i<argc;i++)
{
if(strcmp(argv[i],"-i")==0) strcpy(caa_ip,argv[++i]);
else if(strcmp(argv[i],"-p")==0) caa_port=atoi(argv[++i]);
else if(strcmp(argv[i],"-u")==0) strcpy(user,argv[++i]);
A-4
User Manual
PPS Prepaid Service Management Open Interface Appendix
s=socket(AF_INET, SOCK_STREAM, 0 );
saddr.sin_family=PF_INET;
saddr.sin_addr.s_addr=inet_addr(caa_ip);
saddr.sin_port=htons(caa_port);
result=connect(s,(struct sockaddr_in*)(&saddr),sizeof(saddr));
if(result==0)
{
sprintf(mml_cmd1,"LOGIN:USER=%s,PSWD=%s",user,pswd);
printf("\nmml1=%p,%s\n",mml_cmd1,mml_cmd1);
len=make_msg(buf,sizeof(buf),terminal,"SRVM",
cur_dlg_id,"DLGLGN",cur_tx_id++,"TXBEG",mml_cmd1);
printf("send msg1:buf=%s\nlen=%d\n",buf,len);
result=write(s,&buf,len);
if(result!=len)
{
printf("Send error!\n");
close(s);
return;
}
result=read(s,&buf,sizeof(buf));
buf[sizeof(buf)-1]='\0';
printf("result=%d,\n[%s]\n",result,buf);
if(strstr(buf,"RETN=0,")==NULL)
{
printf("Login fail!\n");
close(s);
return;
}
A-5
User Manual
PPS Prepaid Service Management Open Interface Appendix
printf("mml2=%p,%s\n",mml_cmd2,mml_cmd2);
len=make_msg(buf,sizeof(buf),terminal,"PPS",
cur_dlg_id,"DLGCON",cur_tx_id++,"TXBEG",mml_cmd2);
printf("send msg2:buf=%s\nlen=%d\n",buf,len);
result=write(s,&buf,len);
if(result!=len)
{
printf("Send error!\n");
close(s);
return;
}
result=read(s,&buf,sizeof(buf));
buf[sizeof(buf)-1]='\0';
printf("result=%d,\n[%s]\n",result,buf);
printf("mml3=%p,%s\n",mml_cmd3,mml_cmd3);
len=make_msg(buf,sizeof(buf),terminal,"SRVM",
cur_dlg_id,"DLGCON",cur_tx_id++,"TXBEG",mml_cmd3);
printf("send msg3:buf=%s\nlen=%d\n",buf,len);
result=write(s,&buf,len);
if(result!=len)
{
printf("Send error!\n");
close(s);
return;
}
result=read(s,&buf,sizeof(buf));
buf[sizeof(buf)-1]='\0';
printf("result=%d,\n[%s]\n",result,buf);
}
else
printf("connect result=%d,socket=%d,errno=%d\n",result,s,errno);
close(s);
}
A-6