中国电信在线计费系统(OCS)OCP接口规范(1.04)

更新时间:2024-07-11 10:02:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

中国电信企业标准

中国电信在线计费系统(OCS) OCP 接口规范

版本号:V1.04

中国电信集团公司

2008-6

前 言

中国电信移动业务在线计费协议是在充分研究和分析国内外在线计费协议基础上,基于中国电信移动业务在线计费的需求,参考3GPP、IETF等国际标准组织的在线计费接口协议规范编制的。

本方案是中国电信移动业务在线计费协议OCP规范,为中国电信移动业务在线计费系统总体技术方案的组成部分,是在线计费协议实施的标准规范文件。整个在线计费系统技术方案主要包括:

? 《《中国电信在线计费系统(OCS)总体技术方案》 ? 《中国电信在线计费系统(OCS)业务需求》 ? 《中国电信在线计费系统(OCS)技术要求》 ? 《中国电信在线计费系统OCP接口规范》 ? 《中国电信在线计费系统SCP设备改造要求》 ? 《中国电信在线计费系统ISMP设备改造要求》 ? 《中国电信在线计费系统CCG设备技术要求》

本标准附录A、附录B是规范性附录。 本标准附录C是资料性附录。

本技术方案由中国电信股份有限公司提出并归口。 本方案起草单位: 中国电信股份有限公司上海研究院 本方案主要起草人:刘晓亮 董斌 周峰 李洁 本方案解释单位:中国电信股份有限公司上海研究院

目 录

第1章 范围 ....................................................................................................................................10 第2章 规范性引用文件 ................................................................................................................ 11 第3章 定义和符号及缩写 ............................................................................................................12

3.1 定义 .................................................................................................................................. 12 3.2 符号和缩写 ...................................................................................................................... 15 第4章 协议概述 ............................................................................................................................16

4.1 协议结构 .......................................................................................................................... 17 4.2 协议格式 .......................................................................................................................... 17

4.2.1 消息头格式 ........................................................................................................... 17 4.2.2 消息列表 ............................................................................................................... 19 4.2.3 AVP头格式 ........................................................................................................... 20 4.2.4 AVP数据格式 ....................................................................................................... 21

第5章 接口描述 ............................................................................................................................24

5.1 外部接口逻辑结构 .......................................................................................................... 24 5.2 与ISMP的接口关系 ....................................................................................................... 24 5.3 与SCP的接口关系 ......................................................................................................... 24 5.4 与CCG的接口关系 ........................................................................................................ 24 第6章 接口定义 ............................................................................................................................26

6.1 消息定义 .......................................................................................................................... 26

6.1.1 Credit-Control-Request (CCR) .............................................................................. 26 6.1.2 Credit-Control-Answer (CCA) .............................................................................. 31 6.1.3 Re-Auth-Request(RAR) ........................................................................................ 33 6.1.4 Re-Auth-Answer(RAA) ........................................................................................ 34 6.1.5 Abort-Session-Request(ASR) ................................................................................ 34 6.1.6 Abort-Session-Answer(ASA) ................................................................................ 35 6.1.7 Device-Watchdog-Request(DWR) ........................................................................ 36 6.1.8 Device-Watchdog-Answer(DWA) ......................................................................... 36 6.1.9 Disconnect-Peer-Request(DPR) ............................................................................ 36 6.1.10 Disconnect-Peer-Answer(DPA) ........................................................................... 37 6.1.11 Capabilities-Exchange-Request (CER) ............................................................... 37 6.1.12 Capabilities-Exchange-Answer (CEA)................................................................ 38 6.2 AVP定义 .......................................................................................................................... 39

6.2.1 Session-Id .............................................................................................................. 39 6.2.2 Origin-Host ............................................................................................................ 39 6.2.3 Origin-Realm ......................................................................................................... 39 6.2.4 Destination-Realm ................................................................................................. 40 6.2.5 Auth-Application-Id .............................................................................................. 40 6.2.6 Service-Context-Id ................................................................................................ 40 6.2.7 CC-Request-Type .................................................................................................. 41 6.2.8 CC-Request-Number ............................................................................................. 42 6.2.9 Destination-Host .................................................................................................... 42 6.2.10 User-Name ........................................................................................................... 42

6.2.11 Origin-State-Id ..................................................................................................... 43 6.2.12 Event-Timestamp ................................................................................................ 43 6.2.13 Subscription-ID ................................................................................................... 43 6.2.14 Subscription-Id-Type ........................................................................................... 43 6.2.15 Subscription-Id-Data ........................................................................................... 44 6.2.16 Termination-Cause .............................................................................................. 44 6.2.17 Route-Record ...................................................................................................... 44 6.2.18 Requested-Action ................................................................................................ 45 6.2.19 Requested-Service-Unit ....................................................................................... 45 6.2.20 CC-Time .............................................................................................................. 46 6.2.21 CC-Money ........................................................................................................... 46 6.2.22 Unit-Value ........................................................................................................... 46 6.2.23 Value-Digits ......................................................................................................... 46 6.2.24 Exponent .............................................................................................................. 46 6.2.25 Currency-Code .................................................................................................... 47 6.2.26 CC-Total-Octets ................................................................................................. 47 6.2.27 CC-Input-Octets .................................................................................................. 47 6.2.28 CC-Output-Octets ................................................................................................ 47 6.2.29 CC-Service-Specific-Units .................................................................................. 47 6.2.30 Used-Service-Unit ............................................................................................... 48 6.2.31 Tariff-Change-Usage .......................................................................................... 48 6.2.32 Multiple-Services-Indicator ................................................................................. 48 6.2.33 Multiple-Services-Credit-Control ........................................................................ 49 6.2.34 Reporting-Reason ................................................................................................ 50 6.2.35 Trigger-Type ........................................................................................................ 51 6.2.36 Rating-Group ....................................................................................................... 51 6.2.37 CC-Correlation-Id ............................................................................................... 51 6.2.38 Proxy-Info ........................................................................................................... 51 6.2.39 Proxy-Host .......................................................................................................... 52 6.2.40 Proxy-State .......................................................................................................... 52 6.2.41 User-Equipment-Info ........................................................................................... 52 6.2.42 User-Equipment-Info-Type ................................................................................. 52 6.2.43 User-Equipment-Info-Value ................................................................................ 53 6.2.44 Service-Information ............................................................................................. 53 6.2.45 PS-Information .................................................................................................... 53 6.2.46 IN-Information .................................................................................................... 54 6.2.47 P2PSMS-Information .......................................................................................... 55 6.2.48 ISMP-Information ............................................................................................... 55 6.2.49 Result-Code ......................................................................................................... 56 6.2.50 CC-Session-Failover .......................................................................................... 56 6.2.51 Granted-Service-Unit .......................................................................................... 57 6.2.52 Tariff-Time-Change ............................................................................................ 57 6.2.53 Time-Quota-Threshold ........................................................................................ 58 6.2.54 Volume-Quota-Threshold .................................................................................... 58 6.2.55 Cost-Information ................................................................................................ 58

6.2.56 Cost-Unit ............................................................................................................. 59 6.2.57 Final-Unit-Indication ........................................................................................... 59 6.2.58 Final-Unit-Action ................................................................................................ 60 6.2.59 Restriction-Filter-Rule ......................................................................................... 60 6.2.60 Filter-Id ................................................................................................................ 60 6.2.61 Redirect-Server .................................................................................................... 60 6.2.62 Redirect-Address-Type ........................................................................................ 61 6.2.63 Redirect-server-Address ...................................................................................... 61 6.2.64 Credit-Control-Failure-Handling ......................................................................... 61 6.2.65 Validity-Time ....................................................................................................... 62 6.2.66 Direct-Debiting-Failure-Handling ....................................................................... 62 6.2.67 Quota-Holding-Time ........................................................................................... 62 6.2.68 Quota-Consumption-Time ................................................................................... 63 6.2.69 3GPP-Charging-Id ............................................................................................... 64 6.2.70 3GPP-PDP-Type .................................................................................................. 64 6.2.71 PDP-Address ....................................................................................................... 64 6.2.72 3GPP-GPRS-Negotiated-Qos-Profile .................................................................. 64 6.2.73 SGSN-Address .................................................................................................... 65 6.2.74 GGSN-Address .................................................................................................... 65 6.2.75 CG-Address ......................................................................................................... 65 6.2.76 3GPP-IMSI-MCC-MNC ..................................................................................... 65 6.2.77 3GPP-GGSN-MCC-MNC .................................................................................. 65 6.2.78 3GPP-NSAPI ....................................................................................................... 65 6.2.79 Called-Station-Id ................................................................................................. 66 6.2.80 3GPP-Session-Stop-Indicator .............................................................................. 66 6.2.81 3GPP-Selection-Mode ......................................................................................... 66 6.2.82 3GPP-Charging-Characteristics........................................................................... 66 6.2.83 3GPP-SGSN-MCC-MNC.................................................................................... 66 6.2.84 3GPP-MS-TimeZone ........................................................................................... 67 6.2.85 3GPP-CAMEL-Charging-Info ............................................................................ 67 6.2.86 Charging-Rule-Based-Name ............................................................................... 67 6.2.87 3GPP-User-Location-Info ................................................................................... 67 6.2.88 3GPP-RAT-Type .................................................................................................. 67 6.2.89 Calling-Partys-Category ...................................................................................... 68 6.2.90 Calling-Vlr-Number ............................................................................................ 68 6.2.91 Calling-CellID-Or-SAI ........................................................................................ 68 6.2.92 Calling-LAI ......................................................................................................... 68 6.2.93 Called-Vlr-Number.............................................................................................. 68 6.2.94 Called-CellID-Or-SAI ......................................................................................... 68 6.2.95 Called-LAI .......................................................................................................... 69 6.2.96 Called-IMEI ........................................................................................................ 69 6.2.97 Calling-IMEI ....................................................................................................... 69 6.2.98 Oiginal-Called-Party-Id ....................................................................................... 69 6.2.99 High-Layer-Compatibility ................................................................................... 69 6.2.100 Additional-Calling-Party-Number ..................................................................... 70

6.2.101 Bearer-Capability .............................................................................................. 70 6.2.102 Bearer-Capability2 ............................................................................................ 70 6.2.103 EventType-BCSM ............................................................................................. 70 6.2.104 Redirecting-Party-Id .......................................................................................... 71 6.2.105 Redirection-Information .................................................................................... 71 6.2.106 Tele-Service-Code ............................................................................................. 71 6.2.107 Bearer-Service-Code ......................................................................................... 71 6.2.108 Call-Reference-Number .................................................................................... 72 6.2.109 MSC-Address .................................................................................................... 72 6.2.110 GMSC-Address ................................................................................................. 72 6.2.111 Time-Zone ......................................................................................................... 72 6.2.112 IN-Service-Indicator .......................................................................................... 72 6.2.113 SMSC-Address .................................................................................................. 72 6.2.114 SM-Id ................................................................................................................. 73 6.2.115 SM-Length ......................................................................................................... 73 6.2.116 Message-Id ........................................................................................................ 73 6.2.117 Charge-Party-Type ............................................................................................. 73 6.2.118 Third-Party-Subscription-Id .............................................................................. 74 6.2.119 Sp-Id .................................................................................................................. 74 6.2.120 Service-Enabler-Type ........................................................................................ 74 6.2.121 Product-Id .......................................................................................................... 75 6.2.122 Product-Offer-Id ................................................................................................ 75 6.2.123 Service-Type ...................................................................................................... 76 6.2.124 Content-Id .......................................................................................................... 76 6.2.125 Media-Type ....................................................................................................... 76 6.2.126 ClientIP .............................................................................................................. 77 6.2.127 Failed-AVP ........................................................................................................ 77 6.2.128 Ms-Classmark2 .................................................................................................. 77 6.2.129 Tele-Service-Code2 ........................................................................................... 77 6.2.130 Bearer-Service-Code2 ....................................................................................... 78 6.2.131 AoC-Information ............................................................................................... 78 6.2.132 AoC-Balance ..................................................................................................... 78 6.2.133 AoC-Language-ID ............................................................................................. 78 6.2.134 AoC-Tariff ......................................................................................................... 79 6.2.135 AoC-Start-Time ................................................................................................. 79 6.2.136 AoC-Unit ........................................................................................................... 79 6.2.137 AoC-Price .......................................................................................................... 79 6.2.138 AoC-Confirmation ............................................................................................. 79 6.2.139 Calling-Party-Number ....................................................................................... 80 6.2.140 Called-Party-Number ........................................................................................ 80 6.2.141 Service-Key ....................................................................................................... 80 6.2.142 OA-Subscription-Id ........................................................................................... 80 6.2.143 DA-Subscription-Id ........................................................................................... 81 6.2.144 PSTN-Event-Information .................................................................................. 81 6.2.145 Recharge-information ........................................................................................ 82

6.2.146 QueryBalance-Information ................................................................................ 82 6.2.147 DSL-Information ............................................................................................... 82 6.2.148 Service-ID ......................................................................................................... 83 6.2.149 Charge-Method .................................................................................................. 83 6.2.150 Card-Number ..................................................................................................... 83 6.2.151 Card-Batch ........................................................................................................ 83 6.2.152 Card-Type .......................................................................................................... 83 6.2.153 Card-Money ...................................................................................................... 84 6.2.154 Recharge-Method .............................................................................................. 84 6.2.155 Charge-Money ................................................................................................... 84 6.2.156 Money-Type ...................................................................................................... 84 6.2.157 Money-Value ..................................................................................................... 85 6.2.158 Active-Day ........................................................................................................ 85 6.2.159 ChargeConfirmFlag ........................................................................................... 85 6.2.160 Account-Query-Method ..................................................................................... 85 6.2.161 UserPassWd ...................................................................................................... 85 6.2.162 Query-Mode ...................................................................................................... 86 6.2.163 Account-Information ......................................................................................... 86 6.2.164 AccountId .......................................................................................................... 86 6.2.165 Account-Type .................................................................................................... 86 6.2.166 AccountDate ...................................................................................................... 87 6.2.167 Service-Identifier ............................................................................................... 87 6.2.168 ChargingType .................................................................................................... 87 6.2.169 PoC-Information ................................................................................................ 88 6.2.170 PoC-Server-Role................................................................................................ 88 6.2.171 PoC-Session-Type ............................................................................................. 88 6.2.172 Number-Of-Participants .................................................................................... 88 6.2.173 Participants-Group ............................................................................................. 89 6.2.174 Called-Party-Address ........................................................................................ 89 6.2.175 Participant-Access-Priority................................................................................ 89 6.2.176 PoC-Group-Name .............................................................................................. 89 6.2.177 PoC-Session-Id .................................................................................................. 90 6.2.178 PoCService-Feature-Type .................................................................................. 90 6.2.179 IM-Information .................................................................................................. 90 6.2.180 Conference-Server-Role .................................................................................... 91 6.2.181 Conference-Session-Type .................................................................................. 91 6.2.182 Conference-Id .................................................................................................... 91 6.2.183 IMService-Feature-Type .................................................................................... 91 6.2.184 ProductSpecID................................................................................................... 92 6.2.185 NasIP ................................................................................................................. 92 6.2.186 FRAMED_IP ..................................................................................................... 92 6.2.187 Use_Node_ID .................................................................................................... 93 6.2.188 CDMA-Charging-Id .......................................................................................... 93 6.2.189 CDMA-IP-Technology ...................................................................................... 93 6.2.190 CDMA-MS-IP-Address ..................................................................................... 93

6.2.191 CDMA-Qos-Profile-ID...................................................................................... 94 6.2.192 PDSN-Address .................................................................................................. 94 6.2.193 HA-Address ....................................................................................................... 94 6.2.194 AAA-Address .................................................................................................... 94 6.2.195 CDMA-Charging-Type ...................................................................................... 94 6.2.196 CDMA-Calling-Station-Id ................................................................................. 95 6.2.197 Called-Short-Number ........................................................................................ 95 6.2.198 Group-Number .................................................................................................. 95 6.2.199 VPN-Call-Type ................................................................................................. 95 6.3 流程 .................................................................................................................................. 95

6.3.1 业务流程 ............................................................................................................... 96

6.3.1.1 基于会话的计费流程 ................................................................................ 96 6.3.1.2 基于事件的直接扣费 ................................................................................ 97 6.3.2 服务器发起的重授权流程 ................................................................................... 97 6.3.3 异常流程 ............................................................................................................... 98

6.3.3.1 Tx定时器超时前未收到CCA消息时的处理 ......................................... 98 6.3.3.2 Tci超时OCS发送RAR(数据业务) .................................................... 99 6.3.3.3 Tcc超时OCS发送ASR(会话业务) ................................................... 99 6.3.3.4 OCS服务器出现异常时的切换流程 ........................................................ 99

附录A(规范性附录) 结果码定义 .............................................................................................. 102 附录B(规范性附录) 已定义的AVP表 ...................................................................................... 105

B.1 CCR AVP表 .................................................................................................................. 105 B.2 CCA AVP表 .................................................................................................................. 108 附录C(资料性附录) 业务流程示例 .......................................................................................... 111

C.1CAMEL智能网流程 ......................................................................................................111

C.1.1 SCP主/被叫基于时间收费 ................................................................................111 C.1.2 SCP主叫AoC 提醒流程 ................................................................................... 113 C.1.3 SCP最后一个时间片Tone音提醒 ................................................................... 114 C.1.4无条件呼叫前转 ................................................................................................ 116 C.1.5有条件呼叫前转 ................................................................................................ 118 C.1.7点对点短消息 .................................................................................................... 119 C.2 ISMP流程 ..................................................................................................................... 121

C.2.1 ISMP基于事件计费 .......................................................................................... 121 C.2.2 ISMP扣费流程 .................................................................................................. 122 C.2.3 ISMP流量计费流程 .......................................................................................... 123 C.2.4 ISMP返款流程 .................................................................................................. 124 C.3 CCG流程 ...................................................................................................................... 125

C.3.1 CCG基于流量计费 ........................................................................................... 125 C.3.2 CCG 基于时长计费 ........................................................................................... 127 C.3.3 CCG 费率按时间切换计费 ............................................................................... 129 C.3.4 CCG 数据业务RAR .......................................................................................... 132 C.3.5 CCG数据业务ASR........................................................................................... 133 C.4 固网语音计费 ............................................................................................................... 134

C.4.1 用户余额足够,用户主动挂机 ........................................................................ 134 C.4.2初始余额不足申请时长..................................................................................... 135

C.5 DSL计费 ....................................................................................................................... 136 C.6固网语音管理流程 ....................................................................................................... 139

C.6.1充值流程 ............................................................................................................ 139 C.6.2查询余额流程 .................................................................................................... 140 C.7 POC流程 ....................................................................................................................... 140

C.7.1 基于会话的计费 ................................................................................................ 140 C.7.2 基于事件的计费 ................................................................................................ 141 C.8 IM流程 ......................................................................................................................... 143

C.8.1 基于会话的计费 ................................................................................................ 143 C.8.2 基于事件的计费 ................................................................................................ 144 C.9 WIN智能网流程........................................................................................................... 149

C9.1预付费主叫流程 ................................................................................................. 149 C9.2预付费被叫流程 ................................................................................................. 151 C9.3无条件/遇忙前转流程 ........................................................................................ 155 C9.4无应答前转流程 ................................................................................................. 157 C9.5管理流程 ............................................................................................................. 159 C9.6余额不足 ............................................................................................................. 160

C9.61初始余额不足申请时长 ............................................................................ 160 C9.62初始余额不足最小计费单位 .................................................................... 161 C9.63过程中余额不足申请时长 ........................................................................ 161 C9.64过程中余额不足最小计费单位 ................................................................ 163

附录D修改历史记录 ................................................................................................................... 166

图目录

图 1 OCP协议的协议结构 ................................................................................................... 17

图 2 消息头格式 .................................................................................................................... 17 图 3 AVP头格式 ................................................................................................................... 20 图 4 OCS外部接口逻辑接口 ............................................................................................... 24

表目录

表 1 消息列表 ........................................................................................................................ 19 表 2:Credit-Control-Request AVP表 ............................................................................. 27 表3:PS-Information AVP表 ............................................................................................... 28 表 4:IN-Information AVP表 ............................................................................................... 29 表 5:P2PSMS-Information AVP表 ..................................................................................... 29 表 6:ISMP-Information AVP表 .......................................................................................... 30 表 7:Credit-Control-Answer AVP表 ................................................................................... 32

中国电信在线计费系统OCP接口规范

第1章 范围

本标准制订了中国电信移动业务在线计费系统的计费接口协议,包括OCS与综合业务管理平台ISMP的接口、OCS与智能网SCP的接口、OCS与内容计费网关CCG的接口。

本标准适用于在线计费系统OCS设备提供商、综合业务管理平台提供商、CCG设备提供商、智能网SCP设备提供商。

10

中国电信在线计费系统OCP接口规范

第2章 规范性引用文件

下列文件中的条款通过本规范的引用而成为本规范的条款。凡是注日期的引用文件,其随后所有的修改单(不包括勘误的内容)或修订版均不适用于本标准,然而,鼓励根据本规范达成协议的各方研究是否可使用这些文件的最新版本。凡是不注日期的引用文件,其最新版本适用于本规范。

[1]. [2]. [3]. [4]. [5]. [6]. [7]. [8]. [9]. [10]. [11]. [12]. [13]. [14]. [15]. [16].

IETF RFC 4006: \IETF RFC 3588: \

3GPP TS 22.115 \

3GPP TS 32.200: \management; Charging management; Charging principles\

3GPP TS 32.215: \management; Charging management; Charging data description for the Packet Switched (PS) domain\3GPP TS 32.225: \management; Charging management; Charging data description for the IP Multimedia Subsystem(IMS)\3GPP TS 32.240: \management; Charging management; Charging Architecture and Principles\

3GPP TS 32.251: \management; Charging management; Packet Switched(PS) domain charging\

3GPP TS 32.296: \management; Charging management; Online Charging System (OCS) applications and interfaces\

3GPP TS 32.299: \management; Charging management; Diameter charging application\

3GPP TS 29.002: \Mobile Application Part (MAP) specification \

3GPP TS 29.078: \Applications for Mobile network Enhanced Logic (CAMEL) Phase 4 CAMEL Application Part (CAP) specification\

ITU-T Recommendation Q.763 “Signalling System No. 7 – ISDN user part formats and codes”

ITU-T Recommendation Q.931 %user-network interface layer 3 specification for basic call control\

3GPP TS 24.008: \Mobile radio interface layer 3 specification (3GPP TS 24.008)\IANA \

Http://www.iana.org/assignments/address-family-numbers

11

中国电信在线计费系统OCP接口规范

第3章 定义和符号及缩写

3.1 定义

本标准应用了下列定义: ? AAA

认证,授权和计费。 ? 计费(Accounting)

收集资源使用信息的动作,以用于能力规划、审核、营业额或成本分配。 ? 计费记录(Accounting Record)

一条计费记录表述了一个用户在整个会话过程中,资源消费的总结。 ? 认证(Authentication)

核实某个实体(客体)身份的动作。 ? 授权(Authorization)

决定一个提出请求的实体(客体)是否被允许访问资源(主体)的动作。 ? AVP(Attribute-Value-Pairs)

Diameter协议由一个头以及跟随的一个或多个属性值对(AVP)组成。一个AVP包含一个头和用来封装特定协议的数据(例如,路由信息),以及认证、授权或计费信息。

? Diameter 代理(Diameter Agent)

Diameter代理是一个Diameter节点,它提供中继、Proxy、复位向或翻译服务。

? Diameter 客户(Diameter Client)

Diameter客户是位于网络边缘的一个设备,执行接入控制。Diameter客户的典型范例就是网络接入服务器(NAS)或外地代理(FA)。 ? Diameter 节点(Diameter Node)

Diameter节点是实现Diameter协议的主机程序,它既可以作为客户也可以作为代理或服务器。

? Diameter 对等端(Diameter Peer)

Diameter对等端是一个Diameter节点,该节点和另一个特定的Diameter节点

12

中国电信在线计费系统OCP接口规范

有一个直接的传输连接。

? Diameter 安全交换(Diameter Security Exchange)

Diameter安全交换是两个Diameter节点建立端到端安全的过程。 ? Diameter 服务器(Diameter Server)

Diameter服务器负责处理某个特殊域的认证(Authentication)、授权(authorization)和计费(account)请求。除基本协议以外,Diameter服务器还必须支持Diameter应用扩展。 ? 下行(Downstream)

用于标识由归属服务器发往接入设备的特定Diameter消息的方向。 ? 端到端安全(End-to-End Security)

TLS和IPsec提供逐跳安全,或者跨一个传输连接的安全。当中继或Proxy参与进来时,逐跳安全无法保证整个Diameter用户会话的安全。端到端安全是指可能通过Diameter代理进行通信的两个Diameter节点之间的安全。端到端安全可以保证从发起Diameter节点到终结Diameter节点之间整个Diameter通信路线的安全。

? 归属域(Home Realm)

归属域是可管理域,通过它可以与用户保持一个帐户关系。 ? 归属服务器(Home Server)

位于归属地的Diameter服务器。 ? 中间计费(Interim accounting)

中间计费消息提供一个用户会话过程中资源使用的快照。在设备重启动或者其它网络故障,而无法得到会话总结消息或会话记录时,它通常用于用户会话的分段计帐。

? 本地域(Local Realm)

本地域是为某用户提供服务的可管理域(domain)。一个可管理域可以作为某些用户的本地域(realm),也可以同时是其它用户的归属域(realm)。 ? 多会话(Multi-session)

一个多会话表现为若干会话的一个逻辑链接。多会话通过使用

Acct-Multi-Session-Id来辨识。多会话的一个举例可以是一个多链路PPP束。该

13

中国电信在线计费系统OCP接口规范

PPP束的每一个分支都是一个会话,而整个PPP束则是一个多会话。 ? 网络接入标识符(Network Access Identifier)

可以简称为NAI,在Diameter协议中用来摘录某个用户的身份和域(realm)的信息。身份用来在认证和/或授权过程中标识该用户,而域则用于消息的路由。 ? Proxy 代理(Proxy Agent)

也可以简称为Proxy。Proxy代理除了转发请求和响应,还根据与资源使用和配置相关的策略作出决定。该工作通常通过跟踪NAS设备的状态来完成。Proxy代理在收到服务器响应之前一般不会响应客户请求。当需要转发的请求和响应违反策略时,它可以生成拒绝(Reject)消息。因此,Proxy代理必须理解通过它们的消息的语义;不一定支持所有的Diameter应用。 ? 中继代理(Relay Agent)

也可以简称为中继。中继根据与路由相关的AVP和域路由表列表转发请求和响应。由于中继不作策略决定,它们不检查或改变非路由AVP。因此,中继从不生成消息,也不须理解消息或非路由AVP的语义,并且能够处理任何Diameter应用或消息类型。由于中继根据路由AVP和域转发表中的信息作决定,它们不会保留NAS资源使用或会话的状态。 ? 复位向代理(Redirect Agent)

复位向代理将客户引导到服务器,使得它们可以直接通信。由于复位向代理不在转发路径上,它们不会改变在客户和服务器之间传送的任何AVP。复位向代理不生成消息,能够处理任何消息类型。复位向代理不保留与会话或NAS资源有关的状态。 ? 域(Realm)

NAI中紧跟在“@”字符后面的字符串。NAI域名必须是唯一的,并且遵从DNS命名空间的管理。Diameter使用realm(也可以泛指domain)来决定消息是否本地处理,还是必须将其路由或复位向。 ? 安全联盟(Security Association)

指一个Diameter会话中的两个端点之间的关联,该会话保证端点间通信的保密性和完整性,即使通信在有中继和/或Proxy的情况下进行的。 ? 会话状态(Session state)

14

中国电信在线计费系统OCP接口规范

状态代理通过跟踪所有经过授权的活动会话,保留会话状态信息。每个经过授权的会话都与某特殊的业务绑定,其状态为活动,一直到被通知改变为其它状态,或到期为止。

? 子会话(Sub-session)

表示一个提供给已有会话的独特的业务(例如Qos或数据特性)。这些业务可以同时(例如在同一会话过程中同时传送语音和数据)或连续发生。会话中的这些改变通过Accounting-Sub-Session-Id来表征。 ? 翻译代理(Translation Agent)

一个有状态的Diameter节点,执行Diameter和其它AAA协议(如RADIUS)之间的协议翻译。

? 事务状态(Transaction state)

Diameter协议要求代理维护事务状态,以用于失败处理。 ? 传输连接(Transport Connection)

指两个Diameter对等端之间已有的直接TCP或SCTP连接,也称为端到端连接。 ? 上行(Upstream)

用于标识从接入设备到归属服务器的特定Diameter 消息的传送方向。 ? 字(Word)

一种分组长度单位,相当于两个字节。

3.2 符号和缩写

缩略语 OCP ISMP CCG AAA ABNF AVP RADIUS SCTP TCP IP TLS 英文全名 Online Charging Protocol Integrated Service Management Platform Content Charging Gateway Authentication, Authorization and Accounting Augmented BNF for Syntax Specifications Attribute Value Pairs Remote Authentication Dial-In User Service Stream Control Transmission Protocol Transmission Control Protocol Internet Protocol Transport Layer Security 中文全名 在线计费协议 综合业务管理平台 内容计费网关 认证、授权和计费 扩展BNF语法规范 属性值对 远端拨入用户验证服务 流控制传输协议 传输控制协议 Internet协议 传输层安全 15

中国电信在线计费系统OCP接口规范

“V”比特,称作制造商定义(Vendor-Specific)比特,指明在AVP头中是否出现可选的制造商ID字段。当设置时,该AVP码属于某特定制造商编码地址空间。

除非另外注明,AVP将拥有以下缺省AVP标记字段设置: “M”比特必须设置。“V”比特不可以设置。 ? 制造商ID(Vendor-ID)

如果在AVP标记字段中设置了“V”比特,则会出现制造商ID字段。可选的四个八位组的制造商ID字段包含IANA分配的“SMI网络管理私有企业码”值,按网络顺序编码。

任何希望实现制造商定义(vendor-specific)Diameter的制造商必须使用它们自己的制造商ID,顺着它们的私有管理AVP地址空间,以保证它们与其它制造商的vendor-specific AVP 以及将来的IETF应用的AVP都不会冲突。制造商ID值为0符合IETF采用的AVP值,由IANA管理。

由于制造商ID字段缺失暗示该AVP不是制造商定义的,应用不可以使用值为0的制造商ID。

该字段为可选字段,如果该AVP值为IETF所定义,则该字段不出现;如果该AVP值为3GPP所定义,则该值为10415;如果该AVP值为中国电信所定义,则该值为81000。 ? AVP Length

AVP长度字段为3个八位组,指明在这个AVP中的八位组的数量,包括AVP码、AVP长度、AVP标记、Vendor-ID字段(如果出现)以及AVP数据。如果接收到一个消息,其带有无效属性长度,该消息应被拒绝。

4.2.4 AVP数据格式

数据字段为0到多个八位组,包含属性定义的信息。数据字段的格式和长度由AVP码和AVP长度字段决定。数据字段的格式必须是以下基本数据类型中的一种。

? OctetString

该数据包含任意可变长的数据。除非另外注明,AVP长度字段必须至少设置为8(如果“V”比特有效,则为12)。这种类型的AVP值的长度如果不是4个八位

21

中国电信在线计费系统OCP接口规范

组的倍数,应按照需要填充,这样下一个AVP(如果有)才能够在一个32比特边界开始。 ? Integer32

32比特有符号整数,按照网络字节顺序。AVP长度字段必须设置为12(如果“V”比特有效,则为16)。 ? Integer64

64比特有符号整数,按照网络字节顺序。AVP长度字段必须设置为16(如果“V”比特有效,则为20)。 ? Unsigned32

32比特无符号整数,按照网络字节顺序。AVP长度字段必须设置为12(如果“V”比特有效,则为16)。 ? Unsigned64

64比特无符号整数,按照网络字节顺序。AVP长度字段必须设置为16(如果“V”比特有效,则为20)。 ? Float32

该类型表示单精度浮点数,遵循IEEE标准754-1985中关于浮点的描述。该32比特值按网络字节顺序传送。AVP长度字段必须设置为12(如果“V”比特有效,则为16)。 ? Float64

该类型表示双精度浮点值,遵循IEEE标准754-1985中关于浮点的描述。该64比特值按网络字节顺序传送。AVP长度字段必须设置为16(如果“V”比特有效,则为20)。 ? Grouped

该数据字段定义为一个AVP序列。这些AVP按其定义的顺序排列,每一个都包括它们的头和填充位。AVP长度字段值设置为8(如果“V”比特有效,则为12),加上所有序列内的AVP的长度总和。因此Grouped类型的AVP的AVP长度字段总是4的倍数。 ? Address

地址格式是从OctetString AVP基本格式导出的。它与其它数据格式不同,

22

中国电信在线计费系统OCP接口规范

例如需要区分32比特(IPV4)或128比特(IPV6)地址。地址AVP的头两个八位组为AddressType,其包含一个在[IANA的“地址簇号码”]中定义的地址簇。AddressType用来区别剩下八位组的内容和格式。

IANA的“地址簇号码”的定义参见【16】 ? Time

时间格式是从OctetString AVP基本格式导出的。该字符串必须包含4个八位组,与NTP时间戳格式的前4个字节格式相同。NTP时间戳在NTP协议规范[RFC2030]第3章中定义。本格式描述的时间,从通用协调时间(UTC)1900年1月1日0点开始。在UTC时间2036年二月7日6点28分16秒,时间值将溢出。SNTP规范中描述了将时间扩展到2104年的程序,所有DIAMETER节点都必须支持该程序。 ? UTF8String

UTF8String格式是从OctetString AVP基本格式导出的。该格式是使用ISO/IEC IS 10646-1字符集表示的可读的字符串,使用RFC 2279中描述的UTF-8转换格式,编码为一个OctetString。 ? DiameterIdentity

DiameterIdentity格式是从OctetString AVP基本格式导出的。 DiameterIdentity = FQDN

DiameterIdentity值唯一标识一个Diameter节点,以用于重复连接和路由环路检测。

字符串的内容必须是Diameter节点的FQDN。如果多个Diameter节点在同一台主机上运行,每个Diameter节点必须分配一个唯一的DiameterIdentity。如果一个Diameter节点可以由若干个FQDN标识,其中一个FQDN应在启动时被挑选出来,并作为该节点唯一的DiameterIdentity。 ? Enumerated

Enumerated是从Integer32 AVP基本格式导出的。该定义包含一个有效值的列表及相关解释,并在引入该AVP的Diameter应用中有所描述。

23

中国电信在线计费系统OCP接口规范

第5章 接口描述

5.1 外部接口逻辑结构

OCS与外部实时计费上报网元间采用OCP协议,处理实时的计费请求。外部实时计费上报网元包括ISMP、SCP、CCG及其它可触发计费请求的网元。其中,OCS为OCP的服务器端,外部实时计费上报网元为客户端。OCS外部接口逻辑接口如图4所示:

ISMP ocp SCP ocp OCS ocp ocp 其它网元 CCG

图 4 OCS外部接口逻辑接口

5.2 与ISMP的接口关系

对于由ISMP管理的增值数据业务,由ISMP向OCS发送在线计费请求,通过OCP协议携带相关计费参数传递给OCS,OCS执行计费逻辑,再通过OCP协议返回给ISMP,完成整个在线计费过程。

5.3 与SCP的接口关系

对于智能网业务,由SCP向OCS发送在线计费请求,通过OCP协议携带相关计费参数传递给OCS,OCS执行计费逻辑,再通过OCP协议返回给SCP,完成整个在线计费过程。

5.4 与CCG的接口关系

24

中国电信在线计费系统OCP接口规范

对于可区分内容的流量计费,由CCG向OCS发送在线计费请求,通过OCP协议携带相关计费参数传递给OCS,OCS执行计费逻辑,再通过OCP协议返回给CCG,完成整个在线计费过程。

25

中国电信在线计费系统OCP接口规范

第6章 接口定义

6.1 消息定义

在以下的表述中,“<>”符号表示必选而且位置必须是在消息的开头,“{}”符号表示必选,“[]”符号表示可选,“*[]”符号表示可重复的可选项。

M 必选 C 条件可选

OM 运行商定义的必选项 OC 运营商定义的条件可选项

6.1.1 Credit-Control-Request (CCR)

信用控制请求Credit-Control-Request (CCR),用命令码设置为272,消息标志‘R’设置来表示。该命令用于信用控制的请求。

消息格式如下:

::= < Diameter Header: 272, REQ, PXY >

{Origin-Host} {Origin-Realm}

{Destination-Realm} {Auth-Application-Id} {Service-Context-Id} {CC-Request-Type} {CC-Request-Number} [Destination-Host] [User-Name] [Origin-State-Id] [Event-Timestamp] *[Subscription-Id] [Termination-Cause] *[Route-Record] [Service-Identifier] [Requested-Action]

[Requested-Service-Unit] *[Used-Service-Unit]

[Multiple-Services-Indicator]

26

中国电信在线计费系统OCP接口规范

*[Multiple-Services-Credit-Control] [CC-Correlation-Id] [User-Equipment-Info] *[Proxy-Info]

[Service-Information] [AoC-Information]

Credit-Control-Request AVP如表2所示:

表 2:Credit-Control-Request AVP表

AVP名称 {Origin-Host} {Origin-Realm} {Destination-Realm} {Auth-Application-Id} {Service-Context-Id} {CC-Request-Type} {CC-Request-Number} [Destination-Host] [User-Name] [Origin-State-Id] [Event-Timestamp] *[Subscription-Id] {Subscription-Id-Type} {Subscription-Id-Data} [Termination-Cause] *[Route-Record] [Service-Identifier] [Requested-Action] [Requested-Service-Unit] [CC-Time] [CC-Money] {Unit-Value} {Value-Digits} [Exponent] [Currency-Code] [CC-Total-Octets] [CC-Input-Octets] [CC-Output-Octets] [CC-Service-Specific-Units] *[Used-Service-Unit] [Reporting-Reason] [Tariff-Change-Usage] [CC-Time] [CC-Money] {Unit-Value} {Value-Digits} [Exponent] [Currency-Code] [CC-Total-Octets] [CC-Input-Octets] [CC-Output-Octets] [CC-Service-Specific-Units] [Multiple-Services-Indicator] *[Multiple-Services-Credit-Control] [Reporting-Reason] *[ Trigger-Type] [Service-Identifier] [Requested-Service-Unit] [CC-Time] [CC-Money] {Unit-Value} {Value-Digits} [Exponent] [Currency-Code] AVP代码 263 264 296 283 258 461 416 415 293 1 278 55 443 450 444 295 282 439 436 437 420 413 445 447 429 425 421 412 414 417 446 872 452 420 413 445 447 429 425 421 412 414 417 455 456 872 870 439 437 420 413 445 447 429 425 VendorID -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10415 -- -- -- -- -- -- -- -- -- -- -- -- -- 10415 10415 -- -- -- -- -- -- -- -- 数据类型 UTF8String 选项 M M M M M M M M Oc OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC DiameterIdentity DiameterIdentity DiameterIdentity Unsigned32 UTF8String Enumerated Unsigned32 DiameterIdentity UTF8String Unsigned32 Time Grouped Enumerated UTF8String Enumerated DiameterIdentity Unsigned32 Enumerated Grouped Unsigned32 Grouped Grouped Integer64 Integer32 Unsigned32 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Grouped Enumerated Enumerated Unsigned32 Grouped Grouped Integer64 Integer32 Unsigned32 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Enumerated Grouped Enumerated Enumerated Unsigned32 Grouped Unsigned32 Grouped Grouped Integer64 Integer32 Unsigned32 27

中国电信在线计费系统OCP接口规范

AVP名称 [CC-Total-Octets] [CC-Input-Octets] [CC-Output-Octets] [CC-Service-Specific-Units] *[Used-Service-Unit] [ Reporting-Reason ] [Tariff-Change-Usage] [CC-Time] [CC-Money] {Unit-Value} {Value-Digits} [Exponent] [Currency-Code] [CC-Total-Octets] [CC-Input-Octets] [CC-Output-Octets] [CC-Service-Specific-Units] [Rating-Group] [CC-Correlation-Id] [User-Equipment-Info] {User-Equipment-Info-Type} {User-Equipment-Info-Value} *[Proxy-Info] {Proxy-Host} {Proxy-State} {Service-Information} [PS-Information] [IN-Information] [P2PSMS-Information] [ISMP-Information] [DSL-Information] [PSTN-Event-Information] [Recharge-information] [QueryBalance-Information] [POC-Information] [IM-Information] [AoC-Information] [AoC-Confirmation] AVP代码 421 412 414 417 446 872 452 420 413 445 447 429 425 421 412 414 417 432 411 458 459 460 284 280 33 873 874 20300 20400 20500 20600 20700 20800 20900 879 22200 20329 20340 VendorID -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10415 10415 81000 81000 81000 81000 81000 81000 81000 10415 81000 81000 81000 数据类型 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Grouped Enumerated Enumerated Unsigned32 Grouped Grouped Integer64 Integer32 Unsigned32 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Unsigned32 OctetString Grouped Enumerated OctetString Grouped DiameterIdentity OctetString Grouped Grouped Grouped Grouped Grouped Grouped Grouped Grouped Grouped Grouped Grouped Grouped Enumerated 选项 OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OM OM OC OM OM OM OC OC OC OC OC OC OC OC OC OC OC OC PS-Information AVP如表3所示:

表3:PS-Information AVP表

AVP名称 [3GPP-Charging-Id] [3GPP-PDP-Type] [PDP-Address] [3GPP-GPRS-Negotiated-QoS-Profile] [SGSN-Address] [GGSN-Address] [CG-Address] [3GPP-IMSI-MCC-MNC] [3GPP-GGSN- MCC-MNC] [3GPP-NSAPI] [Called-Station-Id] [3GPP-Session-Stop-Indicator] [3GPP-Selection-Mode] [3GPP-Charging-Characteristics] [3GPP-SGSN-MCC-MNC] [3GPP-MS-TimeZone] [3GPP-CAMEL-Charging-Info] [Charging-Rule-Based-Name] [3GPP-User-Location-Info] [3GPP-RAT-Type] [CDMA-Charging-Id] [CDMA-IP-Technology] AVP代码 2 3 1227 5 1228 847 846 8 9 10 30 11 12 13 18 23 24 1004 22 21 21201 21202 VendorID 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 10415 数据类型 UTF8String Enumerated Address UTF8String Address Address Address UTF8String UTF8String UTF8String UTF8String Unsigned32 UTF8String Unsigned32 UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String Enumerated 选项 OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC 28

中国电信在线计费系统OCP接口规范

[CDMA-MS-IP-Address] [CDMA-Qos-Profile-ID] [PDSN-Address] [HA-Address] [AAA-Address] [CDMA-Charging-Type] [CDMA-Calling-Station-Id] 21203 21204 21205 21206 21207 21208 21209 10415 10415 10415 10415 10415 10415 10415 Address UTF8String Address Address Address Unsigned32 UTF8String OC OC OC OC OC OC OC IN-Information AVP如表4所示:

表 4:IN-Information AVP表

AVP名称 [Calling-Party-Number] [Called-Party-Number] [Service-Key] [Calling-Partys-Category] [Calling-Vlr-Number] [Calling-CellID-Or-SAI] [Calling-LAI] [Called-Vlr-Number] [Called-CellID-Or-SAI] [Called-LAI] [Called-IMEI] [Calling-IMEI] [Oiginal-Called-Party-Id] [High-Layer-Compatibility] [Additional-Calling-Party-Number] [Bearer-Capability] [Bearer-Capability2] [EventType-BCSM] [Redirecting-Party-Id] [Redirection-Information] [IMSI] [Tele-Service-Code] [Bearer-Service-Code] [Call-Reference-Number] [MSC-Address] [GMSC-Address] [Time-Zone] [IN-Service-Indicator] [Ms-Classmark2] [Tele-Service-Code2] [Bearer-Service-Code2] [Called-Short-Number] [Group-Number] [VPN-Call-Type] AVP代码 20336 20337 20338 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20201 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20381 20382 20383 VendorID 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 数据类型 UTF8String UTF8String Unsigned32 Unsigned32 UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String UTF8String OctetString OctetString Unsigned32 UTF8String OctetString UTF8String OctetString OctetString OctetString UTF8String UTF8String Unsigned32 Unsigned32 OctectString OctectString OctectString UTF8String UTF8String Unsigned32 选项 OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC P2PSMS-Information AVP如表5所示:

表 5:P2PSMS-Information AVP表

AVP名称 {OA-Subscription-Id} {Subscription-Id-Type} {Subscription-Id-Data} {DA-Subscription-Id} {Subscription-Id-Type} {Subscription-Id-Data} {SMSC-Address} {SM-Id} [SM-Length] AVP代码 20511 450 444 20512 450 444 20401 20402 20403 VendorID 81000 -- -- 81000 -- -- 81000 81000 81000 数据类型 Grouped Enumerated UTF8String Grouped Enumerated UTF8String UTF8String UTF8String Unsigned32 选项 OM OM OM OM OM OM OM OC OC 29

中国电信在线计费系统OCP接口规范

ISMP-Information AVP如表6所示:

表 6:ISMP-Information AVP表

AVP名称 [Message-Id] [Charge-Party-Type] [OA-Subscription-Id] {Subscription-Id-Type} {Subscription-Id-Data} [DA-Subscription-Id] {Subscription-Id-Type} {Subscription-Id-Data} [Third-Party-Subscription-Id] {Subscription-Id-Type} {Subscription-Id-Data} [SP-Id] [Sevice-Enabler-Type] [ChargingType] [Product-Id] [Product-Offer-ID] [Service-Type] [Content-Id] [Media-Type] [Client-IP] AVP代码 20501 20502 20511 450 444 20512 450 444 20503 450 444 20504 20505 20515 20506 20513 20507 20508 20509 20510 VendorID 81000 81000 81000 -- -- 81000 -- -- 81000 -- -- 81000 81000 81000 81000 81000 81000 81000 81000 81000 数据类型 OctectString Enumerated Grouped Enumerated UTF8String Grouped Enumerated UTF8String Grouped Enumerated UTF8String OctectString Enumerated Unsigned32 OctectString OctectString Enumerated OctectString OctectString IPAddress 选项 OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC

表 7:DSL -Information AVP表

AVP名称 [Calling-Party-Number] [Called-Party-Number] [ProductSpecID] [NasIP] [FRAMED_IP] [Use_Node_ID] AVP代码 20336 20337 30301 30302 30306 30313 VendorID 81000 81000 81000 81000 81000 81000 数据类型 UTF8String UTF8String OctetString OctetString OctetString OctetString 选项 OC OC OC OC OC OC 表8:PSTN-Event-Information AVP表

AVP名称 [Charge-Method ] AVP代码 20701 VendorID 81000 数据类型 Enumerated 选项 OC 表9:Recharge-information AVP表

AVP名称 [Card-Number] [Card-Batch] [Card-Type] [Card-Money] [Recharge-Method] [Charge-Money] [Money-Type] [Money-Value] [Active-Day] [ChargeConfirmFlag] AVP代码 20801 20802 20803 20804 20805 20806 20807 20808 20809 20810 VendorID 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 数据类型 OctetString OctetString Unsigned32 Unsigned32 Enumerated Grouped Unsigned32 Integer32 Unsigned32 Enumerated 选项 OC OC OC OC OC OC OC OC OC OC 表10:QueryBalance-Information AVP表

AVP名称 AVP代码 VendorID 数据类型 选项 30

中国电信在线计费系统OCP接口规范

[Account-Query-Method] [UserPassWd] [Query-Mode] 20901 20902 20903 81000 81000 81000 Unsigned32 UTF8String Unsigned32 OC OC OC 表11:POC-Information AVP表

AVP名称 {PoC-Server-Role} [PoC-Session-Type] [Number-Of-Participants] *[Participants-Group] {Called-Party-Address} [Participant-Access-Priority] [PoC-Group-Name] [PoC-Session-Id] [PoCService-Feature-Type] AVP代码 883 884 885 1260 832 1259 859 1229 23001 VendorID 10415 10415 10415 10415 10415 10415 10415 10415 81000 数据类型 Enumerated Enumerated Unsigned32 Grouped UTF8String Enumerated UTF8String UTF8String Unsigned32 选项 Om OC OC OC Om OC OC OC OC 表12:IM-Information AVP表

AVP名称 {Conference-Server-Role} [Conference-Session-Type] [Conference-Id] [Number-Of-Participants] *[Participants-Group] {Called-Party-Address} [Participant-Access-Priority] [IMService-Feature-Type] AVP代码 22201 22202 22016 885 1260 832 1259 22203 VendorID 81000 81000 81000 10415 10415 10415 10415 81000 数据类型 Enumerated Enumerated UTF8String Unsigned32 Grouped UTF8String Enumerated Unsigned32 选项 Om OC OC OC OC Om OC OC

6.1.2 Credit-Control-Answer (CCA)

信用控制应答Credit-Control-Answer (CCA),用命令码设置为272,消息标志?R?清除来表示。该命令用于信用控制的应答。

消息格式如下:

::= < Diameter Header: 272, PXY >

{Result-Code}

{Origin-Host} {Origin-Realm} {Auth-Application-Id} {CC-Request-Type} {CC-Request-Number} [CC-Session-Failover] [Origin-State-Id]

[Service-Identifier]

[Granted-Service-Unit] [Cost-Information]

31

中国电信在线计费系统OCP接口规范

[Final-Unit-Indication]

[Credit-Control-Failure-Handling] *[Trigger-Type]

[Direct-Debiting-Failure-Handling] *[Proxy-Info]

*[Multiple-Services-Credit-Control] *[Route-Record] *[Failed-AVP] [AoC-Information]

Credit-Control-Answer AVP如表7所示:

表 7:Credit-Control-Answer AVP表

AVP名称 {Result-Code} {Origin-Host} {Origin-Realm} {Auth-Application-Id} {CC-Request-Type} {CC-Request-Number} [ CC-Session-Failover ] [ Origin-State-Id ] [Service-Identifier] [ Granted-Service-Unit ] [Tariff-Time-Change] [CC-Time] [CC-Money] {Unit-Value} {Value-Digits} [Exponent] [Currency-Code] [CC-Total-Octets] [CC-Input-Octets] [CC-Output-Octets] [CC-Service-Specific-Units] [Time-Quota-Threshold ] [Volume-Quota-Threshold ] [Cost-Information] {Unit-Value} {Value-Digits} [Exponent] {Currency-Code} [Cost-Unit] [Final-Unit-Indication] {Final-Unit-Action} *[Restriction-Filter-Rule] *[Filter-Id] [Redirect-Server] {Redirect-Address-Type} {Redirect-Server-Address} [Credit-Control-Failure-Handling] *[Trigger-Type] [Direct-Debiting-Failure-Handling] *[Multiple-Services-Credit-Control] [Quota-Holding-Time] [Service-Identifier] [Granted-Service-Unit] [Tariff-Time-Change] AVP代码 263 268 264 296 258 416 415 418 278 439 431 451 420 413 445 447 429 425 421 412 414 417 868 869 423 445 447 429 425 424 430 449 438 11 434 433 435 427 870 428 456 871 439 431 451 VendorID -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10415 10415 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10415 -- -- 10415 -- -- -- 数据类型 UTF8String Unsigned32 DiameterIdentity DiameterIdentity Unsigned32 Enumerated Unsigned32 Enumerated Unsigned32 Unsigned32 Grouped Time Unsigned32 Grouped Grouped Integer64 Integer32 Unsigned32 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Grouped Grouped Integer64 Integer32 Unsigned32 UTF8String Grouped Enumerated IPFilterRule OctectString Grouped Emumerated UTF8String Enumerated Enumerated Enumerated Grouped Unsigned32 Unsigned32 Grouped Time 选项 M M M M M M M OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC 32

中国电信在线计费系统OCP接口规范

AVP名称 [CC-Time] [CC-Total-Octets] [CC-Input-Octets] [CC-Output-Octets] [CC-Service-Specific-Units] [ Time-Quota-Threshold ] [ Volume-Quota-Threshold ] [ Quota-Consumption-Time ] [Rating-Group] [Validity-Time] [Result-Code] [Final-Unit-Indication] {Final-Unit-Action} *[Restriction-Filter-Rule] *[Filter-Id] [Redirect-Server] {Redirect-Address-Type} {Redirect-Server-Address} *[Route-Record] *[Proxy-Info] {Proxy-Host} {Proxy-State} *[Failed-AVP] [AoC-Information] [Account-Type] [AoC-Balance] [AoC-Language-ID] *[AoC-Tariff] [AoC-Start-Time] [AoC-Unit] {AoC-Price} *[Account-Information] [AccountId] [Account-Type] [CC-Money] {Unit-Value} {Value-Digits} [Exponent] [Currency-Code] [AccountDate] AVP代码 420 421 412 414 417 868 869 881 432 448 268 430 449 438 11 434 433 435 282 284 280 33 279 20329 20372 20330 20331 20332 20333 20334 20335 20356 20357 20372 413 445 447 429 425 20359 VendorID -- -- -- -- -- 10415 10415 10415 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 81000 -- -- -- -- -- 81000 数据类型 Unsigned32 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Unsigned64 Unsigned32 Unsigned32 Unsigned32 Unsigned32 Grouped Enumerated IPFilterRule OctectString Grouped Emumerated UTF8String DiameterIdentity Grouped DiameterIdentity OctetString Grouped Grouped Unsigned32 Unsigned32 Enumerated Grouped Unsigned32 Unsigned32 Unsigned32 Grouped OctetString Unsigned32 Grouped Grouped Integer64 Integer32 Unsigned32 Time 选项 OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OM OM OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC OC 6.1.3 Re-Auth-Request(RAR)

重新认证/授权请求Re-Auth-Request (RAR),用命令码设置为258,消息标志‘R’设置来表示。该命令可以由任何服务器发送给提供会话服务的接入设备,来请求对用户进行重新认证/授权。

消息格式如下:

::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm }

{ Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type }

33

中国电信在线计费系统OCP接口规范

[ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] [Rating-Group] * [ AVP ]

具体定义参见[2]

6.1.4 Re-Auth-Answer(RAA)

重新认证/授权应答Re-Auth-Answer (RAA), 用命令码设置为258,消息标志?R?清除来表示。该命令用来应答RAR消息。Result-Code AVP必须出现,表示请求消息的处理结果。

一个成功的RAA消息必须有跟随着的应用指定的认证/授权消息。 消息格式如下:

::= < Diameter Header: 258, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ]

[ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ]

[ Redirect-Host-Usage ]

[ Redirect-Host-Cache-Time ] * [ Proxy-Info ] * [ AVP ]

具体定义参见[2]

6.1.5 Abort-Session-Request(ASR)

中断会话请求Abort-Session-Request (ASR),由命令码274和设置消息标志?R?来表示。它由任何服务器向提供接入服务的接入设备发送,来请求中断Session-Id表示的会话。

34

中国电信在线计费系统OCP接口规范

消息格式如下:

::= < Diameter Header: 274, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm }

{ Destination-Realm } { Destination-Host } { Auth-Application-Id } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]

具体定义参见[2]

6.1.6 Abort-Session-Answer(ASA)

中断会话应答Abort-Session-Answer (ASA),由命令码274和清除消息标志?R?来表示。是应答ASR的消息。Result-Code AVP必须出现,表示请求的处理结果。

如果以ASR中Session-Id表示的会话成功终止,返回值设置为DIAMETER_SUCCESS。如果会话当前不活跃,那么返回值为DIAMETER_UNKNOWN_SESSION_ID。如果接入设备因为某种原因并没有停止会话,则返回值是DIAMETER_UNABLE_TO_COMPLY。

消息格式如下:

::= < Diameter Header: 274, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ]

[ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ]

35

中国电信在线计费系统OCP接口规范

[ Redirect-Host-Usage ]

[ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ]

具体定义参见[2]

6.1.7 Device-Watchdog-Request(DWR)

设备监控请求Device-Watchdog-Request (DWR),命令码为280,命令标记?R?比特置位,当两个对等端之间没有流量交互时,发送至对等端。一旦检测到传输差错,则该消息不允许发送至备选对等端。

消息格式如下:

::= < Diameter Header: 280, REQ > { Origin-Host } { Origin-Realm } [ Origin-State-Id ]

具体定义参见[2]

6.1.8 Device-Watchdog-Answer(DWA)

设备监控应答消息Device-Watchdog-Answer (DWA),命令码为280,命令标记?R?比特位清除,回复Device-Watchdog-Request消息时发送。

消息格式如下:

::= < Diameter Header: 280 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] * [ Failed-AVP ]

[ Original-State-Id ]

具体定义参见[2]

6.1.9 Disconnect-Peer-Request(DPR)

拆除对等端连接请求Disconnect-Peer-Request (DPR),命令代码为282,

36

中国电信在线计费系统OCP接口规范

命令标记?R?比特置位。将此消息发送至对等端,提示对方自己将关闭传输连接。如果检测到传输失败,该消息不可以被发送到备选对等端。

消息格式如下:

::= < Diameter Header: 282, REQ > { Origin-Host } { Origin-Realm }

{ Disconnect-Cause }

具体定义参见[2]

6.1.10 Disconnect-Peer-Answer(DPA)

拆除对等端连接的应答消息Disconnect-Peer-Answer (DPA),命令码为282,命令标记?R?比特清除,应答Disconnect-Peer-Request消息。接收到这条消息,传输连接关闭。

消息格式如下:

::= < Diameter Header: 282 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] * [ Failed-AVP ]

具体定义参见[2]

6.1.11 Capabilities-Exchange-Request (CER)

能力交换请求消息Capabilities-Exchange-Request(CER),发送命令代码为257,命令标记?R?比特置位的能力交换请求消息交换本地能力。一旦检测到传输失败,则这条消息不可以被发送到备选对等端处。

当Diameter运行在SCTP协议上(注:SCTP协议允许连接建立在多个接口和多个IP地址之上),能力交换请求消息必须为每一个潜在的IP地址包含一个Host- IP-Address AVP。潜在IP地址可以用于传输Diameter消息。

消息格式如下:

::= < Diameter Header: 257, REQ >

37

中国电信在线计费系统OCP接口规范

{ Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id }

{ Product-Name } [ Origin-State-Id ]

* [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ]

* [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ]

具体定义参见[2]

6.1.12 Capabilities-Exchange-Answer (CEA)

能力交换应答消息Capabilities-Exchange-Answer(CEA),命令代码为257、清除?R?比特命令标记的能力交换应答消息(CEA)用于应答CER消息。

当Diameter运行在SCTP协议上,能力交换应答消息必须为每个潜在IP地址包含一个主机IP地址(Host-IP-Address)AVP,这些IP地址可以在本地传输Diameter消息时使用。

消息定义如下:

::= < Diameter Header: 257 > { Result-Code } { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id }

{ Product-Name } [ Origin-State-Id ] [ Error-Message ] * [ Failed-AVP ]

* [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ]

* [ Vendor-Specific-Application-Id ] [ Firmware-Revision ]

38

中国电信在线计费系统OCP接口规范

* [ AVP ]

具体定义参见[2]

6.2 AVP定义

6.2.1 Session-Id

Session-Id AVP 名 263 AVP码 UTF8String AVP类型 引用自 【2】8.8 说明:会话ID,唯一标识一次DCC会话过程。 语法如下: ;;[;] :同Origin-Host; :系统当前时间;按照数据格式为TIME的定义来填写。 :循环递增,初始值为0。系统重新启动时设置为0; :保留。 以上各字段以\字符相隔。 例: SCP001.chinatelecom.com;1876543210;523 6.2.2 Origin-Host

Origin-Host AVP 名 264 AVP码 DiameterIdentity AVP类型 引用自 【2】6.3 说明:发起端设备标识。由全网统一分配,不同Diameter对等端必须保证唯一。 例:SCP001.chinatelecom.com 6.2.3 Origin-Realm

Origin-Realm AVP 名 296 AVP码 DiameterIdentity AVP类型 引用自 【2】6.4 说明:发起端设备归属域。 例:chinatelecom.com 39

中国电信在线计费系统OCP接口规范

6.2.4 Destination-Realm

Destination-Realm AVP 名 283 AVP码 DiameterIdentity AVP类型 引用自 【2】6.6 说明:目的端设备归属域。该属性不可出现在应答消息中。 例:chinatelecom.com 6.2.5 Auth-Application-Id

Auth-Application-Id AVP 名 258 AVP码 Unsigned32 AVP类型 引用自 【2】6.8 说明:用于重认证/授权的应用唯一标识。 Diameter Common Messages 0 NASREQ 1 [NASREQ] Mobile-IP 2 [DIAMMIP] Diameter Base Accounting 3 Relay 0xffffffff DCCA 4 6.2.6 Service-Context-Id

AVP 名 AVP码 AVP类型 引用自 Service-Context-Id 461 UTF8String 【1】8.42 40

本文来源:https://www.bwwdw.com/article/ffx.html

Top