PageRenderTime 27ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 1ms

/servers/jain-slee/resources/diameter-cca/common/events/src/main/java/net/java/slee/resource/diameter/cca/events/avp/CreditControlAVPCodes.java

http://mobicents.googlecode.com/
Java | 1315 lines | 56 code | 38 blank | 1221 comment | 0 complexity | 3a6ebfa56e1165c13bc8e08efaba155a MD5 | raw file
Possible License(s): LGPL-3.0, GPL-3.0, LGPL-2.1, GPL-2.0, CC-BY-SA-3.0, CC0-1.0, Apache-2.0, BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2011, Red Hat, Inc. and individual contributors
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package net.java.slee.resource.diameter.cca.events.avp;
  23. /**
  24. * Start time:19:45:16 2008-12-08<br>
  25. * Project: mobicents-diameter-parent<br>
  26. * Contains definition of AVP codes and values used by Diameter CCA - RFC 4006
  27. *
  28. * @author <a href="mailto:baranowb@gmail.com"> Bartosz Baranowski </a>
  29. * @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
  30. */
  31. public final class CreditControlAVPCodes {
  32. private CreditControlAVPCodes() {
  33. // TODO Auto-generated constructor stub
  34. }
  35. /**
  36. * <b>8.1. CC-Correlation-Id AVP</b><br>
  37. *
  38. *
  39. * The CC-Correlation-Id AVP (AVP Code 411) is of type OctetString and
  40. * contains information to correlate credit-control requests generated for
  41. * different components of the service; e.g., transport and service level.
  42. * The one who allocates the Service-Context-Id (i.e., unique identifier of
  43. * a service specific document) is also responsible for defining the content
  44. * and encoding of the CC-Correlation-Id AVP.
  45. */
  46. public static final int CC_Correlation_Id = 411;
  47. /**
  48. * <b>8.2. CC-Request-Number AVP</b></br>
  49. *
  50. *
  51. * The CC-Request-Number AVP (AVP Code 415) is of type Unsigned32 and
  52. * identifies this request within one session. As Session-Id AVPs are
  53. * globally unique, the combination of Session-Id and CC-Request-Number AVPs
  54. * is also globally unique and can be used in matching credit- control
  55. * messages with confirmations. An easy way to produce unique numbers is to
  56. * set the value to 0 for a credit-control request of type INITIAL_REQUEST
  57. * and EVENT_REQUEST and to set the value to 1 for the first UPDATE_REQUEST,
  58. * to 2 for the second, and so on until the value for TERMINATION_REQUEST is
  59. * one more than for the last UPDATE_REQUEST.
  60. */
  61. public static final int CC_Request_Number = 415;
  62. /**
  63. * <pre>
  64. * 8.3. CC-Request-Type AVP
  65. *
  66. *
  67. * The CC-Request-Type AVP (AVP Code 416) is of type Enumerated and
  68. * contains the reason for sending the credit-control request message.
  69. * It MUST be present in all Credit-Control-Request messages. The
  70. * following values are defined for the CC-Request-Type AVP:
  71. *
  72. * INITIAL_REQUEST 1
  73. * An Initial request is used to initiate a credit-control session,
  74. * and contains credit control information that is relevant to the
  75. * initiation.
  76. *
  77. * UPDATE_REQUEST 2
  78. * An Update request contains credit-control information for an
  79. * existing credit-control session. Update credit-control requests
  80. * SHOULD be sent every time a credit-control re-authorization is
  81. * needed at the expiry of the allocated quota or validity time.
  82. * Further, additional service-specific events MAY trigger a
  83. * spontaneous Update request.
  84. *
  85. * TERMINATION_REQUEST 3
  86. * A Termination request is sent to terminate a credit-control
  87. * session and contains credit-control information relevant to the
  88. * existing session.
  89. *
  90. * EVENT_REQUEST 4
  91. * An Event request is used when there is no need to maintain any
  92. * credit-control session state in the credit-control server. This
  93. * request contains all information relevant to the service, and is
  94. * the only request of the service. The reason for the Event request
  95. * is further detailed in the Requested-Action AVP. The Requested-
  96. * Action AVP MUST be included in the Credit-Control-Request message
  97. * when CC-Request-Type is set to EVENT_REQUEST.
  98. * </pre>
  99. */
  100. public static final int CC_Request_Type = 416;
  101. /**
  102. * <pre>
  103. * 8.4. CC-Session-Failover AVP
  104. *
  105. *
  106. * The CC-Session-Failover AVP (AVP Code 418) is type of Enumerated and
  107. * contains information as to whether moving the credit-control message
  108. * stream to a backup server during an ongoing credit-control session is
  109. * supported. In communication failures, the credit-control message
  110. * streams can be moved to an alternative destination if the credit-
  111. * control server supports failover to an alternative server. The
  112. * secondary credit-control server name, if received from the home
  113. * Diameter AAA server, can be used as an address of the backup server.
  114. * An implementation is not required to support moving a credit-control
  115. * message stream to an alternative server, as this also requires moving
  116. * information related to the credit-control session to backup server.
  117. *
  118. * The following values are defined for the CC-Session-Failover AVP:
  119. *
  120. * FAILOVER_NOT_SUPPORTED 0
  121. * When the CC-Session-Failover AVP is set to FAILOVER_NOT_SUPPORTED,
  122. * the credit-control message stream MUST NOT to be moved to an
  123. * alternative destination in the case of communication failure.
  124. *
  125. * This is the default behavior if the AVP isn't included in the
  126. * reply from the authorization or credit-control server.
  127. *
  128. * FAILOVER_SUPPORTED 1
  129. * When the CC-Session-Failover AVP is set to FAILOVER_SUPPORTED, the
  130. * credit-control message stream SHOULD be moved to an alternative
  131. * destination in the case of communication failure. Moving the
  132. * credit-control message stream to a backup server MAY require that
  133. * information related to the credit-control session should also be
  134. * forwarded to alternative server.
  135. * </pre>
  136. */
  137. public static final int CC_Session_Failover = 418;
  138. /**
  139. *<pre>
  140. * 8.5. CC-Sub-Session-Id AVP
  141. *
  142. *
  143. * The CC-Sub-Session-Id AVP (AVP Code 419) is of type Unsigned64 and
  144. * contains the credit-control sub-session identifier. The combination
  145. * of the Session-Id and this AVP MUST be unique per sub-session, and
  146. * the value of this AVP MUST be monotonically increased by one for all
  147. * new sub-sessions. The absence of this AVP implies that no sub-
  148. * sessions are in use.
  149. * </pre>
  150. */
  151. public static final int CC_Sub_Session_Id = 419;
  152. /**
  153. * <pre>
  154. * 8.6. Check-Balance-Result AVP
  155. *
  156. *
  157. * The Check Balance Result AVP (AVP Code 422) is of type Enumerated and
  158. * contains the result of the balance check. This AVP is applicable
  159. * only when the Requested-Action AVP indicates CHECK_BALANCE in the
  160. * Credit-Control-Request command.
  161. *
  162. * The following values are defined for the Check-Balance-Result AVP.
  163. *
  164. * ENOUGH_CREDIT 0
  165. * There is enough credit in the account to cover the requested
  166. * service.
  167. *
  168. * NO_CREDIT 1
  169. * There isn't enough credit in the account to cover the requested
  170. * service.
  171. * </pre>
  172. */
  173. public static final int Check_Balance_Result = 422;
  174. /**
  175. * <pre>
  176. * 8.7. Cost-Information AVP
  177. *
  178. *
  179. * The Cost-Information AVP (AVP Code 423) is of type Grouped, and it is
  180. * used to return the cost information of a service, which the credit-
  181. * control client can transfer transparently to the end user. The
  182. * included Unit-Value AVP contains the cost estimate (always type of
  183. * money) of the service, in the case of price enquiry, or the
  184. * accumulated cost estimation, in the case of credit-control session.
  185. *
  186. * The Currency-Code specifies in which currency the cost was given.
  187. * The Cost-Unit specifies the unit when the service cost is a cost per
  188. * unit (e.g., cost for the service is $1 per minute).
  189. *
  190. * When the Requested-Action AVP with value PRICE_ENQUIRY is included in
  191. * the Credit-Control-Request command, the Cost-Information AVP sent in
  192. * the succeeding Credit-Control-Answer command contains the cost
  193. * estimation of the requested service, without any reservation being
  194. * made.
  195. *
  196. * The Cost-Information AVP included in the Credit-Control-Answer
  197. * command with the CC-Request-Type set to UPDATE_REQUEST contains the
  198. * accumulated cost estimation for the session, without taking any
  199. * credit reservation into account.
  200. *
  201. * The Cost-Information AVP included in the Credit-Control-Answer
  202. * command with the CC-Request-Type set to EVENT_REQUEST or
  203. * TERMINATION_REQUEST contains the estimated total cost for the
  204. * requested service.
  205. *
  206. * It is defined as follows (per the grouped-avp-def of
  207. * RFC 3588 [DIAMBASE]):
  208. *
  209. * Cost-Information ::= &lt; AVP Header: 423 &gt;
  210. * { Unit-Value }
  211. * { Currency-Code }
  212. * [ Cost-Unit ]
  213. * </pre>
  214. */
  215. public static final int Cost_Information = 423;
  216. /**
  217. *<pre>
  218. * 8.8. Unit-Value AVP
  219. *
  220. *
  221. * Unit-Value AVP is of type Grouped (AVP Code 445) and specifies the
  222. * units as decimal value. The Unit-Value is a value with an exponent;
  223. * i.e., Unit-Value = Value-Digits AVP * 10&circ;Exponent. This
  224. * representation avoids unwanted rounding off. For example, the value
  225. * of 2,3 is represented as Value-Digits = 23 and Exponent = -1. The
  226. * absence of the exponent part MUST be interpreted as an exponent equal
  227. * to zero.
  228. *
  229. * It is defined as follows (per the grouped-avp-def of
  230. * RFC 3588 [DIAMBASE]):
  231. *
  232. * Unit-Value ::= &lt; AVP Header: 445 &gt;
  233. * { Value-Digits }
  234. * [ Exponent ]
  235. * </pre>
  236. */
  237. public static final int Unit_Value = 445;
  238. /**
  239. * <pre>
  240. * 8.9. Exponent AVP
  241. *
  242. *
  243. * Exponent AVP is of type Integer32 (AVP Code 429) and contains the
  244. * exponent value to be applied for the Value-Digit AVP within the
  245. * Unit-Value AVP.
  246. * </pre>
  247. */
  248. public static final int Exponent = 429;
  249. /**
  250. * <pre>
  251. * 8.10. Value-Digits AVP
  252. *
  253. *
  254. * The Value-Digits AVP is of type Integer64 (AVP Code 447) and contains
  255. * the significant digits of the number. If decimal values are needed
  256. * to present the units, the scaling MUST be indicated with the related
  257. * Exponent AVP. For example, for the monetary amount $ 0.05 the value
  258. * of Value-Digits AVP MUST be set to 5, and the scaling MUST be
  259. * indicated with the Exponent AVP set to -2.
  260. * </pre>
  261. */
  262. public static final int Value_Digits = 447;
  263. /**
  264. * <pre>
  265. * 8.11. Currency-Code AVP
  266. *
  267. *
  268. * The Currency-Code AVP (AVP Code 425) is of type Unsigned32 and
  269. * contains a currency code that specifies in which currency the values
  270. * of AVPs containing monetary units were given. It is specified by
  271. * using the numeric values defined in the ISO 4217 standard [ISO4217].
  272. * </pre>
  273. */
  274. public static final int Currency_Code = 425;
  275. /**
  276. * <pre>
  277. * 8.12. Cost-Unit AVP
  278. *
  279. *
  280. * The Cost-Unit AVP (AVP Code 424) is of type UTF8String, and it is
  281. * used to display a human readable string to the end user. It
  282. * specifies the applicable unit to the Cost-Information when the
  283. * service cost is a cost per unit (e.g., cost of the service is $1 per
  284. * minute). The Cost-Unit can be minutes, hours, days, kilobytes,
  285. * megabytes, etc.
  286. * </pre>
  287. */
  288. public static final int Cost_Unit = 424;
  289. /**
  290. * <pre>
  291. * 8.13. Credit-Control AVP
  292. *
  293. *
  294. * The Credit-Control AVP (AVP Code 426) is of type Enumerated and MUST
  295. * be included in AA requests when the service element has credit-
  296. * control capabilities.
  297. *
  298. * CREDIT_AUTHORIZATION 0
  299. * If the home Diameter AAA server determines that the user has
  300. * prepaid subscription, this value indicates that the credit-control
  301. * server MUST be contacted to perform the first interrogation. The
  302. * value of the Credit-Control AVP MUST always be set to 0 in an AA
  303. * request sent to perform the first interrogation and to initiate a
  304. * new credit-control session.
  305. *
  306. * RE_AUTHORIZATION 1
  307. * This value indicates to the Diameter AAA server that a credit-
  308. * control session is ongoing for the subscriber and that the
  309. * credit-control server MUST not be contacted. The Credit-Control
  310. * AVP set to the value of 1 is to be used only when the first
  311. * interrogation has been successfully performed and the credit-
  312. * control session is ongoing (i.e., re-authorization triggered by
  313. * Authorization-Lifetime). This value MUST NOT be used in an AA
  314. * request sent to perform the first interrogation.
  315. * </pre>
  316. */
  317. public static final int Credit_Control = 426;
  318. /**
  319. * <pre>
  320. * 8.14. Credit-Control-Failure-Handling AVP
  321. *
  322. *
  323. * The Credit-Control-Failure-Handling AVP (AVP Code 427) is of type
  324. * Enumerated. The credit-control client uses information in this AVP
  325. * to decide what to do if sending credit-control messages to the
  326. * credit-control server has been, for instance, temporarily prevented
  327. * due to a network problem. Depending on the service logic, the
  328. * credit-control server can order the client to terminate the service
  329. * immediately when there is a reason to believe that the service cannot
  330. * be charged, or to try failover to an alternative server, if possible.
  331. * Then the server could either terminate or grant the service, should
  332. * the alternative connection also fail.
  333. *
  334. * TERMINATE 0
  335. * When the Credit-Control-Failure-Handling AVP is set to TERMINATE,
  336. * the service MUST only be granted for as long as there is a
  337. * connection to the credit-control server. If the credit-control
  338. * client does not receive any Credit-Control-Answer message within
  339. * the Tx timer (as defined in section 13), the credit-control
  340. * request is regarded as failed, and the end user's service session
  341. * is terminated.
  342. *
  343. * This is the default behavior if the AVP isn't included in the
  344. * reply from the authorization or credit-control server.
  345. *
  346. * CONTINUE 1
  347. * When the Credit-Control-Failure-Handling AVP is set to CONTINUE,
  348. * the credit-control client SHOULD re-send the request to an
  349. * alternative server in the case of transport or temporary failures,
  350. * provided that a failover procedure is supported in the credit-
  351. * control server and the credit-control client, and that an
  352. * alternative server is available. Otherwise, the service SHOULD be
  353. * granted, even if credit-control messages can't be delivered.
  354. *
  355. * RETRY_AND_TERMINATE 2
  356. * When the Credit-Control-Failure-Handling AVP is set to
  357. * RETRY_AND_TERMINATE, the credit-control client SHOULD re-send the
  358. * request to an alternative server in the case of transport or
  359. * temporary failures, provided that a failover procedure is
  360. * supported in the credit-control server and the credit-control
  361. * client, and that an alternative server is available. Otherwise,
  362. * the service SHOULD not be granted when the credit-control messages
  363. * can't be delivered.
  364. * </pre>
  365. */
  366. public static final int Credit_Control_Failure_Handling = 427;
  367. /**
  368. * <pre>
  369. * 8.15. Direct-Debiting-Failure-Handling AVP
  370. *
  371. *
  372. * The Direct-Debiting-Failure-Handling AVP (AVP Code 428) is of type
  373. * Enumerated. The credit-control client uses information in this AVP
  374. * to decide what to do if sending credit-control messages (Requested-
  375. * Action AVP set to DIRECT_DEBITING) to the credit-control server has
  376. * been, for instance, temporarily prevented due to a network problem.
  377. *
  378. * TERMINATE_OR_BUFFER 0
  379. * When the Direct-Debiting-Failure-Handling AVP is set to
  380. * TERMINATE_OR_BUFFER, the service MUST be granted for as long as
  381. * there is a connection to the credit-control server. If the
  382. * credit-control client does not receive any Credit-Control-Answer
  383. * message within the Tx timer (as defined in section 13) the
  384. * credit-control request is regarded as failed. The client SHOULD
  385. * terminate the service if it can determine from the failed answer
  386. * that units have not been debited. Otherwise the credit-control
  387. * client SHOULD grant the service, store the request in application
  388. * level non-volatile storage, and try to re-send the request. These
  389. * requests MUST be marked as possible duplicates by setting the T-
  390. * flag in the command header as described in [DIAMBASE] section 3.
  391. *
  392. * This is the default behavior if the AVP isn't included in the
  393. * reply from the authorization server.
  394. *
  395. * CONTINUE 1
  396. * When the Direct-Debiting-Failure-Handling AVP is set to CONTINUE,
  397. * the service SHOULD be granted, even if credit-control messages
  398. * can't be delivered, and the request should be deleted.
  399. * </pre>
  400. */
  401. public static final int Direct_Debiting_Failure_Handling = 428;
  402. /**
  403. * <pre>
  404. * 8.16. Multiple-Services-Credit-Control AVP
  405. *
  406. *
  407. * Multiple-Services-Credit-Control AVP (AVP Code 456) is of type
  408. * Grouped and contains the AVPs related to the independent credit-
  409. * control of multiple services feature. Note that each instance of
  410. * this AVP carries units related to one or more services or related to
  411. * a single rating group.
  412. *
  413. * The Service-Identifier and the Rating-Group AVPs are used to
  414. * associate the granted units to a given service or rating group. If
  415. * both the Service-Identifier and the Rating-Group AVPs are included,
  416. * the target of the service units is always the service(s) indicated by
  417. * the value of the Service-Identifier AVP(s). If only the Rating-
  418. * Group-Id AVP is present, the Multiple-Services-Credit-Control AVP
  419. * relates to all the services that belong to the specified rating
  420. * group.
  421. *
  422. * The G-S-U-Pool-Reference AVP allows the server to specify a G-S-U-
  423. * Pool-Identifier identifying a credit pool within which the units of
  424. * the specified type are considered pooled. If a G-S-U-Pool-Reference
  425. * AVP is present, then actual service units of the specified type MUST
  426. * also be present. For example, if the G-S-U-Pool-Reference AVP
  427. * specifies Unit-Type TIME, then the CC-Time AVP MUST be present.
  428. *
  429. * The Requested-Service-Unit AVP MAY contain the amount of requested
  430. * service units or the requested monetary value. It MUST be present in
  431. * the initial interrogation and within the intermediate interrogations
  432. * in which new quota is requested. If the credit-control client does
  433. * not include the Requested-Service-Unit AVP in a request command,
  434. * because for instance, it has determined that the end-user terminated
  435. * the service, the server MUST debit the used amount from the user's
  436. * account but MUST NOT return a new quota in the corresponding answer.
  437. * The Validity-Time, Result-Code, and Final-Unit-Indication AVPs MAY be
  438. * present in an answer command as defined in sections 5.1.2 and 5.6 for
  439. * the graceful service termination.
  440. *
  441. * When both the Tariff-Time-Change and Tariff-Change-Usage AVPs are
  442. * present, the server MUST include two separate instances of the
  443. * Multiple-Services-Credit-Control AVP with the Granted-Service-Unit
  444. * AVP associated to the same service-identifier and/or rating-group.
  445. * Where the two quotas are associated to the same pool or to different
  446. * pools, the credit pooling mechanism defined in section 5.1.2 applies.
  447. * The Tariff-Change-Usage AVP MUST NOT be included in request commands
  448. * to report used units before, and after tariff time change the Used-
  449. * Service-Unit AVP MUST be used.
  450. *
  451. * A server not implementing the independent credit-control of multiple
  452. * services functionality MUST treat the Multiple-Services-Credit-
  453. * Control AVP as an invalid AVP.
  454. *
  455. * The Multiple-Services-Control AVP is defined as follows (per the
  456. * grouped-avp-def of RFC 3588 [DIAMBASE]):
  457. *
  458. * Multiple-Services-Credit-Control ::= &lt; AVP Header: 456 &gt;
  459. * [ Granted-Service-Unit ]
  460. * [ Requested-Service-Unit ]
  461. * Used-Service-Unit ]
  462. * [ Tariff-Change-Usage ]
  463. * Service-Identifier ]
  464. * [ Rating-Group ]
  465. * G-S-U-Pool-Reference ]
  466. * [ Validity-Time ]
  467. * [ Result-Code ]
  468. * [ Final-Unit-Indication ]
  469. * AVP ]
  470. * </pre>
  471. */
  472. public static final int Multiple_Services_Credit_Control = 456;
  473. /**
  474. * <pre>
  475. * 8.17. Granted-Service-Unit AVP
  476. *
  477. *
  478. * Granted-Service-Unit AVP (AVP Code 431) is of type Grouped and
  479. * contains the amount of units that the Diameter credit-control client
  480. * can provide to the end user until the service must be released or the
  481. * new Credit-Control-Request must be sent. A client is not required to
  482. * implement all the unit types, and it must treat unknown or
  483. * unsupported unit types in the answer message as an incorrect CCA
  484. * answer. In this case, the client MUST terminate the credit-control
  485. * session and indicate in the Termination-Cause AVP reason
  486. * DIAMETER_BAD_ANSWER.
  487. *
  488. *
  489. * The Granted-Service-Unit AVP is defined as follows (per the grouped-
  490. * avp-def of RFC 3588 [DIAMBASE]):
  491. *
  492. * Granted-Service-Unit ::= &lt; AVP Header: 431 &gt;
  493. * [ Tariff-Time-Change ]
  494. * [ CC-Time ]
  495. * [ CC-Money ]
  496. * [ CC-Total-Octets ]
  497. * [ CC-Input-Octets ]
  498. * [ CC-Output-Octets ]
  499. * [ CC-Service-Specific-Units ]
  500. * AVP ]
  501. * </pre>
  502. */
  503. public static final int Granted_Service_Unit = 431;
  504. /**
  505. * <pre>
  506. * 8.18. Requested-Service-Unit AVP
  507. *
  508. *
  509. * The Requested-Service-Unit AVP (AVP Code 437) is of type Grouped and
  510. * contains the amount of requested units specified by the Diameter
  511. * credit-control client. A server is not required to implement all the
  512. * unit types, and it must treat unknown or unsupported unit types as
  513. * invalid AVPs.
  514. *
  515. * The Requested-Service-Unit AVP is defined as follows (per the
  516. * grouped-avp-def of RFC 3588 [DIAMBASE]):
  517. *
  518. * Requested-Service-Unit ::= &lt; AVP Header: 437 &gt;
  519. * [ CC-Time ]
  520. * [ CC-Money ]
  521. * [ CC-Total-Octets ]
  522. * [ CC-Input-Octets ]
  523. * [ CC-Output-Octets ]
  524. * [ CC-Service-Specific-Units ]
  525. * AVP ]
  526. * </pre>
  527. */
  528. public static final int Requested_Service_Unit = 437;
  529. /**
  530. * <pre>
  531. * 8.19. Used-Service-Unit AVP
  532. *
  533. *
  534. * The Used-Service-Unit AVP is of type Grouped (AVP Code 446) and
  535. * contains the amount of used units measured from the point when the
  536. * service became active or, if interim interrogations are used during
  537. * the session, from the point when the previous measurement ended.
  538. *
  539. * The Used-Service-Unit AVP is defined as follows (per the grouped-
  540. * avp-def of RFC 3588 [DIAMBASE]):
  541. *
  542. * Used-Service-Unit ::= &lt; AVP Header: 446 &gt;
  543. * [ Tariff-Change-Usage ]
  544. * [ CC-Time ]
  545. * [ CC-Money ]
  546. * [ CC-Total-Octets ]
  547. * [ CC-Input-Octets ]
  548. * [ CC-Output-Octets ]
  549. * [ CC-Service-Specific-Units ]
  550. * AVP ]
  551. * </pre>
  552. */
  553. public static final int Used_Service_Unit = 446;
  554. /**
  555. * <pre>
  556. * 8.20. Tariff-Time-Change AVP
  557. *
  558. *
  559. * The Tariff-Time-Change AVP (AVP Code 451) is of type Time. It is
  560. * sent from the server to the client and includes the time in seconds
  561. * since January 1, 1900, 00:00 UTC, when the tariff of the service will
  562. * be changed.
  563. *
  564. * The tariff change mechanism is optional for the client and server,
  565. * and it is not used for time-based services defined in section 5. If
  566. * a client does not support the tariff time change mechanism, it MUST
  567. * treat Tariff-Time-Change AVP in the answer message as an incorrect
  568. * CCA answer. In this case, the client terminates the credit-control
  569. * session and indicates in the Termination-Cause AVP reason
  570. * DIAMETER_BAD_ANSWER.
  571. *
  572. * Omission of this AVP means that no tariff change is to be reported.
  573. * </pre>
  574. */
  575. public static final int Tariff_Time_Change = 451;
  576. /**
  577. * <pre>
  578. * 8.21. CC-Time AVP
  579. *
  580. *
  581. * The CC-Time AVP (AVP Code 420) is of type Unsigned32 and indicates
  582. * the length of the requested, granted, or used time in seconds.
  583. * </pre>
  584. */
  585. public static final int CC_Time = 420;
  586. /**
  587. * <pre>
  588. * 8.22. CC-Money AVP
  589. *
  590. *
  591. * The CC-Money AVP (AVP Code 413) is of type Grouped and specifies the
  592. * monetary amount in the given currency. The Currency-Code AVP SHOULD
  593. * be included. It is defined as follows (per the grouped-avp-def of
  594. * RFC 3588 [DIAMBASE]):
  595. *
  596. * CC-Money ::= &lt; AVP Header: 413 &gt;
  597. * { Unit-Value }
  598. * [ Currency-Code ]
  599. * </pre>
  600. */
  601. public static final int CC_Money = 413;
  602. /**
  603. * <pre>
  604. * 8.23. CC-Total-Octets AVP
  605. *
  606. *
  607. * The CC-Total-Octets AVP (AVP Code 421) is of type Unsigned64 and
  608. * contains the total number of requested, granted, or used octets
  609. * regardless of the direction (sent or received).
  610. * </pre>
  611. */
  612. public static final int CC_Total_Octets = 421;
  613. /**
  614. * <pre>
  615. * 8.24. CC-Input-Octets AVP
  616. *
  617. *
  618. * The CC-Input-Octets AVP (AVP Code 412) is of type Unsigned64 and
  619. * contains the number of requested, granted, or used octets that can
  620. * be/have been received from the end user.
  621. * </pre>
  622. */
  623. public static final int CC_Input_Octets = 412;
  624. /**
  625. * <pre>
  626. * 8.25. CC-Output-Octets AVP
  627. *
  628. *
  629. * The CC-Output-Octets AVP (AVP Code 414) is of type Unsigned64 and
  630. * contains the number of requested, granted, or used octets that can
  631. * be/have been sent to the end user.
  632. * </pre>
  633. */
  634. public static final int CC_Output_Octets = 414;
  635. /**
  636. * <pre>
  637. * 8.26. CC-Service-Specific-Units AVP
  638. *
  639. *
  640. * The CC-Service-Specific-Units AVP (AVP Code 417) is of type
  641. * Unsigned64 and specifies the number of service-specific units (e.g.,
  642. * number of events, points) given in a selected service. The service-
  643. * specific units always refer to the service identified in the
  644. * Service-Identifier AVP (or Rating-Group AVP when the Multiple-
  645. * Services-Credit-Control AVP is used).
  646. * </pre>
  647. */
  648. public static final int CC_Service_Specific_Units = 417;
  649. /**
  650. * <pre>
  651. * 8.27. Tariff-Change-Usage AVP
  652. *
  653. *
  654. * The Tariff-Change-Usage AVP (AVP Code 452) is of type Enumerated and
  655. * defines whether units are used before or after a tariff change, or
  656. * whether the units straddled a tariff change during the reporting
  657. * period. Omission of this AVP means that no tariff change has
  658. * occurred.
  659. *
  660. * In addition, when present in answer messages as part of the
  661. * Multiple-Services-Credit-Control AVP, this AVP defines whether units
  662. * are allocated to be used before or after a tariff change event.
  663. *
  664. * When the Tariff-Time-Change AVP is present, omission of this AVP in
  665. * answer messages means that the single quota mechanism applies.
  666. *
  667. * Tariff-Change-Usage can be one of the following:
  668. *
  669. * UNIT_BEFORE_TARIFF_CHANGE 0
  670. * When present in the Multiple-Services-Credit-Control AVP, this
  671. * value indicates the amount of the units allocated for use before a
  672. * tariff change occurs.
  673. *
  674. * When present in the Used-Service-Unit AVP, this value indicates
  675. * the amount of resource units used before a tariff change had
  676. * occurred.
  677. *
  678. * UNIT_AFTER_TARIFF_CHANGE 1
  679. * When present in the Multiple-Services-Credit-Control AVP, this
  680. * value indicates the amount of the units allocated for use after a
  681. * tariff change occurs.
  682. *
  683. * When present in the Used-Service-Unit AVP, this value indicates
  684. * the amount of resource units used after tariff change had
  685. * occurred.
  686. *
  687. * UNIT_INDETERMINATE 2
  688. * The used unit contains the amount of units that straddle the
  689. * tariff change (e.g., the metering process reports to the credit-
  690. * control client in blocks of n octets, and one block straddled the
  691. * tariff change). This value is to be used only in the Used-
  692. * Service-Unit AVP.
  693. * </pre>
  694. */
  695. public static final int Tariff_Change_Usage = 452;
  696. /**
  697. * <pre>
  698. * 8.28. Service-Identifier AVP
  699. *
  700. *
  701. * The Service-Identifier AVP is of type Unsigned32 (AVP Code 439) and
  702. * contains the identifier of a service. The specific service the
  703. * request relates to is uniquely identified by the combination of
  704. * Service-Context-Id and Service-Identifier AVPs.
  705. *
  706. * A usage example of this AVP is illustrated in Appendix A (Flow IX).
  707. * </pre>
  708. */
  709. public static final int Service_Identifier = 439;
  710. /**
  711. * <pre>
  712. * 8.29. Rating-Group AVP
  713. *
  714. *
  715. * The Rating-Group AVP is of type Unsigned32 (AVP Code 432) and
  716. * contains the identifier of a rating group. All the services subject
  717. * to the same rating type are part of the same rating group. The
  718. * specific rating group the request relates to is uniquely identified
  719. * by the combination of Service-Context-Id and Rating-Group AVPs.
  720. *
  721. * A usage example of this AVP is illustrated in Appendix A (Flow IX).
  722. * </pre>
  723. */
  724. public static final int Rating_Group = 432;
  725. /**
  726. * <pre>
  727. * 8.30. G-S-U-Pool-Reference AVP
  728. *
  729. *
  730. * The G-S-U-Pool-Reference AVP (AVP Code 457) is of type Grouped. It
  731. * is used in the Credit-Control-Answer message, and associates the
  732. * Granted-Service-Unit AVP within which it appears with a credit pool
  733. * within the session.
  734. *
  735. * The G-S-U-Pool-Identifier AVP specifies the credit pool from which
  736. * credit is drawn for this unit type.
  737. *
  738. *
  739. * The CC-Unit-Type AVP specifies the type of units for which credit is
  740. * pooled.
  741. *
  742. * The Unit-Value AVP specifies the multiplier, which converts between
  743. * service units of type CC-Unit-Type and abstract service units within
  744. * the credit pool (and thus to service units of any other service or
  745. * rating group associated with the same pool).
  746. *
  747. * The G-S-U-Pool-Reference AVP is defined as follows (per the grouped-
  748. * avp-def of RFC 3588 [DIAMBASE]):
  749. *
  750. * G-S-U-Pool-Reference ::= &lt; AVP Header: 457 &gt;
  751. * { G-S-U-Pool-Identifier }
  752. * { CC-Unit-Type }
  753. * { Unit-Value }
  754. * </pre>
  755. */
  756. public static final int G_S_U_Pool_Reference = 457;
  757. /**
  758. * <pre>
  759. * 8.31. G-S-U-Pool-Identifier AVP
  760. *
  761. *
  762. * The G-S-U-Pool-Identifier AVP (AVP Code 453) is of type Unsigned32
  763. * and identifies a credit pool within the session.
  764. * </pre>
  765. */
  766. public static final int G_S_U_Pool_Identifier = 453;
  767. /**
  768. * <pre>
  769. * 8.32. CC-Unit-Type AVP
  770. *
  771. *
  772. * The CC-Unit-Type AVP (AVP Code 454) is of type Enumerated and
  773. * specifies the type of units considered to be pooled into a credit
  774. * pool.
  775. *
  776. * The following values are defined for the CC-Unit-Type AVP:
  777. *
  778. * TIME 0
  779. * MONEY 1
  780. * TOTAL-OCTETS 2
  781. * INPUT-OCTETS 3
  782. * OUTPUT-OCTETS 4
  783. * SERVICE-SPECIFIC-UNITS 5
  784. * </pre>
  785. */
  786. public static final int CC_Unit_Type = 454;
  787. /**
  788. * <pre>
  789. * 8.33. Validity-Time AVP
  790. *
  791. *
  792. * The Validity-Time AVP is of type Unsigned32 (AVP Code 448). It is
  793. * sent from the credit-control server to the credit-control client.
  794. * The AVP contains the validity time of the granted service units. The
  795. * measurement of the Validity-Time is started upon receipt of the
  796. * Credit-Control-Answer Message containing this AVP. If the granted
  797. * service units have not been consumed within the validity time
  798. * specified in this AVP, the credit-control client MUST send a Credit-
  799. * Control-Request message to the server, with CC-Request-Type set to
  800. * UPDATE_REQUEST. The value field of the Validity-Time AVP is given in
  801. * seconds.
  802. *
  803. * The Validity-Time AVP is also used for the graceful service
  804. * termination (see section 5.6) to indicate to the credit-control
  805. * client how long the subscriber is allowed to use network resources
  806. * after the specified action (i.e., REDIRECT or RESTRICT_ACCESS)
  807. * started. When the Validity-Time elapses, a new intermediate
  808. * interrogation is sent to the server.
  809. * </pre>
  810. */
  811. public static final int Validity_Time = 448;
  812. /**
  813. * <pre>
  814. * 8.34. Final-Unit-Indication AVP
  815. *
  816. *
  817. * The Final-Unit-Indication AVP (AVP Code 430) is of type Grouped and
  818. * indicates that the Granted-Service-Unit AVP in the Credit-Control-
  819. * Answer, or in the AA answer, contains the final units for the
  820. * service. After these units have expired, the Diameter credit-control
  821. * client is responsible for executing the action indicated in the
  822. * Final-Unit-Action AVP (see section 5.6).
  823. *
  824. * If more than one unit type is received in the Credit-Control-Answer,
  825. * the unit type that first expired SHOULD cause the credit-control
  826. * client to execute the specified action.
  827. *
  828. * In the first interrogation, the Final-Unit-Indication AVP with
  829. * Final-Unit-Action REDIRECT or RESTRICT_ACCESS can also be present
  830. * with no Granted-Service-Unit AVP in the Credit-Control-Answer or in
  831. * the AA answer. This indicates to the Diameter credit-control client
  832. * to execute the specified action immediately. If the home service
  833. * provider policy is to terminate the service, naturally, the server
  834. * SHOULD return the appropriate transient failure (see section 9.1) in
  835. * order to implement the policy-defined action.
  836. *
  837. * The Final-Unit-Action AVP defines the behavior of the service element
  838. * when the user's account cannot cover the cost of the service and MUST
  839. * always be present if the Final-Unit-Indication AVP is included in a
  840. * command.
  841. *
  842. * If the Final-Unit-Action AVP is set to TERMINATE, no other AVPs MUST
  843. * be present.
  844. *
  845. * If the Final-Unit-Action AVP is set to REDIRECT at least the
  846. * Redirect-Server AVP MUST be present. The Restriction-Filter-Rule AVP
  847. * or the Filter-Id AVP MAY be present in the Credit-Control-Answer
  848. * message if the user is also allowed to access other services that are
  849. * not accessible through the address given in the Redirect-Server AVP.
  850. *
  851. * If the Final-Unit-Action AVP is set to RESTRICT_ACCESS, either the
  852. * Restriction-Filter-Rule AVP or the Filter-Id AVP SHOULD be present.
  853. *
  854. * The Filter-Id AVP is defined in [NASREQ]. The Filter-Id AVP can be
  855. * used to reference an IP filter list installed in the access device by
  856. * means other than the Diameter credit-control application, e.g.,
  857. * locally configured or configured by another entity.
  858. *
  859. * The Final-Unit-Indication AVP is defined as follows (per the
  860. * grouped-avp-def of RFC 3588 [DIAMBASE]):
  861. *
  862. * Final-Unit-Indication ::= &lt; AVP Header: 430 &gt;
  863. * { Final-Unit-Action }
  864. * Restriction-Filter-Rule ]
  865. * Filter-Id ]
  866. * [ Redirect-Server ]
  867. * </pre>
  868. */
  869. public static final int Final_Unit_Indication = 430;
  870. /**
  871. * <pre>
  872. * 8.35. Final-Unit-Action AVP
  873. *
  874. *
  875. * The Final-Unit-Action AVP (AVP Code 449) is of type Enumerated and
  876. * indicates to the credit-control client the action to be taken when
  877. * the user's account cannot cover the service cost.
  878. *
  879. * The Final-Unit-Action can be one of the following:
  880. *
  881. * TERMINATE 0
  882. * The credit-control client MUST terminate the service session.
  883. * This is the default handling, applicable whenever the credit-
  884. * control client receives an unsupported Final-Unit-Action value,
  885. * and it MUST be supported by all the Diameter credit-control client
  886. * implementations conforming to this specification.
  887. *
  888. * REDIRECT 1
  889. * The service element MUST redirect the user to the address
  890. * specified in the Redirect-Server-Address AVP. The redirect action
  891. * is defined in section 5.6.2.
  892. *
  893. * RESTRICT_ACCESS 2
  894. * The access device MUST restrict the user access according to the
  895. * IP packet filters defined in the Restriction-Filter-Rule AVP or
  896. * according to the IP packet filters identified by the Filter-Id
  897. * AVP. All the packets not matching the filters MUST be dropped
  898. * (see section 5.6.3).
  899. * </pre>
  900. */
  901. public static final int Final_Unit_Action = 449;
  902. /**
  903. * <pre>
  904. * 8.36. Restriction-Filter-Rule AVP
  905. *
  906. *
  907. * The Restriction-Filter-Rule AVP (AVP Code 438) is of type
  908. * IPFilterRule and provides filter rules corresponding to services that
  909. * are to remain accessible even if there are no more service units
  910. * granted. The access device has to configure the specified filter
  911. * rules for the subscriber and MUST drop all the packets not matching
  912. * these filters. Zero, one, or more such AVPs MAY be present in a
  913. * Credit-Control-Answer message or in an AA answer message.
  914. * </pre>
  915. */
  916. public static final int Restriction_Filter_Rule = 438;
  917. /**
  918. * <pre>
  919. * 8.37. Redirect-Server AVP
  920. *
  921. *
  922. * The Redirect-Server AVP (AVP Code 434) is of type Grouped and
  923. * contains the address information of the redirect server (e.g., HTTP
  924. * redirect server, SIP Server) with which the end user is to be
  925. * connected when the account cannot cover the service cost. It MUST be
  926. * present when the Final-Unit-Action AVP is set to REDIRECT.
  927. *
  928. * It is defined as follows (per the grouped-avp-def of RFC 3588
  929. * [DIAMBASE]):
  930. *
  931. * Redirect-Server ::= &lt; AVP Header: 434 &gt;
  932. * { Redirect-Address-Type }
  933. * { Redirect-Server-Address }
  934. * </pre>
  935. */
  936. public static final int Redirect_Server = 434;
  937. /**
  938. * <pre>
  939. * 8.38. Redirect-Address-Type AVP
  940. *
  941. *
  942. * The Redirect-Address-Type AVP (AVP Code 433) is of type Enumerated
  943. * and defines the address type of the address given in the Redirect-
  944. * Server-Address AVP.
  945. *
  946. * The address type can be one of the following:
  947. *
  948. * IPv4 Address 0
  949. * The address type is in the form of &quot;dotted-decimal&quot; IPv4 address,
  950. * as defined in [IPv4].
  951. *
  952. * IPv6 Address 1
  953. * The address type is in the form of IPv6 address, as defined in
  954. * [IPv6Addr]. The address is a text representation of the address
  955. * in either the preferred or alternate text form [IPv6Addr].
  956. * Conformant implementations MUST support the preferred form and
  957. * SHOULD support the alternate text form for IPv6 addresses.
  958. *
  959. * URL 2
  960. * The address type is in the form of Uniform Resource Locator, as
  961. * defined in [URL].
  962. *
  963. * SIP URI 3
  964. * The address type is in the form of SIP Uniform Resource
  965. * Identifier, as defined in [SIP].
  966. * </pre>
  967. */
  968. public static final int Redirect_Address_Type = 433;
  969. /**
  970. * <pre>
  971. * 8.39. Redirect-Server-Address AVP
  972. *
  973. *
  974. * The Redirect-Server-Address AVP (AVP Code 435) is of type UTF8String
  975. * and defines the address of the redirect server (e.g., HTTP redirect
  976. * server, SIP Server) with which the end user is to be connected when
  977. * the account cannot cover the service cost.
  978. * </pre>
  979. */
  980. public static final int Redirect_Server_Address = 435;
  981. /**
  982. * <pre>
  983. * 8.40. Multiple-Services-Indicator AVP
  984. *
  985. *
  986. * The Multiple-Services-Indicator AVP (AVP Code 455) is of type
  987. * Enumerated and indicates whether the Diameter credit-control client
  988. * is capable of handling multiple services independently within a
  989. * (sub-) session. The absence of this AVP means that independent
  990. * credit-control of multiple services is not supported.
  991. *
  992. * A server not implementing the independent credit-control of multiple
  993. * services MUST treat the Multiple-Services-Indicator AVP as an invalid
  994. * AVP.
  995. *
  996. * The following values are defined for the Multiple-Services-Indicator
  997. * AVP:
  998. *
  999. * MULTIPLE_SERVICES_NOT_SUPPORTED 0
  1000. * Client does not support independent credit-control of multiple
  1001. * services within a (sub-)session.
  1002. *
  1003. * MULTIPLE_SERVICES_SUPPORTED 1
  1004. * Client supports independent credit-control of multiple services
  1005. * within a (sub-)session.
  1006. * </pre>
  1007. */
  1008. public static final int Multiple_Services_Indicator = 455;
  1009. /**
  1010. * <pre>
  1011. * 8.41. Requested-Action AVP
  1012. *
  1013. *
  1014. * The Requested-Action AVP (AVP Code 436) is of type Enumerated and
  1015. * contains the requested action being sent by Credit-Control-Request
  1016. * command where the CC-Request-Type is set to EVENT_REQUEST. The
  1017. * following values are defined for the Requested-Action AVP:
  1018. *
  1019. * DIRECT_DEBITING 0
  1020. * This indicates a request to decrease the end user's account
  1021. * according to information specified in the Requested-Service-Unit
  1022. * AVP and/or Service-Identifier AVP (additional rating information
  1023. * may be included in service-specific AVPs or in the Service-
  1024. * Parameter-Info AVP). The Granted-Service-Unit AVP in the Credit-
  1025. * Control-Answer command contains the debited units.
  1026. *
  1027. * REFUND_ACCOUNT 1
  1028. * This indicates a request to increase the end user's account
  1029. * according to information specified in the Requested-Service-Unit
  1030. * AVP and/or Service-Identifier AVP (additional rating information
  1031. * may be included in service-specific AVPs or in the Service-
  1032. * Parameter-Info AVP). The Granted-Service-Unit AVP in the Credit-
  1033. * Control-Answer command contains the refunded units.
  1034. *
  1035. * CHECK_BALANCE 2
  1036. * This indicates a balance check request. In this case, the
  1037. * checking of the account balance is done without any credit
  1038. * reservation from the account. The Check-Balance-Result AVP in the
  1039. * Credit-Control-Answer command contains the result of the balance
  1040. * check.
  1041. *
  1042. * PRICE_ENQUIRY 3
  1043. * This indicates a price enquiry request. In this case, neither
  1044. * checking of the account balance nor reservation from the account
  1045. * will be done; only the price of the service will be returned in
  1046. * the Cost-Information AVP in the Credit-Control-Answer Command.
  1047. * </pre>
  1048. */
  1049. public static final int Requested_Action = 436;
  1050. /**
  1051. * <pre>
  1052. * 8.42. Service-Context-Id AVP
  1053. *
  1054. *
  1055. * The Service-Context-Id AVP is of type UTF8String (AVP Code 461) and
  1056. * contains a unique identifier of the Diameter credit-control service
  1057. * specific document that applies to the request (as defined in section
  1058. * 4.1.2). This is an identifier allocated by the service provider, by
  1059. * the service element manufacturer, or by a standardization body, and
  1060. * MUST uniquely identify a given Diameter credit-control service
  1061. * specific document. The format of the Service-Context-Id is:
  1062. *
  1063. * &quot;service-context&quot; &quot;@&quot; &quot;domain&quot;
  1064. *
  1065. * service-context = Token
  1066. *
  1067. * The Token is an arbitrary string of characters and digits.
  1068. *
  1069. * 'domain' represents the entity that allocated the Service-Context-Id.
  1070. * It can be ietf.org, 3gpp.org, etc., if the identifier is allocated by
  1071. * a standardization body, or it can be the FQDN of the service provider
  1072. * (e.g., provider.example.com) or of the vendor (e.g.,
  1073. * vendor.example.com) if the identifier is allocated by a private
  1074. * entity.
  1075. *
  1076. * This AVP SHOULD be placed as close to the Diameter header as
  1077. * possible.
  1078. *
  1079. * Service-specific documents that are for private use only (i.e., to
  1080. * one provider's own use, where no interoperability is deemed useful)
  1081. * may define private identifiers without need of coordination.
  1082. * However, when interoperability is wanted, coordination of the
  1083. * identifiers via, for example, publication of an informational RFC is
  1084. * RECOMMENDED in order to make Service-Context-Id globally available.
  1085. * </pre>
  1086. */
  1087. public static final int Service_Context_Id = 461;
  1088. /**
  1089. * <pre>
  1090. * 8.43. Service-Parameter-Info AVP
  1091. *
  1092. *
  1093. * The Service-Parameter-Info AVP (AVP Code 440) is of type Grouped and
  1094. * contains service-specific information used for price calculation or
  1095. * rating. The Service-Parameter-Type AVP defines the service parameter
  1096. * type, and t…

Large files files are truncated, but you can click here to view the full file