Browse Source

Merge branch 'tmp/ims_charging' of ssh://git.sip-router.org/sip-router into ims_charging

Conflicts:
	modules/ims_charging/README
	modules/ims_charging/doc/ims_charging.xml
	modules/ims_charging/doc/ims_charging_admin.xml
	modules/ims_charging/mod.c
Carsten Bock 12 years ago
parent
commit
f96c7f5a44

+ 264 - 216
modules/ims_charging/README

@@ -5,13 +5,16 @@ Jason Penton
    Smile Communications
    Smile Communications
    <[email protected]>
    <[email protected]>
 
 
-Edited by
-
 Carsten Bock
 Carsten Bock
 
 
    ng-voice GmbH
    ng-voice GmbH
    <[email protected]>
    <[email protected]>
 
 
+Carlos Ruiz Diaz
+
+   ng-voice GmbH
+   <[email protected]>
+
    Copyright © 2013 Smile Communications
    Copyright © 2013 Smile Communications
 
 
    Copyright © 2013 ng-voice GmbH
    Copyright © 2013 ng-voice GmbH
@@ -35,24 +38,24 @@ Carsten Bock
 
 
         4. Parameters
         4. Parameters
 
 
-              4.1. hash_size (int)
-              4.2. interim_update_credits (int)
-              4.3. timer_buffer (int)
-              4.4. ro_forced_peer (string)
-              4.5. ro_auth_expiry (integer)
-              4.6. ro_auth_expiry (integer)
-              4.7. cdp_event_latency (integer)
-              4.8. cdp_event_threshold (integer)
-              4.9. cdp_event_latency_log (integer)
-              4.10. origin_host (string)
-              4.11. origin_realm (string)
-              4.12. destination_host (string)
-              4.13. destination_realm (string)
-              4.14. service_context_id_root (string)
-              4.15. service_context_id_ext (string)
-              4.16. service_context_id_mnc (string)
-              4.17. service_context_id_mcc (string)
-              4.18. service_context_id_release (string)
+              4.1. hash_size(int)
+              4.2. interim_update_credits(int)
+              4.3. timer_buffer(int)
+              4.4. ro_forced_peer(string)
+              4.5. ro_auth_expiry(integer)
+              4.6. ro_auth_expiry(integer)
+              4.7. cdp_event_latency(integer)
+              4.8. cdp_event_threshold(integer)
+              4.9. cdp_event_latency_log(integer)
+              4.10. origin_host(string)
+              4.11. origin_realm(string)
+              4.12. destination_host(string)
+              4.13. destination_realm(string)
+              4.14. service_context_id_root(string)
+              4.15. service_context_id_ext(string)
+              4.16. service_context_id_mnc(string)
+              4.17. service_context_id_mcc(string)
+              4.18. service_context_id_release(string)
 
 
         5. Functions
         5. Functions
 
 
@@ -61,29 +64,40 @@ Carsten Bock
 
 
         6. Statistics
         6. Statistics
 
 
-              6.1. CCR Timeouts (ccr_timeouts)
-              6.2. Average CCR Response Time (ccr_avg_response_time)
+              6.1. Initial CCRs (initial_ccrs)
+              6.2. Interim CCRs (interim_ccrs)
+              6.3. Final CCRs (final_ccrs)
+              6.4. Sucessful initial CCRs (successful_initial_ccrs)
+              6.5. Sucessful interim CCRs (successful_interim_ccrs)
+              6.6. Sucessful final CCRs (successful_final_ccrs)
+              6.7. Failed initial CCRs (failed_initial_ccrs)
+              6.8. Failed interim CCRs (failed_interim_ccrs)
+              6.9. Failed final CCRs (failed_final_ccrs)
+              6.10. CCRs average response time (ccr_avg_response_time)
+              6.11. CCRs responses time (ccr_responses_time)
+              6.12. Billed seconds (billed_secs)
+              6.13. Killed calls (killed_calls)
 
 
    List of Examples
    List of Examples
 
 
-   1.1. hash_size parameter usage
-   1.2. interim_update_credits parameter usage
-   1.3. timer_buffer parameter usage
-   1.4. ro_forced_peer parameter usage
-   1.5. ro_auth_expiry parameter usage
-   1.6. ro_auth_expiry parameter usage
-   1.7. cdp_event_latency parameter usage
-   1.8. cdp_event_threshold parameter usage
-   1.9. cdp_event_latency_log parameter usage
-   1.10. origin_host parameter usage
-   1.11. origin_realm parameter usage
-   1.12. destination_host parameter usage
-   1.13. destination_realm parameter usage
-   1.14. service_context_id_root parameter usage
-   1.15. service_context_id_ext parameter usage
-   1.16. service_context_id_mnc parameter usage
-   1.17. service_context_id_mcc parameter usage
-   1.18. service_context_id_release parameter usage
+   1.1. hash_sizeparameter usage
+   1.2. interim_update_creditsparameter usage
+   1.3. timer_bufferparameter usage
+   1.4. ro_forced_peerparameter usage
+   1.5. ro_auth_expiryparameter usage
+   1.6. ro_auth_expiryparameter usage
+   1.7. cdp_event_latencyparameter usage
+   1.8. cdp_event_thresholdparameter usage
+   1.9. cdp_event_latency_logparameter usage
+   1.10. origin_hostparameter usage
+   1.11. origin_realmparameter usage
+   1.12. destination_hostparameter usage
+   1.13. destination_realmparameter usage
+   1.14. service_context_id_rootparameter usage
+   1.15. service_context_id_extparameter usage
+   1.16. service_context_id_mncparameter usage
+   1.17. service_context_id_mccparameter usage
+   1.18. service_context_id_releaseparameter usage
    1.19. Ro_CCR
    1.19. Ro_CCR
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
@@ -104,24 +118,24 @@ Chapter 1. Admin Guide
 
 
    4. Parameters
    4. Parameters
 
 
-        4.1. hash_size (int)
-        4.2. interim_update_credits (int)
-        4.3. timer_buffer (int)
-        4.4. ro_forced_peer (string)
-        4.5. ro_auth_expiry (integer)
-        4.6. ro_auth_expiry (integer)
-        4.7. cdp_event_latency (integer)
-        4.8. cdp_event_threshold (integer)
-        4.9. cdp_event_latency_log (integer)
-        4.10. origin_host (string)
-        4.11. origin_realm (string)
-        4.12. destination_host (string)
-        4.13. destination_realm (string)
-        4.14. service_context_id_root (string)
-        4.15. service_context_id_ext (string)
-        4.16. service_context_id_mnc (string)
-        4.17. service_context_id_mcc (string)
-        4.18. service_context_id_release (string)
+        4.1. hash_size(int)
+        4.2. interim_update_credits(int)
+        4.3. timer_buffer(int)
+        4.4. ro_forced_peer(string)
+        4.5. ro_auth_expiry(integer)
+        4.6. ro_auth_expiry(integer)
+        4.7. cdp_event_latency(integer)
+        4.8. cdp_event_threshold(integer)
+        4.9. cdp_event_latency_log(integer)
+        4.10. origin_host(string)
+        4.11. origin_realm(string)
+        4.12. destination_host(string)
+        4.13. destination_realm(string)
+        4.14. service_context_id_root(string)
+        4.15. service_context_id_ext(string)
+        4.16. service_context_id_mnc(string)
+        4.17. service_context_id_mcc(string)
+        4.18. service_context_id_release(string)
 
 
    5. Functions
    5. Functions
 
 
@@ -130,8 +144,19 @@ Chapter 1. Admin Guide
 
 
    6. Statistics
    6. Statistics
 
 
-        6.1. CCR Timeouts (ccr_timeouts)
-        6.2. Average CCR Response Time (ccr_avg_response_time)
+        6.1. Initial CCRs (initial_ccrs)
+        6.2. Interim CCRs (interim_ccrs)
+        6.3. Final CCRs (final_ccrs)
+        6.4. Sucessful initial CCRs (successful_initial_ccrs)
+        6.5. Sucessful interim CCRs (successful_interim_ccrs)
+        6.6. Sucessful final CCRs (successful_final_ccrs)
+        6.7. Failed initial CCRs (failed_initial_ccrs)
+        6.8. Failed interim CCRs (failed_interim_ccrs)
+        6.9. Failed final CCRs (failed_final_ccrs)
+        6.10. CCRs average response time (ccr_avg_response_time)
+        6.11. CCRs responses time (ccr_responses_time)
+        6.12. Billed seconds (billed_secs)
+        6.13. Killed calls (killed_calls)
 
 
 1. Overview
 1. Overview
 
 
@@ -151,7 +176,7 @@ Chapter 1. Admin Guide
 2.1. Kamailio Modules
 2.1. Kamailio Modules
 
 
    The Following mouldes must be loaded before this module:
    The Following mouldes must be loaded before this module:
-     * Dialog2
+     * Dialog_ng
      * TM - Transaction Manager
      * TM - Transaction Manager
      * CDP - C Diameter Peer
      * CDP - C Diameter Peer
      * CDP_AVP - CDP AVP Applications
      * CDP_AVP - CDP AVP Applications
@@ -282,26 +307,26 @@ Chapter 1. Admin Guide
 
 
 4. Parameters
 4. Parameters
 
 
-   4.1. hash_size (int)
-   4.2. interim_update_credits (int)
-   4.3. timer_buffer (int)
-   4.4. ro_forced_peer (string)
-   4.5. ro_auth_expiry (integer)
-   4.6. ro_auth_expiry (integer)
-   4.7. cdp_event_latency (integer)
-   4.8. cdp_event_threshold (integer)
-   4.9. cdp_event_latency_log (integer)
-   4.10. origin_host (string)
-   4.11. origin_realm (string)
-   4.12. destination_host (string)
-   4.13. destination_realm (string)
-   4.14. service_context_id_root (string)
-   4.15. service_context_id_ext (string)
-   4.16. service_context_id_mnc (string)
-   4.17. service_context_id_mcc (string)
-   4.18. service_context_id_release (string)
-
-4.1.  hash_size (int)
+   4.1. hash_size(int)
+   4.2. interim_update_credits(int)
+   4.3. timer_buffer(int)
+   4.4. ro_forced_peer(string)
+   4.5. ro_auth_expiry(integer)
+   4.6. ro_auth_expiry(integer)
+   4.7. cdp_event_latency(integer)
+   4.8. cdp_event_threshold(integer)
+   4.9. cdp_event_latency_log(integer)
+   4.10. origin_host(string)
+   4.11. origin_realm(string)
+   4.12. destination_host(string)
+   4.13. destination_realm(string)
+   4.14. service_context_id_root(string)
+   4.15. service_context_id_ext(string)
+   4.16. service_context_id_mnc(string)
+   4.17. service_context_id_mcc(string)
+   4.18. service_context_id_release(string)
+
+4.1.  hash_size(int)
 
 
    The size of the hash table internally used to keep the
    The size of the hash table internally used to keep the
    Diameter-Ro-Session. A larger table is much faster but consumes more
    Diameter-Ro-Session. A larger table is much faster but consumes more
@@ -314,12 +339,11 @@ Chapter 1. Admin Guide
 
 
    Default value is 4096.
    Default value is 4096.
 
 
-   Example 1.1.  hash_size parameter usage
-...
-modparam("ims_charging", "hash_size", 1024)
-...
+   Example 1.1.  hash_sizeparameter usage
+... modparam("ims_charging", "hash_size", 1024)
+        ...
 
 
-4.2.  interim_update_credits (int)
+4.2.  interim_update_credits(int)
 
 
    How much credit should be requested interim request? At the start of
    How much credit should be requested interim request? At the start of
    the call, we request the amout of seconds as per Command. For each
    the call, we request the amout of seconds as per Command. For each
@@ -327,72 +351,66 @@ modparam("ims_charging", "hash_size", 1024)
 
 
    Default value is 30.
    Default value is 30.
 
 
-   Example 1.2.  interim_update_credits parameter usage
-...
-modparam("ims_charging", "interim_update_credits", 600)
-...
+   Example 1.2.  interim_update_creditsparameter usage
+... modparam("ims_charging",
+        "interim_update_credits", 600) ...
 
 
-4.3.  timer_buffer (int)
+4.3.  timer_buffer(int)
 
 
    How many seconds before expiry of our credit should we request more
    How many seconds before expiry of our credit should we request more
    credit?
    credit?
 
 
    Default value is 8.
    Default value is 8.
 
 
-   Example 1.3.  timer_buffer parameter usage
-...
-modparam("ims_charging", "timer_buffer", 10)
-...
+   Example 1.3.  timer_bufferparameter usage
+... modparam("ims_charging", "timer_buffer", 10)
+        ...
 
 
-4.4.  ro_forced_peer (string)
+4.4.  ro_forced_peer(string)
 
 
    This is the optional name of the origin host of the Diameter server
    This is the optional name of the origin host of the Diameter server
    (typically a Charging Server). If not set then realm routing is used.
    (typically a Charging Server). If not set then realm routing is used.
 
 
    Default value is ''.
    Default value is ''.
 
 
-   Example 1.4.  ro_forced_peer parameter usage
-...
-modparam("ims_charging", "ro_forced_peer", "ocs.ims.smilecoms.com")
-...
+   Example 1.4.  ro_forced_peerparameter usage
+... modparam("ims_charging", "ro_forced_peer",
+        "ocs.ims.smilecoms.com") ...
 
 
-4.5.  ro_auth_expiry (integer)
+4.5.  ro_auth_expiry(integer)
 
 
    This is the expiry length in seconds of the initiated Diameter
    This is the expiry length in seconds of the initiated Diameter
    sessions.
    sessions.
 
 
    Default value is 7200.
    Default value is 7200.
 
 
-   Example 1.5.  ro_auth_expiry parameter usage
-...
-modparam("ims_charging", "ro_auth_expiry", 14400)
-...
+   Example 1.5.  ro_auth_expiryparameter usage
+... modparam("ims_charging", "ro_auth_expiry", 14400)
+        ...
 
 
-4.6.  ro_auth_expiry (integer)
+4.6.  ro_auth_expiry(integer)
 
 
    This is the expiry length in seconds of the initiated Diameter
    This is the expiry length in seconds of the initiated Diameter
    sessions.
    sessions.
 
 
    Default value is 7200.
    Default value is 7200.
 
 
-   Example 1.6.  ro_auth_expiry parameter usage
-...
-modparam("ims_charging", "ro_auth_expiry", 14400)
-...
+   Example 1.6.  ro_auth_expiryparameter usage
+... modparam("ims_charging", "ro_auth_expiry", 14400)
+        ...
 
 
-4.7.  cdp_event_latency (integer)
+4.7.  cdp_event_latency(integer)
 
 
    This is a flag to determine whether or slow CDP responses should be
    This is a flag to determine whether or slow CDP responses should be
    reported in the log file. 1 is enabled and 0 is disabled.
    reported in the log file. 1 is enabled and 0 is disabled.
 
 
    Default value is 1.
    Default value is 1.
 
 
-   Example 1.7.  cdp_event_latency parameter usage
-...
-modparam("ims_charging", "cdp_event_latency", 1)
-...
+   Example 1.7.  cdp_event_latencyparameter usage
+... modparam("ims_charging", "cdp_event_latency", 1)
+        ...
 
 
-4.8.  cdp_event_threshold (integer)
+4.8.  cdp_event_threshold(integer)
 
 
    This time in milliseconds is the limit we should report a CDP response
    This time in milliseconds is the limit we should report a CDP response
    as slow. i.e. if a CDP response exceeds this limit it will be reported
    as slow. i.e. if a CDP response exceeds this limit it will be reported
@@ -401,12 +419,11 @@ modparam("ims_charging", "cdp_event_latency", 1)
 
 
    Default value is 500.
    Default value is 500.
 
 
-   Example 1.8.  cdp_event_threshold parameter usage
-...
-modparam("ims_charging", "cdp_event_threshold", 500)
-...
+   Example 1.8.  cdp_event_thresholdparameter usage
+... modparam("ims_charging", "cdp_event_threshold",
+        500) ...
 
 
-4.9.  cdp_event_latency_log (integer)
+4.9.  cdp_event_latency_log(integer)
 
 
    This time log level at which we should report slow CDP responses. 0 is
    This time log level at which we should report slow CDP responses. 0 is
    ERROR, 1 is WARN, 2 is INFO and 3 is DEBUG. This is only relevant is
    ERROR, 1 is WARN, 2 is INFO and 3 is DEBUG. This is only relevant is
@@ -414,56 +431,51 @@ modparam("ims_charging", "cdp_event_threshold", 500)
 
 
    Default value is 0.
    Default value is 0.
 
 
-   Example 1.9.  cdp_event_latency_log parameter usage
-...
-modparam("ims_charging", "cdp_event_latency_log", 1)
-...
+   Example 1.9.  cdp_event_latency_logparameter usage
+... modparam("ims_charging", "cdp_event_latency_log",
+        1) ...
 
 
-4.10.  origin_host (string)
+4.10.  origin_host(string)
 
 
    Origin host to be used in Diameter messages to charging-server.
    Origin host to be used in Diameter messages to charging-server.
 
 
    Default value is "scscf.ims.smilecoms.com".
    Default value is "scscf.ims.smilecoms.com".
 
 
-   Example 1.10.  origin_host parameter usage
-...
-modparam("ims_charging", "origin_host", "scscf.kamailio-ims.org")
-...
+   Example 1.10.  origin_hostparameter usage
+... modparam("ims_charging", "origin_host",
+        "scscf.kamailio-ims.org") ...
 
 
-4.11.  origin_realm (string)
+4.11.  origin_realm(string)
 
 
    Origin Realm to be used in Diameter messages to charging-server.
    Origin Realm to be used in Diameter messages to charging-server.
 
 
    Default value is "ims.smilecome.com".
    Default value is "ims.smilecome.com".
 
 
-   Example 1.11.  origin_realm parameter usage
-...
-modparam("ims_charging", "origin_realm", "kamailio-ims.org")
-...
+   Example 1.11.  origin_realmparameter usage
+... modparam("ims_charging", "origin_realm",
+        "kamailio-ims.org") ...
 
 
-4.12.  destination_host (string)
+4.12.  destination_host(string)
 
 
    Destination host to be used in Diameter messages to charging-server.
    Destination host to be used in Diameter messages to charging-server.
 
 
    Default value is 5s.
    Default value is 5s.
 
 
-   Example 1.12.  destination_host parameter usage
-...
-modparam("ims_charging", "destination_host", "ocs.kamailio-ims.org")
-...
+   Example 1.12.  destination_hostparameter usage
+... modparam("ims_charging", "destination_host",
+        "ocs.kamailio-ims.org") ...
 
 
-4.13.  destination_realm (string)
+4.13.  destination_realm(string)
 
 
    Destination realm to be used in Diameter messages to charging-server.
    Destination realm to be used in Diameter messages to charging-server.
 
 
    Default value is "ims.smilecoms.com".
    Default value is "ims.smilecoms.com".
 
 
-   Example 1.13.  destination_realm parameter usage
-...
-modparam("ims_charging", "destination_realm", "kamailio-ims.org")
-...
+   Example 1.13.  destination_realmparameter usage
+... modparam("ims_charging", "destination_realm",
+        "kamailio-ims.org") ...
 
 
-4.14.  service_context_id_root (string)
+4.14.  service_context_id_root(string)
 
 
    This defines a root-element of the Service-Context-Id AVP used in the
    This defines a root-element of the Service-Context-Id AVP used in the
    diameter-message
    diameter-message
@@ -475,9 +487,8 @@ modparam("ims_charging", "destination_realm", "kamailio-ims.org")
    provider, by the service element manufacturer, or by a standardization
    provider, by the service element manufacturer, or by a standardization
    body, and MUST uniquely identify a given Diameter credit-control
    body, and MUST uniquely identify a given Diameter credit-control
    service specific document. The format of the Service-Context-Id is:
    service specific document. The format of the Service-Context-Id is:
-   "service-context" "@" "domain"
-
-   service-context = Token
+"service-context" "@" "domain" service-context =
+      Token
 
 
    The Token is an arbitrary string of characters and digits.
    The Token is an arbitrary string of characters and digits.
 
 
@@ -496,36 +507,33 @@ modparam("ims_charging", "destination_realm", "kamailio-ims.org")
 
 
    Default value is "[email protected]".
    Default value is "[email protected]".
 
 
-   Example 1.14.  service_context_id_root parameter usage
-...
-modparam("ims_charging", "service_context_id_root", "[email protected]")
-...
+   Example 1.14.  service_context_id_rootparameter usage
+... modparam("ims_charging",
+        "service_context_id_root", "[email protected]") ...
 
 
-4.15.  service_context_id_ext (string)
+4.15.  service_context_id_ext(string)
 
 
    This defines the extension of the Service-Context-Id AVP used in the
    This defines the extension of the Service-Context-Id AVP used in the
    diameter-message.
    diameter-message.
 
 
    Default value is "ext".
    Default value is "ext".
 
 
-   Example 1.15.  service_context_id_ext parameter usage
-...
-modparam("ims_charging", "service_context_id_ext", "ext2")
-...
+   Example 1.15.  service_context_id_extparameter usage
+... modparam("ims_charging",
+        "service_context_id_ext", "ext2") ...
 
 
-4.16.  service_context_id_mnc (string)
+4.16.  service_context_id_mnc(string)
 
 
    This defines Mobile-Network-Code (MNC) of the Service-Context-Id AVP
    This defines Mobile-Network-Code (MNC) of the Service-Context-Id AVP
    used in the diameter-message.
    used in the diameter-message.
 
 
    Default value is "01".
    Default value is "01".
 
 
-   Example 1.16.  service_context_id_mnc parameter usage
-...
-modparam("ims_charging", "service_context_id_mnc", "42")
-...
+   Example 1.16.  service_context_id_mncparameter usage
+... modparam("ims_charging",
+        "service_context_id_mnc", "42") ...
 
 
-4.17.  service_context_id_mcc (string)
+4.17.  service_context_id_mcc(string)
 
 
    This defines Mobile-Country-Code (MCC) of the Service-Context-Id AVP
    This defines Mobile-Country-Code (MCC) of the Service-Context-Id AVP
    used in the diameter-message.
    used in the diameter-message.
@@ -535,22 +543,20 @@ modparam("ims_charging", "service_context_id_mnc", "42")
 
 
    Default value is "001".
    Default value is "001".
 
 
-   Example 1.17.  service_context_id_mcc parameter usage
-...
-modparam("ims_charging", "service_context_id_mcc", "262")
-...
+   Example 1.17.  service_context_id_mccparameter usage
+... modparam("ims_charging",
+        "service_context_id_mcc", "262") ...
 
 
-4.18.  service_context_id_release (string)
+4.18.  service_context_id_release(string)
 
 
    This defines Release of the Service-Context-Id AVP used in the
    This defines Release of the Service-Context-Id AVP used in the
    diameter-message.
    diameter-message.
 
 
    Default value is "8" (Release 8).
    Default value is "8" (Release 8).
 
 
-   Example 1.18.  service_context_id_release parameter usage
-...
-modparam("ims_charging", "service_context_id_release", "262")
-...
+   Example 1.18.  service_context_id_releaseparameter usage
+... modparam("ims_charging",
+        "service_context_id_release", "262") ...
 
 
 5. Functions
 5. Functions
 
 
@@ -563,15 +569,15 @@ reservation_units)
    Perform a CCR on Diameter Ro interface for Charging
    Perform a CCR on Diameter Ro interface for Charging
 
 
    Meaning of the parameters is as follows:
    Meaning of the parameters is as follows:
-     * route_name route to be executed upon reception of charging requests
-     * direction "orig"inating or "term"inating
-     * charge_type "IEC" = Immediate Event Charging, "ECUR" - Event
+     * route_nameroute to be executed upon reception of charging requests
+     * direction"orig"inating or "term"inating
+     * charge_type"IEC" = Immediate Event Charging, "ECUR" - Event
        Charging with Unit Reservation or "SCUR" - Session Charging with
        Charging with Unit Reservation or "SCUR" - Session Charging with
        Unit Reservation.
        Unit Reservation.
        (Note: At the moment only SCUR is supported)
        (Note: At the moment only SCUR is supported)
-     * unit_type Types of the unit to be requested
+     * unit_typeTypes of the unit to be requested
        (unused at the moment)
        (unused at the moment)
-     * reservation_units how many units (at the moment seconds) should be
+     * reservation_unitshow many units (at the moment seconds) should be
        reservated at the moment.
        reservated at the moment.
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
@@ -580,48 +586,90 @@ reservation_units)
    return value.
    return value.
 
 
    Example 1.19. Ro_CCR
    Example 1.19. Ro_CCR
-...
-        xlog("L_DBG","Sending initial CCR Request for call\n");
-        Ro_CCR("CHARGING_CCR_REPLY", "orig", "SCUR", "", "30");
-}
-
-route[CHARGING_CCR_REPLY]
-{
-        xlog("L_DBG","cca_return code is $avp(s:cca_return_code)\n");
-
-        switch ($avp(s:cca_return_code)){
-            case 1: #success
-                xlog("L_DBG", "CCR success - will route message\n");
-                route(Finalize_Orig);
-                break;
-            case -1: #failure
-                xlog("L_ERR", "CCR failure - error response sent from module\n")
-;
-                sl_send_reply("402","Payment required");
-                break;
-            case -2: #error
-                xlog("L_ERR", "CCR error - error response sent from module\n");
-                sl_send_reply("500", "Charging Error");
-                break;
-            default:
-                xlog("L_ERR", "Unknown return code from CCR: [$avp(s:cca_return_
-code)] \n");
-                break;
-        }
-        exit;
-}
-
-...
+... xlog("L_DBG","Sending initial CCR Request for
+        call\n"); Ro_CCR("CHARGING_CCR_REPLY", "orig", "SCUR", "", "30"); }
+        route[CHARGING_CCR_REPLY] { xlog("L_DBG","cca_return code is $avp(s:cca_
+return_code)\n");
+        switch ($avp(s:cca_return_code)){ case 1: #success xlog("L_DBG", "CCR su
+ccess - will route
+        message\n"); route(Finalize_Orig); break; case -1: #failure xlog("L_ERR"
+, "CCR failure -
+        error response sent from module\n"); sl_send_reply("402","Payment requir
+ed"); break; case
+        -2: #error xlog("L_ERR", "CCR error - error response sent from module\n"
+);
+        sl_send_reply("500", "Charging Error"); break; default: xlog("L_ERR", "U
+nknown return code
+        from CCR: [$avp(s:cca_return_code)] \n"); break; } exit; } ...
 
 
 6. Statistics
 6. Statistics
 
 
-   6.1. CCR Timeouts (ccr_timeouts)
-   6.2. Average CCR Response Time (ccr_avg_response_time)
+   6.1. Initial CCRs (initial_ccrs)
+   6.2. Interim CCRs (interim_ccrs)
+   6.3. Final CCRs (final_ccrs)
+   6.4. Sucessful initial CCRs (successful_initial_ccrs)
+   6.5. Sucessful interim CCRs (successful_interim_ccrs)
+   6.6. Sucessful final CCRs (successful_final_ccrs)
+   6.7. Failed initial CCRs (failed_initial_ccrs)
+   6.8. Failed interim CCRs (failed_interim_ccrs)
+   6.9. Failed final CCRs (failed_final_ccrs)
+   6.10. CCRs average response time (ccr_avg_response_time)
+   6.11. CCRs responses time (ccr_responses_time)
+   6.12. Billed seconds (billed_secs)
+   6.13. Killed calls (killed_calls)
+
+6.1. Initial CCRs (initial_ccrs)
+
+   The number of initial CCRs, i.e., the CCRs that were sent for the
+   initial INVITEs.
+
+6.2. Interim CCRs (interim_ccrs)
+
+   The number of CCRs sent within established sessions.
+
+6.3. Final CCRs (final_ccrs)
+
+   The number of CCRs sent to terminate a session.
+
+6.4. Sucessful initial CCRs (successful_initial_ccrs)
+
+   Initial CCRs that ended with DIAMETER_SUCCESS response code.
+
+6.5. Sucessful interim CCRs (successful_interim_ccrs)
+
+   Interim CCRs that ended with DIAMETER_SUCCESS response code.
+
+6.6. Sucessful final CCRs (successful_final_ccrs)
+
+   Final CCRs that ended with DIAMETER_SUCCESS response code.
+
+6.7. Failed initial CCRs (failed_initial_ccrs)
+
+   Initial CCRs that ended with no DIAMETER_SUCCESS response or with some
+   other error during processing.
+
+6.8. Failed interim CCRs (failed_interim_ccrs)
+
+   Interim CCRs that ended with no DIAMETER_SUCCESS response or with some
+   other error during processing.
+
+6.9. Failed final CCRs (failed_final_ccrs)
+
+   Final CCRs that ended with no DIAMETER_SUCCESS response or with some
+   other error during processing.
+
+6.10. CCRs average response time (ccr_avg_response_time)
+
+   Average CCA arrival time in milliseconds.
+
+6.11. CCRs responses time (ccr_responses_time)
+
+   Total CCA arrival time in milliseconds.
 
 
-6.1. CCR Timeouts (ccr_timeouts)
+6.12. Billed seconds (billed_secs)
 
 
-   The number of timeouts on sending a CCR. i.e. no response to CCR.
+   Number of seconds billed in total.
 
 
-6.2. Average CCR Response Time (ccr_avg_response_time)
+6.13. Killed calls (killed_calls)
 
 
-   The average response time in milliseconds for CCR-CCA transaction.
+   Number of calls that were killed due to lack of credit.

+ 4 - 4
modules/ims_charging/doc/ims_charging.xml

@@ -18,22 +18,22 @@
         </affiliation>
         </affiliation>
         <email>[email protected]</email>
         <email>[email protected]</email>
       </author>
       </author>
-      <editor>
+      <author>
         <firstname>Carsten</firstname>
         <firstname>Carsten</firstname>
         <surname>Bock</surname>
         <surname>Bock</surname>
         <affiliation>
         <affiliation>
           <orgname>ng-voice GmbH</orgname>
           <orgname>ng-voice GmbH</orgname>
         </affiliation>
         </affiliation>
         <email>[email protected]</email>
         <email>[email protected]</email>
-      </editor>
-      <editor>
+      </author>
+      <author>
         <firstname>Carlos</firstname>
         <firstname>Carlos</firstname>
         <surname>Ruiz Diaz</surname>
         <surname>Ruiz Diaz</surname>
         <affiliation>
         <affiliation>
           <orgname>ng-voice GmbH</orgname>
           <orgname>ng-voice GmbH</orgname>
         </affiliation>
         </affiliation>
         <email>[email protected]</email>
         <email>[email protected]</email>
-      </editor>
+      </author>
     </authorgroup>
     </authorgroup>
     <copyright>
     <copyright>
       <year>2013</year>
       <year>2013</year>

+ 60 - 6
modules/ims_charging/doc/ims_charging_admin.xml

@@ -1,4 +1,13 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+<!-- Module Admin Guide -->
 <chapter>
 <chapter>
   <title>Admin Guide</title>
   <title>Admin Guide</title>
   <section>
   <section>
@@ -16,7 +25,7 @@
       <para>The Following mouldes must be loaded before this module:</para>
       <para>The Following mouldes must be loaded before this module:</para>
       <itemizedlist>
       <itemizedlist>
         <listitem>
         <listitem>
-          <para>Dialog2</para>
+          <para>Dialog_ng</para>
         </listitem>
         </listitem>
         <listitem>
         <listitem>
           <para>TM - Transaction Manager</para>
           <para>TM - Transaction Manager</para>
@@ -506,13 +515,58 @@
   <section>
   <section>
     <title>Statistics</title>
     <title>Statistics</title>
     <section>
     <section>
-      <title>CCR Timeouts (ccr_timeouts)</title>
-      <para>The number of timeouts on sending a CCR. i.e. no response to CCR.</para>
+      <title>Initial CCRs (initial_ccrs)</title>
+      <para>The number of initial CCRs, i.e., the CCRs that were sent for the initial INVITEs.</para>
+    </section>
+    <section>
+      <title>Interim CCRs (interim_ccrs)</title>
+      <para>The number of CCRs sent within established sessions.</para>
     </section>
     </section>
     <section>
     <section>
-      <title>Average CCR Response Time (ccr_avg_response_time)</title>
-      <para>The average response time in milliseconds for CCR-CCA transaction.</para>
+      <title>Final CCRs (final_ccrs)</title>
+      <para>The number of CCRs sent to terminate a session.</para>
     </section>
     </section>
+    <section>
+      <title>Sucessful initial CCRs (successful_initial_ccrs)</title>
+      <para>Initial CCRs that ended with DIAMETER_SUCCESS response code.</para>
+    </section>
+    <section>
+      <title>Sucessful interim CCRs (successful_interim_ccrs)</title>
+      <para>Interim CCRs that ended with DIAMETER_SUCCESS response code.</para>
+    </section>
+    <section>
+      <title>Sucessful final CCRs (successful_final_ccrs)</title>
+      <para>Final CCRs that ended with DIAMETER_SUCCESS response code.</para>
+    </section>
+    <section>
+      <title>Failed initial CCRs (failed_initial_ccrs)</title>
+      <para>Initial CCRs that ended with no DIAMETER_SUCCESS response or with some other error during processing.</para>
+    </section>
+    <section>
+      <title>Failed interim CCRs (failed_interim_ccrs)</title>
+      <para>Interim CCRs that ended with no DIAMETER_SUCCESS response or with some other error during processing.</para>
+    </section>
+    <section>
+      <title>Failed final CCRs (failed_final_ccrs)</title>
+      <para>Final CCRs that ended with no DIAMETER_SUCCESS response or with some other error during processing.</para>
+    </section>
+    <section>
+      <title>CCRs average response time (ccr_avg_response_time)</title>
+      <para>Average CCA arrival time in milliseconds.</para>
+    </section>
+    <section>
+      <title>CCRs responses time (ccr_responses_time)</title>
+      <para>Total CCA arrival time in milliseconds.</para>
+    </section>
+    <section>
+      <title>Billed seconds (billed_secs)</title>
+      <para>Number of seconds billed in total.</para>
+    </section>
+    <section>
+      <title>Killed calls (killed_calls)</title>
+      <para>Number of calls that were killed due to lack of credit.</para>
+    </section>
+
   </section>
   </section>
 </chapter>
 </chapter>