Architecture
Configuration Options
GUI Options:
- Accounting collector 1 IP address: leave empty to use the same address as element manager 1.
- Accounting collector 2 IP address: leave empty to use the same address as element manager 2.
- SIP accounting directory: base directory for storing CDR files for calls
- HTTP accounting directory: base directory for storing CDR files for http requests
- ENUM accounting directory: base directory for storing CDR files for enum requests
- Accounting CDR file rotation interval (mins): how often CDR files are rotated.
- CDR timestamps: timezone to use for date-time fields in CDRs.
- Enable start CDR: write a CDR when a call is started (default is disabled).
- Enable end CDR: write a CDR when a call is rejected (4xx/5xx/6xx) (default is enabled).
- Enable recurse CDR: write a CDR when a cranckback occurs (default is enabled).
- Enable stop CDR: write a CDR when a successful call ends (default is enabled).
- Enable redirect CDR: enable CDR creation for redirects (30X responses). Default is disabled.
- Interim CDR interval (secs): enable interim CDRs. 0 means disabled.
- Enable HTTP CDR
- Enable ENUM CDR
- SIP accounting events directory: events storage directory on CP's
- Accounting events file rotation interval (mins): how often events file are rotated.
- Timeout for unrefreshed calls (secs): If call status is refreshed with OPTIONS messages, this parameter defines the timeout after which the call must be considered closed and a stop CDR must be generated. Set parameter to 0 to disable the feature.
Local options (sre.cfg):
[accounting]
collector_id=X
where X is either 1 or 2 depending on EM; this is used by oplog receiver/streamer to determine collector addresses.
Filesystems
Call Processors
Events file are stored by default in:
- /data/sre/accounting/events
- /data/sre/accounting/events/http
- /data/sre/accounting/events/enum
Element Managers
Oplog files are written in:
- /data/sre/accounting/state/
- /data/sre/accounting/http/state
- /data/sre/accounting/enum/state
CDR files are produced in:
- /data/sre/accounting/
- /data/sre/accounting/http
- /data/sre/accounting/enum
Dimensioning
On call processors:
- A successful call is composed of the events START, CONNECT, STOP
- A failed call is composed of the events START, END
- A crankback'ed call is composed of the events START, RECURSE, START, CONNECT, STOP
- Event size can be approximated to 1 KB (considering some extra CDR fields) and a call can be averaged to 5 events, so 5 KB should be accounted per call in terms of storage capacity, retention
On element managers:
- A completed CDR can be estimated to 1 KB
- The oplogs can be approximated to the same size as events so an oplog file is at most the parameter Operation log items per file multiplied by 1 KB
- The oplog checkpoint can be estimated to 5 KB multiplied by the number of active calls
CDR Format
SRE comes with a default 50-reserved-field CDR. Not all the fields are being used in the current release, nevertheless the unused fields up to field 50 are being populated as empty in the csv format. In the following table a list of the currently assigned fields is reported.
Field name | Description |
---|---|
Setup time | Example: 2023-08-25T10:42:34 |
Setup host | Hostname of the Call Processing Instance handling the call setup. |
Connect time | Example: 2023-08-25T10:42:41 |
Connect host | Hostname of the Call Processing Instance handling the call connect. |
Disconnect time | Example: 2023-08-25T10:43:30 |
Disconnect host | Hostname of the Call Processing Instance handling the call termination. |
Status code | SIP response error code response (0 if no SIP error) |
callId | content of the SIP Call-ID header field |
counter | 0 for the first branch. The value of counter is incremented for each new branch of a transaction. |
fromURI | SIP URI inside the From SIP header field |
fromUsername | User part of the SIP URI inside the From SIP header field |
toURI | SIP URI inside the To SIP header field |
toUsername | User part of the SIP URI inside the To SIP header field |
requestURI | Initial Request URI (SIP URI inside the Request line of the incoming INVITE message) |
requestUsername | User part of the initial Request URI (SIP URI inside the Request line of the incoming INVITE message) |
lastRequest URI | Request URI inside the SIP message sent to the destination. Note that the host part of the lastRequestURI contains the next-hop IP address and port. |
sourceAddress | Source IP address of the incoming SIP INVITE message |
sourcePort | Source Port of the incoming SIP INVITE message |
ingressSREAddress | IP address of the SRE receiving the INVITE message |
ingressSREPort | Port of the SRE receiving the INVITE message |
typeOfCDR | Start, Stop, Interim, End, Recurse |
The field "typeOfCDR" contains the indication of the nature of the call detail record:
- Start: record generated at the reception of a SIP INVITE
- Stop: record generated at the termination of a successful call (BYE)
- End: record generated at the rejection of a SIP INVITE (4xx/5xx/6xx)
- Recurse: record generated at the recursion or crankback triggered on SRE
- Interim: record generated every X seconds for an ongoing call, as configured in the system settings and if enabled at kamailio level
These CDR types must be enabled in the system settings, as explained in the Admin Guide.
Example of CDRs
Successful call
2017-08-25T10:43:06.856347,sre-cp12.bru1.blabla,2017-08-25T10:43:07.929578,sre-cp12.bru1.intra.blabla.com,2017-08-25T10:43:12.803735,sre-cp12.bru1.intra.blabla.com,0,524365_133480795@10.210.5.1,0,sip:+32483760878@10.210.5.1;user=phone,+32483760878,sip:+88823224019748@10.210.1.4;user=phone,+88823224019748,sip:+88823224019748@10.210.1.4:5060;user=phone,+88823224019748,sip:+3224019748@10.100.10.208:5060,10.210.5.1,5060,10.210.1.4,5060,stop,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Canceled call
2017-08-28T13:32:58.486904,sre-cp22,,,2017-08-28T13:33:13.995437,sre-cp22,487,262248_57612123@10.210.5.1,0,sip:+32498252335@10.210.5.1;user=phone,+32498252335,sip:+888332483760873@10.211.1.3;user=phone,+888332483760873,sip:+888332483760873@10.211.1.3:5060;user=phone,+888332483760873,sip:+32483760873@78.110.195.140:5060,10.210.5.1,5060,10.211.1.3,5060,stop,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Call with a 404 Not Found response
2017-08-28T14:55:41.190149,sre-cp11.bru1.intra.blabla.com,,,2017-08-28T14:55:41.246964,sre-cp11.bru1.intra.blabla.com,404,Sd0i15-lmRPGqu871GtqpQ,0,sip:+3224861481@10.210.1.5;user=phone,+3224861481,sip:+32483760873@10.210.1.5:5060;transport=UDP;user=phone,+32483760873,sip:+32483760873@10.210.1.5:5060;user=phone;transport=UDP,+32483760873,sip:32486013161@10.210.5.1:5060,78.110.195.140,5060,10.210.1.5,5060,stop,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Adding custom fields
Append CDR fields
The node Append CDR fields appends custom CDR fields at the end of the fields already present in the CDR. If it is called several times, new fields will be appended after already existing fields. In the option elements, you can select which variable or plain text you want to include in the CDR:
Set CDR fields
The node Set CDR fields allows to set custom CDR fields by specifying their position after the first 50 fields reserved for SRE: