Download InfoX-AAA Interface Developer Guide - MML...
infoX-AAA V200R002
Interface Developer Guide - MML
Issue
04
Date
2007-12-29
Part Number
Huawei Technologies Proprietary
Huawei Technologies Co., Ltd. provides customers with comprehensive technical support and service. For any assistance, please contact our local office or company headquarters.
Huawei Technologies Co., Ltd. Address:
Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China
Website:
http://www.huawei.com
Email:
[email protected]
Copyright © Huawei Technologies Co., Ltd. 2007. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd.
Trademarks and Permissions and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute the warranty of any kind, express or implied.
Huawei Technologies Proprietary
infoX-AAA Interface Developer Guide - MML
Contents
Contents About This Document.....................................................................................................................1 1 Overview......................................................................................................................................1-1 1.1 Position of the Billing System in the Network ............................................................................................1-2 1.2 Format of the Message That Supports the MML Server Interface ..............................................................1-3
2 Developer Guide to the Billing System.................................................................................2-1 2.1 Overview .....................................................................................................................................................2-2 2.2 Instance........................................................................................................................................................2-3 2.3 Interconnection Debugging .........................................................................................................................2-9 2.3.1 Preparation ........................................................................................................................................2-9 2.3.2 Debug Method...................................................................................................................................2-9 2.3.3 Debug Analysis ...............................................................................................................................2-10 2.4 FAQ ........................................................................................................................................................... 2-11 2.4.1 Connecting the MML Server Fails .................................................................................................. 2-11 2.4.2 Grammar Is Incorrect or Command Codes Are Illegal.................................................................... 2-11
3 MML Interfaces for Operator Management .........................................................................3-1 3.1 Introduction .................................................................................................................................................3-1 3.2 MML Commands ........................................................................................................................................3-1 3.2.1 Command for Logging In to the infoX-AAA....................................................................................3-1 3.2.2 ACK to the Command for Logging In to the infoX-AAA.................................................................3-2 3.2.3 Command for Logging Out of the infoX-AAA.................................................................................3-5 3.2.4 ACK to the Command for Logging Out of the infoX-AAA..............................................................3-5 3.2.5 Command for Changing the Password ..............................................................................................3-6 3.2.6 ACK to the Command for Changing the Password ...........................................................................3-7
4 MML Interfaces for Broadband Service ................................................................................4-1 4.1 Introduction .................................................................................................................................................4-1 4.2 MML Commands ........................................................................................................................................4-1 4.2.1 Command for Adding a Broadband User ..........................................................................................4-1 4.2.2 ACK to the Command for Adding a Broadband User .......................................................................4-6 4.2.3 Command for Modifying the Information About a Broadband User ................................................4-9 4.2.4 ACK to the Command for Modifying the Information About a Broadband User ...........................4-13 4.2.5 Command for Deleting a Broadband User ......................................................................................4-15
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
i
infoX-AAA Interface Developer Guide - MML
Contents
4.2.6 ACK to the Command for Deleting a Broadband User ...................................................................4-16 4.2.7 Command for Querying the Information About a Broadband User ................................................4-17 4.2.8 ACK to the Command for Querying the Information About a Broadband User .............................4-19 4.2.9 Command for Querying an Account................................................................................................4-22 4.2.10 ACK to the Command for Querying an Account...........................................................................4-23 4.2.11 Command for Activating an Account ............................................................................................4-27 4.2.12 ACK to the Command for Activating an Account .........................................................................4-28 4.2.13 Command for Deactivating an Account ........................................................................................4-29 4.2.14 ACK to the Command for Deactivating an Account .....................................................................4-30 4.2.15 Command for Resetting an Account..............................................................................................4-31 4.2.16 ACK to the Command for Resetting an Account...........................................................................4-33 4.2.17 Command for Changing a Password .............................................................................................4-34 4.2.18 ACK to the Command for Changing a Password ..........................................................................4-35 4.2.19 Command for Restricting a Port....................................................................................................4-36 4.2.20 ACK to the Command for Port Restriction ...................................................................................4-37 4.2.21 Command for Recharging an Account by Cash ............................................................................4-38 4.2.22 ACK to the Command for Recharging an Account by Cash .........................................................4-39 4.2.23 Command for Rolling Back the Cash Recharge............................................................................4-41 4.2.24 ACK to the Command for Rolling Back the Cash Recharge.........................................................4-41 4.2.25 Command for Querying a Recharge Record .................................................................................4-42 4.2.26 ACK to the Command for Querying a Recharge Record ..............................................................4-44 4.2.27 Command for Querying a Bill.......................................................................................................4-47 4.2.28 ACK to the Command for Querying a Bill....................................................................................4-48 4.2.29 Command for Ordering a Broadband Service ...............................................................................4-51 4.2.30 ACK to the Command for Ordering a Broadband Service ............................................................4-52 4.2.31 Command for Canceling a Service Order......................................................................................4-54 4.2.32 ACK to the Command for Canceling an Ordered Service.............................................................4-56 4.2.33 Command for Querying an Ordered Service .................................................................................4-58 4.2.34 ACK to the Command for Querying an Ordered Service..............................................................4-59 4.2.35 Command for Querying the Information About the User Sessions ...............................................4-61 4.2.36 ACK to the Command for Queryinging the Information About a User Session............................4-62
5 Interfaces for CDMA Service...................................................................................................5-1 5.1 Introduction .................................................................................................................................................5-2 5.2 MML Commands ........................................................................................................................................5-2 5.2.1 Command for Adding a CDMA User................................................................................................5-2 5.2.2 ACK to the Command for Adding a CDMA User.............................................................................5-6 5.2.3 Command for Deleting a CDMA User..............................................................................................5-8 5.2.4 ACK to the Command for Deregistering a CDMA User .................................................................5-10 5.2.5 Command for Querying for the Information About a CDMA User................................................. 5-11 5.2.6 ACK to the Command for Querying Information of a CDMA User ...............................................5-12 5.2.7 Command for Modifying the Information About a CDMA Subscriber...........................................5-15
ii
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
Contents
5.2.8 ACK to the Command for Modifying the Information About a CDMA User .................................5-19 5.2.9 Command for Changing the Password of an AN User ....................................................................5-21 5.2.10 ACK to the Command for Changing the Password of an AN User ...............................................5-22 5.2.11 Command for Modifying the User Password in the Self-Service System .....................................5-23 5.2.12 ACK to the Command for Modifying the User Password in the Self-Service System..................5-25 5.2.13 Command for Recharging a CDMA Local Prepaid Account.........................................................5-26 5.2.14 ACK to the Command for Recharging a CDMA Local Prepaid Account .....................................5-27 5.2.15 Command for Querying the Bill of a CDMA Account..................................................................5-28 5.2.16 ACK to the Command for Querying for a Bill of a CDMA Local Prepaid Account .....................5-30 5.2.17 Command for Querying for the Start Time and Accumulative Usage of a Service .......................5-32 5.2.18 ACK to Command for Querying for the Start Time and Accumulative Usage of a Service..........5-33
6 MML Interfaces for WCDMA Service ...................................................................................6-1 6.1 Introduction .................................................................................................................................................6-2 6.2 MML Commands ........................................................................................................................................6-2 6.2.1 Command for Adding a WCDMA User ............................................................................................6-2 6.2.2 ACK to the Command for Adding a WCDMA User .........................................................................6-5 6.2.3 Command for Deleting a WCDMA User ..........................................................................................6-7 6.2.4 ACK to the Command for Deleting a WCDMA User .......................................................................6-8 6.2.5 Command for Querying for the Information About a WCDMA User.............................................6-10 6.2.6 ACK to the Command for Querying for the Information About a WCDMA User..........................6-12 6.2.7 Command for Modifying the Information About a WCDMA User ................................................6-15 6.2.8 ACK to the Command for Modifying the Information About a WCDMA User .............................6-18 6.2.9 Command for Adding WCDMA Users in Batches..........................................................................6-20 6.2.10 ACK to the Command for Adding WCDMA Users in Batches.....................................................6-21 6.2.11 Command for Deleting WCDMA Users in Batches ......................................................................6-22 6.2.12 ACK to the Command for Deleting WCDMA Users in Batches...................................................6-23 6.2.13 Command for Resetting a WCDMA User .....................................................................................6-24 6.2.14 ACK to the Command for Resetting a WCDMA User..................................................................6-25 6.2.15 Command for Changing the Password of a WCDMA User ..........................................................6-26 6.2.16 ACK to the Command for Changing the Password of a WCDMA User .......................................6-27 6.2.17 Command for Unlocking a WCDMA User ...................................................................................6-28 6.2.18 ACK to the Command for Unlocking a WCDMA User ................................................................6-30 6.2.19 Command for Recharging a Prepaid WCDMA Account...............................................................6-31 6.2.20 ACK to the Command for Recharging a Prepaid WCDMA Account............................................6-32 6.2.21 Command for Ordering a Service for a WCDMA User ................................................................6-33 6.2.22 ACK to the Command for Ordering a Service for a WCDMA User .............................................6-34 6.2.23 Command for Canceling the Order of a WCDMA User ...............................................................6-35 6.2.24 ACK to the Command for Canceling the Order of a WCDMA User ............................................6-36 6.2.25 Command for Querying for the Bills of a WCDMA User.............................................................6-38 6.2.26 ACK to the Command for Querying for the Bills of a WCDMA User..........................................6-39 6.2.27 Command for Querying for the Start Time and Accumulative Usage of a Service .......................6-42
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
iii
infoX-AAA Interface Developer Guide - MML
Contents
6.2.28 ACK to Command for Querying for the Start Time and Accumulative Usage of a Service..........6-44
7 MML Interfaces for WiMAX Service .....................................................................................7-1 7.1 Introduction .................................................................................................................................................7-2 7.2 MML Commands ........................................................................................................................................7-2 7.2.1 Command for Adding a WiMAX User..............................................................................................7-2 7.2.2 ACK to the Command for Adding a WiMAX User...........................................................................7-4 7.2.3 Command for Deleting a WiMAX User............................................................................................7-6 7.2.4 ACK to the Command for Deleting a WiMAX User.........................................................................7-7 7.2.5 Command for Modifying the WiMAX User Information .................................................................7-8 7.2.6 ACK to the Command for Modifying the WiMAX User Information ............................................ 7-11 7.2.7 Command for Querying for the Information About a WiMAX User ..............................................7-13 7.2.8 ACK to the Command for Querying for the Information About a WiMAX User ...........................7-14 7.2.9 Command for Changing the Password of a WiMAX User..............................................................7-17 7.2.10 ACK to the Command for Changing the Password of a WiMAX User.........................................7-18 7.2.11 Command for Recharging a Prepaid WiMAX User ......................................................................7-19 7.2.12 ACK to the Command for Recharging a Prepaid WiMAX User ...................................................7-20 7.2.13 Command for Querying for the Bills of a WiMAX User ..............................................................7-22 7.2.14 ACK to the Command for Querying for the Bills of a WiMAX User ...........................................7-23
A Checksum’s code..................................................................................................................... A-1 B Acronyms and Abbreviations ................................................................................................B-1 Index ................................................................................................................................................ i-1
iv
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
Figures
Figures Figure 1-1 MML Server and billing system in the network..............................................................................1-2 Figure 1-2 Format of an ordinary message .......................................................................................................1-4 Figure 1-3 Format of a heartbeat message........................................................................................................1-7 Figure 2-1 Operating flow of the billing system...............................................................................................2-2
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
v
infoX-AAA Interface Developer Guide - MML
Tables
Tables Table 1-1 Fields in an ordinary message...........................................................................................................1-5 Table 1-2 Fields in a heartbeat message............................................................................................................1-7 Table 3-1 Parameters of the command for logging in to the infoX-AAA.........................................................3-1 Table 3-2 Parameters of the ACK command.....................................................................................................3-3 Table 3-3 Parameters of the command for logout.............................................................................................3-5 Table 3-4 Parameters of the ACK command.....................................................................................................3-6 Table 3-5 Parameters of the command for changing the operator password.....................................................3-7 Table 3-6 Parameters of the ACK command.....................................................................................................3-8 Table 4-1 Parameters of the command for adding a broadband user ................................................................4-2 Table 4-2 Parameters of the ACK command.....................................................................................................4-6 Table 4-3 Parameters of the command for modifying the user information .....................................................4-9 Table 4-4 Parameters of the ACK command...................................................................................................4-14 Table 4-5 Parameters of the command for deleting a broadband user ............................................................4-15 Table 4-6 Parameters of the ACK command...................................................................................................4-17 Table 4-7 Parameters of the command for querying the user information......................................................4-18 Table 4-8 Parameters of the ACK command...................................................................................................4-19 Table 4-9 Parameters of the command for querying an account.....................................................................4-22 Table 4-10 Parameters of the ACK command.................................................................................................4-24 Table 4-11 Parameters of the command for activating an account..................................................................4-27 Table 4-12 Parameters of the ACK command.................................................................................................4-28 Table 4-13 Parameters of the command for deactivating an account..............................................................4-29 Table 4-14 Parameters of the ACK command.................................................................................................4-31 Table 4-15 Parameters of the command for resetting an account ...................................................................4-32 Table 4-16 Parameters of the ACK command.................................................................................................4-33 Table 4-17 Parameters of a command for changing a password .....................................................................4-34 Table 4-18 Parameters of the ACK command.................................................................................................4-35
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
vii
infoX-AAA Interface Developer Guide - MML
Tables
Table 4-19 Parameters of the command for restricting a port.........................................................................4-36 Table 4-20 Parameters for responding to the port restriction command .........................................................4-38 Table 4-21 Parameters of the command for recharging an account by cash ...................................................4-39 Table 4-22 Parameters of the ACK command.................................................................................................4-40 Table 4-23 Parameters of the command for rolling back the cash recharge....................................................4-41 Table 4-24 Parameters of the ACK command.................................................................................................4-42 Table 4-25 Parameters of the command for querying a recharge record.........................................................4-43 Table 4-26 Parameters of the ACK command.................................................................................................4-45 Table 4-27 Parameters of the command for querying a bill ............................................................................4-47 Table 4-28 Parameters of the ACK command.................................................................................................4-48 Table 4-29 Parameters for ordering a broadband service................................................................................4-51 Table 4-30 Parameters of the ACK command.................................................................................................4-53 Table 4-31 Parameters of the command for canceling a service order............................................................4-55 Table 4-32 Parameters of the ACK command.................................................................................................4-57 Table 4-33 Parameters of the command for querying an ordered service .......................................................4-58 Table 4-34 Parameters of the ACK command.................................................................................................4-59 Table 4-35 Parameters of the command for querying the session information ...............................................4-61 Table 4-36 Parameters of the ACK command.................................................................................................4-63 Table 5-1 Parameters for the command for adding a CDMA user ....................................................................5-2 Table 5-2 Parameters of the ACK command.....................................................................................................5-7 Table 5-3 Parameters for the command for deleting a CDMA user ..................................................................5-9 Table 5-4 Parameters of the ACK command...................................................................................................5-10 Table 5-5 Parameters for the command for querying for the information about a CDMA user...................... 5-11 Table 5-6 Parameters of the ACK command...................................................................................................5-12 Table 5-7 Parameters for the command for modifying the information about a CDMA user.........................5-15 Table 5-8 Parameters of the ACK command...................................................................................................5-20 Table 5-9 Parameters of the command for changing the password of an AN user..........................................5-21 Table 5-10 Parameters of the ACK command.................................................................................................5-23 Table 5-11 Parameters for the command for changing the user password in the self-service system.............5-24 Table 5-12 Parameters of the ACK command.................................................................................................5-25 Table 5-13 Parameters for the command for recharging a CDMA local prepaid account...............................5-26 Table 5-14 Parameters of the ACK command.................................................................................................5-28 Table 5-15 Parameters for the command for querying a bill...........................................................................5-29
viii
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
Tables
Table 5-16 Parameters of the ACK command.................................................................................................5-30 Table 5-17 Parameters of the QUERY C270 USAGE command....................................................................5-32 Table 5-18 Parameters of the ACK command.................................................................................................5-34 Table 6-1 Parameters of the command for adding a WCDMA user..................................................................6-2 Table 6-2 Parameters of the ACK command.....................................................................................................6-6 Table 6-3 Parameters of the command for deleting a WCDMA user................................................................6-7 Table 6-4 Parameters of the ACK command.....................................................................................................6-9 Table 6-5 Parameters of the command for querying for the user information ................................................ 6-11 Table 6-6 Parameters of the ACK command...................................................................................................6-12 Table 6-7 Parameters of the command for modifying the user information ...................................................6-15 Table 6-8 Parameters of the ACK command...................................................................................................6-19 Table 6-9 Parameters of the command for adding WCDMA users in batches................................................6-20 Table 6-10 Parameters of the ACK command.................................................................................................6-22 Table 6-11 Parameters of the command for deleting WCDMA users in batches ............................................6-23 Table 6-12 Parameters of the ACK command.................................................................................................6-24 Table 6-13 Parameters of the command for resetting a WCDMA user...........................................................6-25 Table 6-14 Parameters of the ACK command.................................................................................................6-26 Table 6-15 Parameters of the command for changing the password of a WCDMA user................................6-27 Table 6-16 Parameters of the ACK command.................................................................................................6-28 Table 6-17 Parameters of the command for unlocking a WCDMA user.........................................................6-29 Table 6-18 Parameters of the ACK command.................................................................................................6-30 Table 6-19 Parameters of the command for recharging a prepaid WCDMA account.....................................6-31 Table 6-20 Parameters of the ACK command.................................................................................................6-32 Table 6-21 Parameters of the command for ordering a service for a WCDMA user ......................................6-33 Table 6-22 Parameters of the ACK command.................................................................................................6-35 Table 6-23 Parameters of the command for canceling the order of a WCDMA user......................................6-36 Table 6-24 Parameters of the ACK command.................................................................................................6-37 Table 6-25 Parameters of the command for querying for the bills of a WCDMA user...................................6-38 Table 6-26 Parameters of the ACK command.................................................................................................6-39 Table 6-27 Parameters of the QUERY C260 USAGE command....................................................................6-43 Table 6-28 Parameters of the ACK command.................................................................................................6-45 Table 7-1 Parameters of the command for adding a WiMAX user ...................................................................7-2 Table 7-2 Parameters of the ACK command.....................................................................................................7-5
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
ix
infoX-AAA Interface Developer Guide - MML
Tables
Table 7-3 Parameters of the command for deleting a WiMAX user .................................................................7-6 Table 7-4 Parameters of the ACK command.....................................................................................................7-7 Table 7-5 Parameters of the command for modifying the information about a WiMAX user. .........................7-8 Table 7-6 Parameters of the ACK command...................................................................................................7-12 Table 7-7 Parameters of the command for querying for the information about a WiMAX user.....................7-13 Table 7-8 Parameters of the ACK command...................................................................................................7-14 Table 7-9 Parameters of the command for changing the password of a WiMAX user ...................................7-17 Table 7-10 Parameters of the ACK command.................................................................................................7-18 Table 7-11 Parameters of the command for recharging a prepaid WiMAX user ............................................7-19 Table 7-12 Parameters of the ACK command.................................................................................................7-21 Table 7-13 Parameters of the command for querying for the bill of a WiMAX user......................................7-22 Table 7-14 Parameters of the ACK command.................................................................................................7-23
x
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
About This Document
About This Document Purpose This document describes the commands, functions, parameters, and instances of the MML interfaces. The MML interfaces consist of the operator management, broadband service, CDMA service, WCDMA service, and WiMAX service.
Related Versions The following table lists the product versions related to this document. Product Name
Version
infoX-AAA
V200R002
Intended Audience This document is intended for: Application Developer
Organization This document consists of seven parts and is organized as follows. Chapter
Description
1
This chapter describes the development procedure of the billing system.
Overview
2 Interfaces for Operator Management
This chapter describes the interfaces for the operator management.
3 MML Interfaces for Broadband Service
This chapter describes the MML interfaces for the broadband service.
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
1
infoX-AAA Interface Developer Guide - MML
About This Document
Chapter
Description
4 MML Interfaces for CDMA Service
This chapter describes the MML interfaces for the CDMA service.
5 MML Interfaces for WCDMA Service
This chapter describes the MML interfaces for the WCDMA service.
6 MML Interfaces for WCDMA Service
This chapter describes the MML interfaces for the WiMAX service.
7
This chapter lists the ChSecksum’s codes, acronyms, and abbreviations.
Appendix
Conventions Symbol Conventions The following symbols may be found in this document. They are defined as follows. Symbol
Description Indicates a hazard with a high level of risk which, if not avoided, will result in death or serious injury. Indicates a hazard with a medium or low level of risk which, if not avoided, could result in minor or moderate injury. Indicates a potentially hazardous situation that, if not avoided, could cause equipment damage, data loss, and performance degradation, or unexpected results. Indicates a tip that may help you solve a problem or save you time. Provides additional information to emphasize or supplement important points of the main text.
General Conventions
2
Convention
Description
Times New Roman
Normal paragraphs are in Times New Roman.
Boldface
Names of files, directories, folders, and users are in boldface. For example, log in as user root.
Italic
Book titles are in italics.
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
About This Document
Convention
Description
Courier New
Terminal display is in Courier New.
Command Conventions Convention
Description
Boldface
The keywords of a command line are in boldface.
Italic
Command arguments are in italic.
[]
Items (keywords or arguments) in square brackets [ ] are optional.
{ x | y | ... }
Alternative items are grouped in braces and separated by vertical bars. One is selected.
[ x | y | ... ]
Optional alternative items are grouped in square brackets and separated by vertical bars. One or none is selected.
{ x | y | ... } *
Alternative items are grouped in braces and separated by vertical bars. A minimum of one or a maximum of all can be selected.
GUI Conventions Convention
Description
Boldface
Buttons, menus, parameters, tabs, window, and dialog titles are in boldface. For example, click OK.
>
Multi-level menus are in boldface and separated by the “>” signs. For example, choose File > Create > Folder.
Keyboard Operation Format
Description
Key
Press the key. For example, press Enter and press Tab.
Key 1+Key 2
Press the keys concurrently. For example, pressing Ctrl+Alt+A means the three keys should be pressed concurrently.
Key 1, Key 2
Press the keys in turn. For example, pressing Alt, A means the two keys should be pressed in turn.
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
3
infoX-AAA Interface Developer Guide - MML
About This Document
Mouse Operation Action
Description
Click
Select and release the primary mouse button without moving the pointer.
Double-click
Press the primary mouse button twice continuously and quickly without moving the pointer.
Drag
Press and hold the primary mouse button and move the pointer to a certain position.
Update History Updates between document versions are cumulative. Therefore, the latest document version contains all updates made to previous versions.
Updates in Issue 04 (2007-12-29) The fourth commercial release.
Updates in Issue 03 (2007-09-30) The third commercial release.
Updates in Issue 02 (2007-07-31) The second commercial release.
Updates in Issue 01 (2007-04-15) The initial commercial release.
4
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
1 Overview
1
Overview
About This Chapter The following table lists the contents of this chapter. Section
Describes
1.1 Position of the Billing System in the Network
The position of the billing system in the network.
1.2 Format of the Message That Supports the MML Server Interface
The format of the MML Server message.
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
1-1
infoX-AAA Interface Developer Guide - MML
1 Overview
1.1 Position of the Billing System in the Network Figure 1-1 shows the position of the billing system and infoX-AAA in the network. Figure 1-1 MML Server and billing system in the network Operator infoX-AAA MML/Socket/TCP/IP MML Server
Billing
Internet
Access Network
IP Core
ISP Network
User
Intranet
MML Server As the server that manages the service, the Man Machine Language Server (MML Server) is an important part of the infoX-AAA system. The functions of the MML Server are as follows: z
System management
z
Service management
z
User management
z
Charging management
z
Operating log management
In addition, the MML Server provides an open MML interface and a service management function based on the interface. The third-party system, such as the billing system, can manage the user data through the MML interface. The management includes adding a user, deleting a user, and changing the user password.
Billing System As the client of the MML Server, the billing system provides a platform for carriers to manage the business. The carrier then can manage the user data by accessing the billing system.
1-2
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
1 Overview
Relation Between Billing System and MML Server The relation between the billing system and the MML Server involves the following concepts: z
Connection The billing system and MML Server creates the connection and exchanges the information through TCP/IP.
z
Session The session is a virtual connection (logical connection) between the billing system and the MML Server. After the connection is created, the billing system can create a session with the MML Server. The billing system creates the session when the operator logs in. The session identifies a valid login of the operator to the MML Server. When the operator logs out, the session is released. If the operator does not operate for more than one hour after login, the session between the billing system and the MML Server is released. One connection can have multiple sessions at the same time. That is, several operators can log in to the MML Server at the same time. In addition, the session ID must be unique on one connection. The session ID is a unique ID for an operator of the billing system to log in to the MML Server. The billing system specifies the session ID. The value is an integer.
z
Transaction After the session is created successfully, the operator of the billing system can send the MML request to the MML Server through a session. One MML request is a transaction between the operator and the MML Server. When an operator sends the MML request to the MML Server, a transaction starts. When the MML Server returns the MML response to the operator, the transaction ends. On a session initiated by the billing client, multiple concurrent transactions are not recommended. The MML Server, however, can process multiple concurrent transactions.
z
Operation An operation is a specific task of the service application, which is run by the operator on the client of the billing system. For example, the operator queries the balance of a card. The transaction ID in the MML request sent to the MML Server must map the current operation. When the MML Server returns the response, the client finds the current operation according to the transaction ID of the response. Then, the client proceed with the operation. An operation contains only one interactive transaction between the billing system and the MML Server.
1.2 Format of the Message That Supports the MML Server Interface The MML interface is an interface through which the billing client interacts with the MML Server. The billing system manages the user through the MML Server. The MML interface supports the formats of the following messages: z
Issue 04 (2007-12-29)
Ordinary message
Huawei Technologies Proprietary
1-3
infoX-AAA Interface Developer Guide - MML
1 Overview z
Heartbeat message
Format of an Ordinary Message The ordinary message is used to exchange the information between the billing system and the MML Server. Figure 1-2 shows the format of an ordinary message. Figure 1-2 Format of an ordinary message
An message = Start flag + Size + Message header + Session header + Transaction header + Operation information + Checksum z
Message header = Version number + Terminal ID + Service name
z
Session header = Session ID + Session control word + Reserved session word
z
Transaction header = Transaction ID + Transaction control word + Reserved transaction word
Table 1-1 lists the fields in an ordinary message.
1-4
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
1 Overview
Table 1-1 Fields in an ordinary message Field
Description
Value Range
Start flag
Indicates the fixed value is \x1C\x1D\x1E\x1F.
A string of four bytes.
Size
Indicates the total length of a message from the message header to the operation information.
A four-byte hexadecimal integer.
Version number
Has a fixed value 1.00.
A string of four bytes.
Terminal ID
Has a fixed value internal.
A string of eight bytes.
Service name
Indicates the name of a service. It is the medium part of an MML command.
A string of eight bytes.
Value range: 0–6500
For example, if an MML command is ADD C280 Account, the service name is C280. Session ID
The session ID is a unique ID for an operator of the billing system to log in to the MML Server. The billing system specifies the session ID.
An eight-byte hexadecimal integer. Value range: An integer that is 1 or greater than 1.
The session ID retains the same value from the login to the logout. If several operator logs in on one connection, the session IDs must be different. Session control word
Includes the DLGLGN, DLGBEG, DLGCON, and DLGEND.
A string of six bytes.
NOTE The billing system sends DLGLGN only when an operator logs in to the MML Server. For other operations, however, the billing system sends DlGCON. When the operator logs out, Session control word in the response sent by the MML Server to the billing system is DLGEND, indicating that the session ends.
Reserved session word
Issue 04 (2007-12-29)
A string of four-byte zero.
Huawei Technologies Proprietary
A string of four bytes.
1-5
infoX-AAA Interface Developer Guide - MML
1 Overview
Field
Description
Value Range
Transaction ID
Generated by the client.
An eight-byte hexadecimal integer.
z
If there is no concurrent operation, all transaction IDs can be 1.
z
If concurrent operations are required, the client must ensure that all transaction IDs of the concurrent operations are different with each other.
Transaction control word
Includes the TXBEG, TXCON, and TXEND.
A string of six bytes.
NOTE If the operation is initiated by the billing system, Transaction control word is TXBEG. If the MML Server complete operating the MML command, the value of Transaction control word that the MML Server returns to billing system is TXEND, indicating that the transaction ends.
Reserved transaction word
A string of four-byte zero.
A string of four bytes.
Operation information
Format: command code[:command parameter]
An MML command.
Checksum
A 32-bit bitwise Exclusive-OR negation value of "message header + session header + transaction header + operation information".
NOTE The value of Operation information is the multiples of four bytes. If the length is less than four bytes, add spaces after the value.
A string of four bytes.
Format of a Heartbeat Message The heartbeat message is used to monitor the communication between the billing system and the MML Server. Figure 1-3 shows the format of a heartbeat message. A heartbeat message must be sent between the bill system and MML Server every 60 seconds. If one party cannot receive 10 responses of the heartbeat message from the other in succession, it indicates that the bill system and MML Server are disconnected.
1-6
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
1 Overview
Figure 1-3 Format of a heartbeat message
A heartbeat message = Start flag + Size + HBHB + Checksum Table 1-2 lists the fields in a heartbeat message. Table 1-2 Fields in a heartbeat message Field
Description
Value Range
Start flag
Has a fixed value \x1C\x1D\x1E\x1F.
A string of four bytes.
Size
Indicates the total length of a message from the message header to the operation information.
A four-byte hexadecimal integer. Value range: 0–65000
NOTE The value is fixed in the heartbeat message.
Content
Has a fixed value HBHB.
A string of four bytes.
Checksum
A 32-bit bitwise Exclusive-OR negation value of Content (HBHB).
A string of four bytes.
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
1-7
infoX-AAA Interface Developer Guide - MML
2
2 Developer Guide to the Billing System
Developer Guide to the Billing System
About This Chapter The following table lists the contents of this chapter. Section
Describes
2.1 Overview
The objective and prerequisite for developing the billing system, and the operating flows of the billing system.
2.2 Instance
An instance of developing the billing client.
2.3 Interconnection Debugging
The interconnection debugging between the billing system and the MML Server.
2.4 FAQ
How to troubleshoot the problems during the debugging.
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
2-1
infoX-AAA Interface Developer Guide - MML
2 Developer Guide to the Billing System
2.1 Overview Objective The objective of development is to enables the billing system to communicate with the MML Server.
Prerequisite Before developing the billing system, obtain the IP address and port number of the server where the MML Server resides. The port number of the MML Server is 19999 by default. The billing system has a super administrator on the MML Server. The login name is billopr. The initial password is TELLIN.
Operating Flow Figure 2-1 shows the operating flow of the billing system. Figure 2-1 Operating flow of the billing system MML Server
Billing
login login ACK operation1 operation1 ACK ...... ......
operationN operationN ACK logout logoutACK
The detailed operating process is as follows:
2-2
1.
The billing system sends the login message to the MML Server to request the login.
2.
The MML Server receives the login message and authenticates the user of the billing system. Then, the MML Server returns the login ACK message.
3.
If the authentication is successful, the billing system sends the operation message to the MML Server requesting an operation.
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
2 Developer Guide to the Billing System
4.
The MML Server operates internally according to the message from the billing system. After the operation is complete, the MML Server returns the operation ACK message.
5.
The billing system sends the logout message to the MML Server requesting the logout.
6.
The MML Server receives the logout message and returns the logout ACK message. z
The operation message is a message initiated by the billing system. The number of the operation messages is specified by the billing system. The billing system can also send the operation requests consecutively.
z
If the operator does not operate for more than one hour after login, the session between the billing system and the MML Server is released.
2.2 Instance The following is an instance for developing the billing system: Step 1 Connect to the MML Server. The billing system sets up a Socket connection between the client and the service port of the MML Server. The following codes in C programming language are as follows (only for your reference): //Function for creating the Socket connection. void connectMML(Int& m_sockfd, Int& m_ip, Int& m_port) { struct sockaddr_in m_server_addr; Int m_result; memset((char*)&m_server_addr,'\0',(int)sizeof(m_server_addr)); m_server_addr.sin_family = AF_INET; m_server_addr.sin_addr.s_addr = m_ip; m_server_addr.sin_port = htons( m_port ); m_sockfd = socket( AF_INET, SOCK_STREAM, 0 ); if (0 >= m_sockfd) { printf("socket creat failed\n"); exit(0); } //Internal function of the Socket for setting up a connection between the client and the server. m_result = connect(m_sockfd, (struct sockaddr * ) & m_server_addr , sizeof( m_server_addr )); if (0 != m_result) { printf("connect server failed\n"); exit(0); }
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
2-3
infoX-AAA Interface Developer Guide - MML
2 Developer Guide to the Billing System }
Step 2 Encode the information. Though the encoding, the billing system on the client encapsulates the information to be sent into a message that meets the MML interface standard. The billing system must be able to encode the ordinary message and heartbeat message.
The referential codes are as follows: //Encode function EnRet Encode(MsgInfo & sendMsg,char * sendBuff, int & sendLen, int send_type) { //The exception handling is omitted. ...... //The method of encoding a heartbeat message is as follows: if (TYPE_OF_HB_MSG == send_type) { int temp_len; char * p_num, hb_checksum [MAX_HB_CHCKSUM]; temp_len = 0; strncpy(sendBuff+ temp_len,MSG_STARTTAG, MSG_STARTTAG_LEN); temp_len += MSG_STARTTAG_LEN; p_num = Int2ToHex(HB_MSG_LEN); strncpy(sendBuff + temp_len, p_num, MAX_HB_MSG_LEN); temp_len += MAX_HB_MSG_LEN; strncpy (sendBuff + temp_len, HB_CONTENT, MAX_HB_CONTENT_LEN); temp_len = MSG_STARTTAG_LEN + MAX_HB_MSG_LEN; GetChkSum(MAX_HB_MSG_LEN,sendBuff + temp_len,hb_checksum); temp_len = HB_MSG_LEN - MAX_HB_CHCKSUM; strncpy(sendBuff + temp_len, hb_checksum, MAX_HB_CHCKSUM); printf("\ncode HB secceed!\n%s",sendBuff); return Success; } //The method of encoding an ordinary message is as follows: Int msglen,cmdlen,len; char *p,chksum[MSG_CHKSUM_LEN]; char *pTx[ ] = { "TXBEG" , "TXCON" , "TXCAN" , "TXEND" }; char *pDlg[ ] = { "DLGLGN" , "DLGBEG" , "DLGCON" , "DLGEND" }; //Printing the message sent by the billing system. PrintMsg(sendMsg); //Counting the length of a message. cmdlen=strlen(sendMsg.cmd); msglen=MAX_HEAD_LEN+cmdlen; len=(4 - msglen % 4);
2-4
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
2 Developer Guide to the Billing System
msglen+=len; sendLen=msglen+MSG_COMM_LEN; memset(sendBuff,' ',MAX_MSG_LEN); len=0; //Encapsulating Start flag. strncpy(sendBuff+len, MSG_STARTTAG, MSG_STARTTAG_LEN); len+=MSG_STARTTAG_LEN; //Encapsulating Size p=Int2ToHex(msglen); strncpy(sendBuff+len, p, MSG_INFOLEN_LEN); len+=MSG_INFOLEN_LEN; //Encapsulating Message header. strncpy(sendBuff+len, MSG_VERSION, MAX_LEN_VERSION); len+=MAX_LEN_VERSION; strncpy(sendBuff+len, MSG_TERMINAL, MAX_LEN_TERMINAL); len+=MAX_LEN_TERMINAL; strncpy(sendBuff+len,sendMsg.service, strlen(sendMsg.service)); len+=MAX_LEN_SERVNAME; //Encapsulating Session header. p=Int4ToHex(sendMsg.snLogin); strncpy(sendBuff+len, p, MAX_LEN_DLGID); len+=MAX_LEN_DLGID; strncpy(sendBuff+len,pDlg[sendMsg.dlgCtrl],strlen(pDlg[sendMsg.dlgCtrl ])); len+=MAX_LEN_DLGCTRL; strncpy(sendBuff+len, MSG_DLGRSVD, MAX_LEN_DLGRSVD); len+=MAX_LEN_DLGRSVD; //Encapsulating Transaction header. p=Int4ToHex(sendMsg.sequence); strncpy(sendBuff+len, p, MAX_LEN_TXID); len+=MAX_LEN_TXID; strncpy(sendBuff+len,pTx[sendMsg.txCtrl],strlen(pTx[sendMsg .txCtrl])); len+=MAX_LEN_TXCTRL; strncpy(sendBuff+len, MSG_TXRSVD, MAX_LEN_TXRSVD); len+=MAX_LEN_TXRSVD; //Encapsulating Operation information. strncpy(sendBuff+len, sendMsg.cmd, cmdlen); //Encapsulating Checksum. len=MSG_STARTTAG_LEN + MSG_INFOLEN_LEN; GetChkSum(msglen,sendBuff+len,chksum); len=sendLen-MSG_CHKSUM_LEN; strncpy(sendBuff+len, chksum, MSG_CHKSUM_LEN); return Success;
Issue 04 (2007-12-29)
Huawei Technologies Proprietary
2-5
infoX-AAA Interface Developer Guide - MML
2 Developer Guide to the Billing System }
For details about the GetChkSum() function, see Appendix B.
Step 3 Decode the information. Though the decoding, the billing system obtains the relevant information from the message sent through the MML Server interface. The billing system must be able to decode the ordinary message and heartbeat message.
The referential codes are as follows: //Decode function EnRet Decode(MsgInfo &recMsg,char * recBuff,Int & recLen, int recv_type) { //The exception processing is omitted. ...... int msglen,len,tmpInt; char chksum[MSG_CHKSUM_LEN],tmpStr[MAX_MSG_LEN]; char *pTx[ ] = { "TXBEG" , "TXCON" , "TXCAN" , "TXEND" }; char *pDlg[ ] = { "DLGLGN" , "DLGBEG" , "DLGCON" , "DLGEND" }; len=0; //Decoding Start flag. strncpy(tmpStr, recBuff+len, MSG_STARTTAG_LEN); tmpStr[MSG_STARTTAG_LEN]='\0'; len+=MSG_STARTTAG_LEN; if(strncmp(tmpStr,MSG_STARTTAG,MSG_STARTTAG_LEN) != 0) { printf("Msg head error."); return NotCMD; } //Decoding Size. strncpy(tmpStr, recBuff+len, MSG_INFOLEN_LEN); tmpStr[MSG_INFOLEN_LEN]='\0'; len+=MSG_INFOLEN_LEN; HexToInt2(tmpStr,tmpInt); msglen=tmpInt; if ( recv_type == TYPE_OF_CMD_MSG ) { if(msglen+MSG_COMM_LEN != recLen) { printf("Msg length error."); return Failure; } }
2-6
Huawei Technologies Proprietary
Issue 04 (2007-12-29)
infoX-AAA Interface Developer Guide - MML
2 Developer Guide to the Billing System
//The method of decoding the heartbeat messages is as follows: if ( recv_type == TYPE_OF_HB_MSG ) { tmpInt=HB_MSG_LEN; char HBtempStr[HB_MSG_LEN],HBStr[HB_MSG_LEN]; strncpy(HBtempStr, recBuff, tmpInt); HBtempStr[tmpInt]='\0'; StrTrim(HBtempStr); strcpy(HBStr,"HBHB"); for (int i=0; i