Brekeke SIP Server Wiki

Variables for CDR

CDR Variables
Syntax: 
          %{VariableName}
          %{VariableName, DataType}    *
          %{VariableName, DataType, ColumnName}  *
          *  Used if Output Type is Database.
               If DataType is omitted, the default data type is used.
Example: 
          %{SrcUriIn}
          %{SrcUriIn,VARCHAR(255),CallerURI}
Properties Variables
      Syntax: 
          %{&PropertyName}
          %{&PropertyName, DataType}    *
          %{&PropertyName, DataType, ColumnName}  *
          *  Used if Output Type is Database.
               If DataType is omitted, VARCHAR(255) is used.
      Example: 
        %{&my.value}
Matching Functions/Variables
      Syntax: 
          %{$FunctionNmae}
          %{$FunctionNmae, DataType, ColumnName}  *
          *  Used if Output Type is Database.
               ColumnName should not be omitted.
               If DataType is omitted, VARCHAR(255) is used.
      Example:
           %{$getSIPuser($header(“Remote-Party-ID”)),,RPI}

 

List of CDR Variables
Session Information
CDR Variables Default Data Type for SQL Description
%{sid} BIGINT SID
%{did} INTEGER Dispatcher ID
%{callidin} VARCHAR(127) Call-ID IN
%{callidout} VARCHAR(127) Call-ID OUT
%{confid} VARCHAR(40) Conference ID
%{sipmethod} VARCHAR(15) SIP Method
%{rulename} VARCHAR(255) Rule name
%{sessionplg} VARCHAR(127) Session Plugin
%{sph} INTEGER Spiral-Hop
%{nat} VARCHAR(44) NAT type
%{b2b} BOOLEAN B2B-UA mode
%{rtp} BOOLEAN RTP-Relay
%{priority} VARCHAR(40) Priority
%{refresher} TINYINT Refresher of the Session-Timer (RFC4028)
%{hostname} VARCHAR(255) Host Name
%{routechoice} TINYINT Route Choice of Failover Plugin
%{cntpacket} SMALLINT SIP Packet Counts
%{rescode18x} SMALLINT Response Code of 18x
%{memory} BIGINT Used Memory
Result 
CDR Variables Default Data Type for SQL Description
%{resultcode} SMALLINT Brekeke internal result code
%{resultphrase} VARCHAR(127) Result phrase
%{codesip} SMALLINT SIP response code
%{codeq931} SMALLINT Disconnect cause ITU-T Q.931 code
%{lastphase} VARCHAR(12) Last Phase before disconnect
%{disconnectby} VARCHAR(6) Disconnect-by
URI, Address and  User
CDR Variables Default Data Type for SQL Description
%{authname} VARCHAR(32) Authorized Name
%{srcuriin} VARCHAR(255) Source URI IN
%{srcuriout} VARCHAR(255) Source URI OUT
%{dsturiin} VARCHAR(255) Destination URI IN
%{dsturiout} VARCHAR(255) Destination URI OUT
%{srcnamein} VARCHAR(255) Source Name IN
%{srcnameout} VARCHAR(255) Source Name OUT
%{dstnamein} VARCHAR(255) Destination Name IN
%{dstnameout} VARCHAR(255) Destination Name OUT
%{srcdomainin} VARCHAR(255) Source Domain IN
%{srcdomainout} VARCHAR(255) Source Domain OUT
%{dstdomainin} VARCHAR(255) Destination Domain IN
%{dstdomainout} VARCHAR(255) Destination Domain OUT
%{srcdispin} VARCHAR(64) Source Display Name IN
%{srcdispout} VARCHAR(64) Source Display Name OUT
%{srcipaddr} VARCHAR(47) Source IP address
%{dstipaddr} VARCHAR(47) Destination IP address
%{srcipport} VARCHAR(47) Source IP address and port
%{dstipport} VARCHAR(47) Destination IP address and port
%{srcif} VARCHAR(47) Source side interface
%{dstif} VARCHAR(47) Destination side interface
%{srctransport} VARCHAR(16) Source Transport
%{dsttransport} VARCHAR(16) Destination Transport
%{srcua} VARCHAR(64) Source User-Agent
%{dstua} VARCHAR(64) Destination User-Agent
Media (RTP-relay is required) 
CDR Variables Default Data Type for SQL Description
%{uacmedia} VARCHAR(11) UAC’s Media
%{uasmedia} VARCHAR(11) UAS’s Media
%{uacaudiocodec} VARCHAR(4) UAC’s Audio Codec Payload Type
%{uasaudiocodec} VARCHAR(4) UAS’s Audio Codec Payload Type
%{uacvideocodec} VARCHAR(4) UAC’s Video Codec Payload Type
%{uasvideocodec} VARCHAR(4) UAS’s Video Codec Payload Type
%{uacaudiopacket} BIGINT UAC’s Audio packets
%{uasaudiopacket} BIGINT UAS’s Audio packets
%{uacvideopacket} BIGINT UAC’s Video packets
%{uasvideopacket} BIGINT UAS’s Video packets
%{uacaudiobyte} BIGINT UAC’s Audio byte
%{uasaudiobyte} BIGINT UAS’s Audio byte
%{uacvideobyte} BIGINT UAC’s Video byte
%{uasvideobyte} BIGINT UAS’s Video byte
Time Stamps (formatted string)
CDR Variables Default Data Type for SQL Description
%{timecurrentf} TIMESTAMP Current Time
%{timelistenerf} TIMESTAMP Time Listener In
%{timedispatcherf} TIMESTAMP Time Dispatcher In
%{timedialplanf} TIMESTAMP Time DialPlan was processed
%{timepluginf} TIMESTAMP Time Session Plugin was started
%{timeinvitef} TIMESTAMP Time INVITE was processed
%{time100f} TIMESTAMP Time 100 was processed
%{timeringf} TIMESTAMP Time 18x was processed
%{timeacceptf} TIMESTAMP Time 2xx was received
%{timeconnectf} TIMESTAMP Time ACK was received
%{timerejectf} TIMESTAMP Time an error response was received
%{timeendf} TIMESTAMP Time session was closed
%{lensessionf} VARCHAR(40) Session duration
%{lencallf} VARCHAR(40) Call duration
%{lencallroundf} VARCHAR(40) Rounded Call duration
%{pddf} VARCHAR(40) Post dial delay
%{scdf} VARCHAR(40) Session connect delay
Time Stamps (digit value)
CDR Variables Default Data Type for SQL Description
%{timecurrent} BIGINT Current Time
%{timelistener} BIGINT Time Listener In
%{timedispatcher} BIGINT Time Dispatcher In
%{timedialplan} BIGINT Time DialPlan was processed
%{timeplugin} BIGINT Time Session Plugin was started
%{timeinvite} BIGINT Time INVITE was processed
%{time100} BIGINT Time 100 was processed
%{timering} BIGINT Time 18x was processed
%{timeaccept} BIGINT Time 2xx was received
%{timeconnect} BIGINT Time ACK was received
%{timereject} BIGINT Time an error response was received
%{timeend} BIGINT Time session was closed
%{lensession} BIGINT Session duration
%{lencall} BIGINT Call duration
%{lencallround} BIGINT Rounded Call duration
%{pdd} BIGINT Post dial delay
%{scd} BIGINT Session connect delay
Brekeke PBX
CDR Variables Default Data Type for SQL Description
%{pbx_tenant} VARCHAR(50) Tenant Name
%{pbx_room_id} BIGINT Room ID (RID)
%{pbx_talker_id} BIGINT Talker ID (TID)
%{pbx_user} VARCHAR(50) PBX User
%{pbx_owner} VARCHAR(50) Call Owner
%{pbx_ars} VARCHAR(50) ARS Name
%{pbx_tag} VARCHAR(255) PBX Tag
%{pbx_pin} VARCHAR(255) PIN
%{pbx_var} VARCHAR(255) PBX variable
Reason header
CDR Variables Default Data Type for SQL Description
%{reason_protocol} VARCHAR(10) Reason header’s protocol
%{reason_cause} SMALLINT Reason header’s cause value
%{reason_text} VARCHAR(50) Reason header’s text field

 

Yes No
Suggest Edit