IMPORTANT:
Creating the ECS Administrative User Account
configure
context
local
administrator <user_name> password <password> ecs
end
Installing the ECS License
Enabling Enhanced Charging Service
configure
require
active-charging
context local
interface <interface_name>
ip
address <ip_address/mask>
exit
server ftpd
end
IMPORTANT:
Creating the Enhanced Charging Service
Configuring Rule Definitions
Configuring Group of Ruledefs
configure
active-charging
service <ecs_service_name>
group-of-ruledefs <ruledef_group_name>
add-ruledef
priority <priority> ruledef <ruledef_name>
group-of-ruledefs-application { charging | content-filtering | gx-alias | post-processing }
end
Configuring Charging Actions
configure
active-charging
service <ecs_service_name>
charging-action <charging_action_name>
content-id <content_id>
retransmissions-counted
billing-action { create-edrs { charging-edr <charging_edr_format_name> | reporting-edr <reporting_edr_format_name> } + [ wait-until-flow-ends ] | egcdr | exclude-from-udrs | radius | rf } +
end
Verifying your Configuration
Configuring IP Readdressing
configure
active-charging
service <ecs_service_name>
charging-action <charging_action_name>
flow
action readdress server ipv4_address/ipv6_address [ discard-on-failure ] [ dns-proxy-bypass ] [ port port_number [ discard-on-failure ] [ dns-proxy-bypass ] ]
end
configure
active-charging service service_name
charging-action charging_action_name
flow
action readdress server-list server_list_name [ hierarchy ][ round-robin ] [ dns-proxy-bypass ] [ discard-on-failure ]
end
Configuring Rulebase
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
flow
end-condition { content-filtering | hagr | handoff | normal-end-signaling | session-end | url-blacklisting | timeout } [ flow-overflow ] + { charging-edr <charging_edr_format_name> | reporting-edr <reporting_edr_format_name> }
billing-records
udr udr-format <udr_format_name>
action
priority <action_priority> { [ dynamic-only | static-and-dynamic | timedef <timedef_name> ] { group-of-ruledefs <ruledef_group_name> | ruledef <ruledef_name> } charging-action <charging_action_name> [ monitoring-key <monitoring_key> ] [ description <description> ] }
route
priority <route_priority> ruledef <ruledef_name> analyzer <analyzer> [ description <description> ]
rtp
dynamic-flow-detection
udr
threshold interval <interval>
cca
radius charging context <context> group <group_name>
cca
radius accounting interval <interval>
end
Configuring Rulebase Lists
Setting EDR Formats
IMPORTANT:
configure
active-charging
service <ecs_service_name>
edr-format <edr_format_name>
attribute <attribute> { [ format { MM/DD/YY-HH:MM:SS | MM/DD/YYYY-HH:MM:SS | YYYY/MM/DD-HH:MM:SS | YYYYMMDDHHMMSS | seconds } ] [ localtime ] | [ { ip | tcp } { bytes | pkts } { downlink | uplink } ] priority <priority> }
rule-variable <protocol> <rule> priority <priority>
event-label <event_label> priority <priority>
end
IMPORTANT:
Setting UDR Formats
IMPORTANT:
configure
active-charging
service <ecs_service_name>
udr-format <udr_format_name>
attribute <attribute> { [ format { MM/DD/YY-HH:MM:SS | MM/DD/YYYY-HH:MM:SS | YYYY/MM/DD-HH:MM:SS | YYYYMMDDHHMMSS | seconds } ] [ localtime ] | [ { bytes | pkts } { downlink | uplink } ] ] priority <priority> }
end
IMPORTANT:
Enabling Charging Record Retrieval
Optional Configurations
IMPORTANT:
Configuring a Rulebase for a Subscriber
configure
context <context_name>
subscriber
name <subscriber_name>
active-charging
rulebase <rulebase_name>
end
Configuring a Rulebase within an APN
IMPORTANT:
configure
context <context_name>
apn <apn_name>
active-charging
rulebase <rulebase_name>
end
Configuring Charging Rule Optimization
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
charging-rule-optimization { high | low | medium }
end
Configuring Enhanced Features
IMPORTANT:
IMPORTANT:
IMPORTANT:
Configuring Prepaid CCA for Diameter or RADIUS
configure
active-charging
service <ecs_service_name>
charging-action <charging_action_name>
cca
charging credit [ preemptively-request | rating-group <coupon_id> ]
exit
credit-control [ group <group_name> ]
mode { diameter | radius }
quota
time-threshold { <absolute_value> | percent <percent_value> }
quota
unit-threshold { <absolute_value> | percent <percent_value> }
quota
volume-threshold { <absolute_value> | percent <percent_value> }
end
charging-action http-redirect
content-id
3020
retransmissions-counted
billing-action
exclude-from-udrs
flow
action redirect-url "http://10.1.67.214/cgi-bin/aoc.cgi\077
imsi=#bearer.calling-station-id#&url=#http.url#&acctsessid=#bearer.acct-session-id#&correlationid=#bearer.correlation-id#&username=#bearer.user-name#&ip=#bearer.served-bsa-addr#&subid=#bearer.subscriber-id#&host=#http.host#&httpuri=#http.uri#"
clear-quota-retry-timer
end
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
cca
quota { holding-time <holding_time> content-id <content_id> | retry-time <retry_time> [ max-retries <max_retries> ] }
cca
quota time-duration algorithm { consumed-time <consumed_time> [ plus-idle ] [ content-id <content_id> ] | continuous-time-periods <seconds> [ content-id <content_id> ] | parking-meter <seconds> [ content-id <content_id> ] }
end
configure
active-charging
service <ecs_service_name>
ruledef <ruledef_name>
cca
quota-state <operator> { limit-reached | lower-bandwidth }
cca
redirect-indicator <operator> <indicator_value>
end
configure
active-charging
service <ecs_service_name>
credit-control [ group <group_name> ]
failure-handling { ccfh-session-timeout <session_timeout> | { initial-request | terminate-request | update-request } { continue [ go-offline-after-tx-expiry | retry-after-tx-expiry ] | retry-and-terminate [ retry-after-tx-expiry ] | terminate }
end
Configuring Diameter Prepaid Credit Control Application (DCCA)
IMPORTANT:
IMPORTANT:
configure
active-charging
service <ecs_service_name>
credit-control [ group <cc_group_name> ]
mode diameter
diameter
origin endpoint <endpoint_name>
diameter
dictionary <dcca_dictionary>
diameter
peer-select peer <peer_name> [ realm <realm_name> ] [ secondary-peer <sec_peer_name> [ realm <realm_name> ] ] [ imsi-based { [ prefix | suffix ] <imsi/prefix/suffix_start_value> } [ to <imsi/prefix/suffix_end_value> ] ]
end
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
dynamic-rule
order { always-first | first-if-tied }
action
priority <action_priority> { [ dynamic-only | static-and-dynamic | timedef <timedef_name> ] { group-of-ruledefs <ruledef_group_name> | ruledef <ruledef_name> } charging-action <charging_action_name> [ monitoring-key <monitoring_key> ] [ description <description> ] }
end
Configuring Peer-Select in Subscriber Configuration Mode (Optional)
IMPORTANT:
configure
context <context_name>
subscriber
name <subscriber_name>
dcca
peer-select peer <host_name> [ [ realm <realm_name> ] [ secondary-peer <host_name> [ realm <realm_name> ] ] ]
end
Configuring Peer-Select in APN Configuration Mode (Optional)
IMPORTANT:
IMPORTANT:
configure
context <context_name>
apn <apn_name>
dcca
peer-select peer <host_name> [ [ realm <realm_name> ] [ secondary-peer <host_name> [ realm <realm_name> ] ] ]
end
Configuring RADIUS Prepaid Credit Control Application
IMPORTANT:
IMPORTANT:
configure
active-charging
service <ecs_service_name>
credit-control [ group <group_name> ]
mode radius
exit
rulebase <rulebase_name>
cca
radius charging context <vpn_context> [ group <group_name> ]
end
IMPORTANT:
Creating an ECS ACL
Applying an ACL to an Individual Subscriber
configure
context <context_name>
subscriber
name <subscriber_name>
ip
access-group <acl_name> [ in | out ]
end
Configuring GTPP Accounting
Configuring DNS Snooping Feature
configure
active-charging
service <ecs_service_name>
ip
dns-learnt-entries timeout <timeout_period>
ruledef <ruledef_name>
ip
server-domain-name { = | contains | ends-with | starts-with }<domain_name/domain_name_segment>
...
exit
rulebase <rulebase_name>
action
priority <priority> ruledef <ruledef_name> charging-action <charging_action_name>
...
end
Configuring EDR/UDR Parameters
configure
context <context_name>
edr-module
active-charging-service [ charging | reporting ]
cdr { purge { storage-limit <storage_limit> | time-limit <time_limit> } [ max-files <max_records_to_purge> ] | push-interval <push_interval> | push-trigger space-usage-percent <trigger_percentage> | remove-file-after-transfer | transfer-mode { pull [ module-only ] | push primary { encrypted-url <encrypted_url> | url <url> } [ [ max-files <max_records> ] [ module-only ] [ secondary { encrypted-secondary-url <encrypted_secondary_url> | secondary-url <secondary_url> } ] [ via local-context ] + ] | use-harddisk }
file [ charging-service-name { include | omit } ] [ compression { gzip | none } ] [ current-prefix <string> ] [ delete-timeout <seconds> ] [ directory <directory_name> ] [ edr-format-name ] [ exclude-checksum-record ] [ field-separator { hyphen | omit | underscore } ] [ file-sequence-number
rulebase-seq-num ] [ headers ] [ name <file_name> ] [ reset-indicator ] [ rotation [ num-records <number> | time <seconds> | volume <bytes> ] ] [ sequence-number { length <length> | omit | padded | padded-six-length | unpadded } ] [ storage-limit <limit> ] [ single-edr-format ] [ time-stamp { expanded-format | rotated-format | unix-format } ] [ trailing-text <string> ] [ trap-on-file-delete ] [ xor-final-record ] +
exit
udr-module
active-charging-service
file [ charging-service-name { include | omit } ] [ compression { gzip | none } ] [ current-prefix <string> ] [ delete-timeout <seconds> ] [ directory <directory_name> ] [ exclude-checksum-record ] [ field-separator { hyphen | omit | underscore } ] [ file-sequence-number
rulebase-seq-num ] [ headers ] [ name <file_name> ] [ reset-indicator ] [ rotation [ num-records <number> | time <seconds> | volume <bytes> ] ] [ sequence-number { length <length> | omit | padded | padded-six-length | unpadded } ] [ storage-limit <limit> ] [ time-stamp { expanded-format | rotated-format | unix-format } ] [ trailing-text <string> ] [ trap-on-file-delete ] [ udr-seq-num ] [ xor-final-record ] +
end
Verifying your Configurations
Pushing EDR/UDR Files Manually
Retrieving EDR and UDR Files
sftp -oUser=ecpadmin@ECP 192.168.1.10:/records/edr/*
sftp -oUser=ecpadmin@ECP 192.168.1.10:/records/udr/*
Configuring Post Processing Feature
configure
active-charging
service <ecs_service_name>
ruledef <ruledef_name>
<protocol> <expression>
<operator> <condition>
rule-application
post-processing
exit
charging-action <charging_action_name>
...
exit
rulebase <rulebase_name>
action
priority <action_priority> { [ dynamic-only | static-and-dynamic | timedef <timedef_name> ] { group-of-ruledefs <ruledef_group_name> | ruledef <ruledef_name> } charging-action <charging_action_name> [ monitoring-key <monitoring_key> ] [ description <description> ] }
post-processing
priority <priority> ruledef <ruledef_name> charging-action <charging_action_name>
...
end
Configuring Service Group QoS Feature
configure
active-charging
service <ecs_service_name>
qos-group-of-ruledefs <qos_group_of_ruledefs_name> [ -noconfirm ] [ description <description> ]
add-ruledef <ruledef_name>
end
Configuring TCP Proxy
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
tcp
proxy-mode { dynamic { all | content-filtering | dcca | ip-readdressing | nexthop-readdressing | xheader-insert + } | static [ port [ <port_number> [ to <port_number> ] ] ] }
end
Configuring Tethering Detection Feature
IMPORTANT:
configure
active-charging
service <ecs_service_name>
tethering-database [ os-signature <os_signature_db_file_name> | tac <tac_db_file_name> | ua-signature <ua_signature_db_file_name> ] +
ruledef <tethering_detection_ruledef_name>
tethering-detection { flow-not-tethered | flow-tethered }
exit
rulebase <rulebase_name>
tethering-detection { os-db-only | ua-db-only }
action
priority <priority> ruledef <tethering_detection_ruledef_name> charging-action <charging_action_name>
...
end
Upgrading Tethering Detection Databases
upgrade tethering-detection
database { all | os-signature | tac | ua-signature } [ -noconfirm ]
new-filename in
the designated directory path. ECS auto-detects the presence of
files available for upgrade daily. When a new version of a file
is found, the upgrade process is triggered. The upgrade can also
be forced by running the upgrade command in the CLI. On a successful
upgrade this file is renamed to filename.Sample Tethering Detection Feature Configurations
configure
active-charging
service ecs_service
tethering-database
ruledef
tethered-traffic
tethering-detection
flow-tethered
tcp
any-match = TRUE
exit
ruledef
ftp-pkts
ftp
any-match = TRUE
exit
ruledef
http-pkts
http
any-match = TRUE
exit
ruledef
tcp-pkts
tcp
any-match = TRUE
exit
ruledef
ip-pkts
ip
any-match = TRUE
exit
ruledef
http-port
tcp
either-port = 80
rule-application
routing
exit
ruledef
ftp-port
tcp
either-port = 21
rule-application
routing
exit
charging-action
premium
content-id
1
retransmissions-counted
billing-action
egcdr
exit
charging-action
standard
content-id
2
retransmissions-counted
billing-action
egcdr
exit
rulebase
consumer
tethering-detection
action
priority 10 ruledef tethered-traffic charging-action premium
action
priority 20 ruledef ftp-pkts charging-action standard
action
priority 30 ruledef http-pkts charging-action standard
action
priority 40 ruledef tcp-pkts charging-action standard
action
priority 50 ruledef ip-pkts charging-action standard
route
priority 80 ruledef http-port analyzer http
exit
rulebase
default
end
configure
active-charging
service ecs_service
tethering-database
ruledef
ftp-pkts
ftp
any-match = TRUE
exit
ruledef
ftp-pkts-tethered
ftp
any-match = TRUE
tethering-detection
flow-tethered
exit
ruledef
http-pkts
http
any-match = TRUE
exit
ruledef
http-pkts-tethered
http
any-match = TRUE
tethering-detection
flow-tethered
exit
ruledef
tcp-pkts
tcp
any-match = TRUE
exit
ruledef
tcp-pkts-tethered
tcp
any-match = TRUE
tethering-detection
flow-tethered
exit
ruledef
ip-pkts
ip
any-match = TRUE
exit
ruledef
ip-pkts-tethered
ip
any-match = TRUE
tethering-detection
flow-tethered
exit
ruledef
http-port
tcp
either-port = 80
rule-application
routing
exit
ruledef
ftp-port
tcp
either-port = 21
rule-application
routing
exit
charging-action
premium-http
content-id
10
retransmissions-counted
billing-action
egcdr
exit
charging-action
premium-ftp
content-id
20
retransmissions-counted
billing-action
egcdr
exit
charging-action
premium
content-id
1
retransmissions-counted
billing-action
egcdr
exit
charging-action
standard
content-id
2
retransmissions-counted
billing-action
egcdr
exit
rulebase
consumer
tethering-detection
action
priority 10 ruledef ftp-pkts-tethered charging-action premium-ftp
action
priority 20 ruledef ftp-pkts charging-action standard
action
priority 30 ruledef http-pkts-tethered charging-action premium-http
action
priority 40 ruledef http-pkts charging-action standard
action
priority 50 ruledef tcp-pkts-tethered charging-action premium
action
priority 60 ruledef tcp-pkts charging-action standard
action
priority 70 ruledef ip-pkts-tethered charging-action premium
action
priority 80 ruledef ip-pkts charging-action standard
route
priority 80 ruledef http-port analyzer http
exit
rulebase
default
end
Configuring Time-of-Day Activation/Deactivation of Rules Feature
configure
active-charging
service <ecs_service_name>
ruledef <ruledef_name>
...
exit
timedef <timedef_name>
start
day { friday | monday | saturday | sunday | thursday | tuesday | wednesday } time <hh> <mm> <ss> end day { friday | monday | saturday | sunday | thursday | tuesday | wednesday } time <hh> <mm> <ss>
start
time <hh> <mm>
<ss> end
time <hh>
<mm> <ss>
exit
charging-action <charging_action_name>
...
exit
rulebase <rulebase_name>
action
priority <action_priority> timedef <timedef_name> { group-of-ruledefs <ruledef_group_name> | ruledef <ruledef_name> } charging-action <charging_action_name> [ description <description> ]
...
end
Configuring Transactional Rule Matching Feature
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
transactional-rule-matching
end
IMPORTANT:
show active-charging
rulebase name <rulebase_name>
Configuring Flow Aware Packet Acceleration Feature
Configuring Retransmissions Under Rulebase or Service Level CLI
configure
active-charging
service <ecs_service_name>
rulebase <rulebase name>
retransmissions-counted
end
show active-charging
rulebase name <rulebase_name>
Configuring Websockets
configure
active-charging
service <ecs_service_name>
rulebase <rulebae name>
websocket
flow-detection <protocol>
end
show active-charging
rulebase name <rulebase_name>
Configuring URL Filtering Feature
configure
active-charging
service <ecs_service_name>
group-of-prefixed-urls <prefixed_urls_group_name>
end
configure
active-charging
service <ecs_service_name>
group-of-prefixed-urls <prefixed_urls_group_name>
prefixed-url <url_1>
...
prefixed-url <url_10>
end
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
url-preprocessing
bypass group-of-prefixed-urls <prefixed_urls_group_name>
...
url-preprocessing
bypass group-of-prefixed-urls <prefixed_urls_group_name>
end
Configuring URL-based Re-addressing
configure
active-charging service <service_name>
charging-action <charging_action_name>
flow action url-readdress
server <ipv4_address> [ port <port_number> ]
no flow action
end
IMPORTANT:
Configuring the X-Header Format
configure
active-charging
service <ecs_service_name>
xheader-format <xheader_format_name>
insert <xheader_field_name> { string-constant <xheader_field_value> | variable { bearer { 3gpp { apn | charging-characteristics | charging-id | imei | imsi | qos | rat-type | s-mcc-mnc | sgsn-address } | acr | customer-id | ggsn-address | mdn | msisdn-no-cc | radius-string | radius-calling-station-id | session-id | sn-rulebase | subscriber-ip-address | username } [ encrypt ] | http { host | url } }
end
Configuring Charging Action for Insertion of X-Header Fields
IMPORTANT:
Configuring X-Header Encryption
configure
active-charging
service <ecs_service_name>
rulebase <rulebase_name>
xheader-encryption
certificate-name <certificate_name>
xheader-encryption
re-encryption period <re-encryption_period>
end