# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. cisco_voice_router = { plugin_version = "1.0.2" info.1.manufacturer = "Cisco Systems" info.1.device = "Voice Router" info.1.version.1 = "" # 2006-05-04 - 1.0.1 fixed bug where "hits" was being set to 1 instead of "calls" # 2010-10-26 - 1.0.2 - MSG - Edited info lines. # The name of the log format log.format.format_label = "Cisco Voice Router" log.miscellaneous.log_data_type = "syslog_required" log.miscellaneous.log_format_type = "network_device" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "(Cisco Voice Router|VOIP_CALL_HISTORY:)" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { calllegtype = "" connectionid = "" setuptime = "" peeraddress = "" peersubaddress = "" disconnectcause = "" disconnecttext = "" connecttime = "" disconnecttime = "" callorigin = "" chargedunits = "" infotype = "" transmitpackets = "" transmitbytes = "" receivepackets = "" receivebytes = "" duration = "" } # log.fields log.filter_initialization = ` v.name_value_pairs = ""; ` # Log Parsing Filters log.parsing_filters.parse = ` if (matches_regular_expression(v.syslog_message, '%[^:]*: (.*)$')) then ( v.pairs_string = $1; split(v.pairs_string, ', ', 'v.name_value_pairs'); node pair; foreach pair 'v.name_value_pairs' ( if (matches_regular_expression(node_value(pair), "^([^ ]+) (.*)$")) then ( set_collected_field('', lowercase($1), $2); ) ); # Compute duration if (matches_regular_expression(get_collected_field('', 'connecttime'), '^[.*]*([0-9:]+)\\\\.[0-9]+ [^ ]+ [A-Za-z]+ ([A-Za-z]+) ([0-9]+) ([0-9]+)')) then ( v.day = $3; if (length(v.day) == 1) then v.day = '0' . v.day; v.connecttime = date_time_to_epoc(v.day . '/' . $2 . '/' . $4 . ':' . $1); if (matches_regular_expression(get_collected_field('', 'disconnecttime'), '^[.*]*([0-9:]+)\\\\.[0-9]+ [^ ]+ [A-Za-z]+ ([A-Za-z]+) ([0-9]+) ([0-9]+)')) then ( v.day = $3; if (length(v.day) == 1) then v.day = '0' . v.day; v.disconnecttime = date_time_to_epoc(v.day . '/' . $2 . '/' . $4 . ':' . $1); set_collected_field('', 'duration', v.disconnecttime - v.connecttime); ); ); # Accept the entry accept_collected_entry('', false); ); ` #Log Filters log.filters = { 1 = { disabled = "false" label = "Remove call history feature lines" comment = "" value = "if (matches_regular_expression(v.syslog_message,'%VOIPAAA-5-VOIP_FEAT_HISTORY')) then 'reject';" position = "0" } # 1 } # Database fields database.fields = { calllegtype = "" connectionid = "" setuptime = "" peeraddress = "" peersubaddress = "" disconnectcause = "" disconnecttext = "" connecttime = "" disconnecttime = "" callorigin = "" infotype = "" } # database.fields database.numerical_fields = { calls.default = true transmitpackets = "" receivepackets = "" chargedunits = "" transmitbytes = { type = "float" display_format_type = "bandwidth" } receivebytes = { type = "float" display_format_type = "bandwidth" } duration = { type = "float" display_format_type = "duration_compact" } } # database.numerical_fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'calls = 1;' } # mark_entry } # log.filters create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" calllegtype = true peeraddress = true peersubaddress = true disconnectcause = true disconnecttext = true callorigin = true infotype = true } # report_groups } # create_profile_wizard_options } # cisco_voice_router