CDR Build Module

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Updated configuration)
Line 145: Line 145:
 
* [[CDR File Module]]
 
* [[CDR File Module]]
 
* [[Starting CDR Ring Timer on call.progress]]
 
* [[Starting CDR Ring Timer on call.progress]]
 +
 +
[[Category:CDR]]

Revision as of 14:10, 4 November 2013

Cdrbuild module reads messages from other channel modules (h323chan, ysipchan, iaxchan) about calls and builds the CDR (call detail record).

Then is sending a message call.cdr for different cdr modules that intend to write in different mediums (file, database).

The same message is used by channels that track channel or line states.

Contents

Operation on CDRs

The operation to be performed is indicated by the operation parameter that can be one of:

  • initialize - the first call.cdr message generated for the channel.
  • update - generated every time something could have changed.
  • finalize - last call.cdr message generated for the channel holding the final information on the call leg, this is the only one used by the cdrfile module.

List of builtin overridable variables

In order for a variable/parameter to be available from the cdrbuild module it has to be enabled. Here's a complete list of builtin overridable variables:

  • billid
  • reason
  • address
  • caller
  • called
  • callername
  • calledfull
  • username

List of generated internally variables

Other variables are critical for the operation or generated internally and cannot be overriden:

  • time
  • chan
  • operation
  • direction
  • status
  • duration
  • billtime
  • ringtime
  • cdrwrite
  • cdrtrack
  • cdrcreate
  • cdrid
  • runid
Note: that in order for a parameter to appear in the chan.cdr messages it has to be received in at least one of the messages handled by this module. 
For outgoing calls you should use the copyparams parameter of the call.execute message to copy parameters from incoming call leg to the outgoing one.

Configuration

cdrbuild.conf

[general]

; resolution: keyword: Resolution for time representation: sec, msec or usec
;resolution=msec

; guardtime: int: Time in ms to remember hungup channels to avoid race conditions
;guardtime=5000

; updates: bool: Emit call cdr message when call status has changed
;updates=true

; status: bool: Emit call cdr status messages for the call duration
;status=false

; status_interval: int: The time interval in seconds to emit call cdr status messages
; Note: If status is set to false this interval will be ignored
; Default 60s
; Min 60s
; Max 600s
;status_interval=60

; ring_on_progress: bool: Start ring timer when processing call.progress
; This parameter can be overridden in call.progress message by a 'ringing' parameter
;ring_on_progress=no


[parameters]
; Each line consists of name=bool where name is the name of the parameter being
;  monitored while bool allows or disallows subsequent overwrites of the initial
;  non-empty value
; You can add your own monitored parameters that will appear in "call.cdr"

; The following parameters are handled by default but you can change their
;  overwrite behaviour
;billid=true
;reason=true
;address=false
;caller=false
;called=false
;calledfull=false
;username=false

; The following parameters are handled internally and cannot be changed:
;  time, chan, operation, cdrwrite, cdrtrack, cdrcreate, cdrid, runid,
;  direction, status, duration, billtime, ringtime

; Special section for time formatting
; Formatting rules
; YYYY | %Y -> Year (2012)
; YY | %y   -> Year, last two digits (00-99)
; MM | %m   -> Month as a decimal number (01-12)
; DD | %d   -> Day of the month (01-31)
; HH | %H   -> Hour in 24h format (00-23)
; mm | %M   -> Hour in 24h format (00-23)
; SS | %S   -> Second (00-60)
;              Note the value is rounded
; UTC       -> If present the time will represent the UTC time. If is missing
;              the time will represent local time zone
; N*u       -> Milliseconds and Microseconds.
;              Note! The value is rounded
;              EG: time: 1.123456
;                  s.u -> 1.1
;                  s.uu -> 1.12
;                  s.uuu -> 1.123
;                  s.uuuu -> 1.1234
;                  s.uuuuu -> 1.12346
;                  s.uuuuuu -> 1.123456
; Other formats may me used but they must correspond with C strftime method formats
; Important! If duplicate formats are ignored!
; Eg: date : 09 14 2012
;            YYYY YY DD DD mm DD-> 2012 YY 14 DD 09 DD

;[formatted-timers]
; Append the call start time in call cdr message with the given format
; Eg: call_start_time=YY/MM/DD HH:mm:SS.uuuuuu UTC
;call_start_time=

; Append the call answer time in call cdr message with the given format
; Eg: call_answer_time=YY/MM/DD HH:mm:SS.uuuuuu UTC
;call_answer_time=

; Append the call hangup time in call cdr message with the given format
; Eg: call_hangup_time=YY/MM/DD HH:mm:SS.uuuuuu UTC
;call_hangup_time=

; Append the call duration in call cdr message with the given format
; Allowed formats: HH mm SS N*u
; Eg: HH:mm:SS.uuu
;duration_call=


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers