Enable logging in IraCPA

1. /usr/local/epi/conf/common_config.json of iracpa:

Set "app_detailed_log": true

Schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
    "cluster_id": {"type": "string", "minLength": 2, "maxLength": 30},
    "app_log_level": {"type": "string", "enum" : ["debug", "info", "warn", "err", "critical","trace"] },
    "enable_log": {"type": "boolean", "enum" : [true,false] },
    "log_days": {"type": "integer"},
    "app_detailed_log": {"type": "boolean", "enum" : [true,false] },
    "irawatch_subject": {"type": "string", "minLength": 5},
    "ira_license_web": {"type": "string", "minLength": 5},
    "ira_cdr_web": {"type": "string", "minLength": 5},
    "ira_http_proxy": {"type": "string", "minLength": 5},
    "ira_core_count": {"type": "integer"},
    "ira_core_thread_count": {"type": "integer"},
    "use_old_rsa_protocol": {"type": "boolean", "enum" : [true,false] },
    "app_name": {"type": "string"},
    "nats_conf_file": {"type": "string", "minLength": 2},
    "nats_conf": {"type": "object",
        "properties": {
            "nats_url": {"type": "string", "minLength": 5},
            "nats_public_key": {"type": "string", "minLength": 5},
            "nats_seed_key": {"type": "string", "minLength": 5},
            "sys_nats_public_key": {"type": "string", "minLength": 5},
            "sys_nats_seed_key": {"type": "string", "minLength": 5}
            },
        "required": ["nats_url", "nats_public_key", "nats_seed_key"]
        }
    },
    "oneOf": [{"required": ["nats_conf_file"]},{"required": ["nats_conf"]}],
    "required": [ "cluster_id"]
}

2. /usr/local/epi/conf/iracpa.json:

Set "test_mode": true

Schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
      "use_self_signed_certificate": {"type": "boolean", "enum" : [true,false] },
      "app_name": {"type": "string"},
      "wss_certificate_file": {"type": "string"},
      "wss_private_key_file": {"type": "string"},
      "wss_dh_params_file": {"type": "string"},
      "wss_password": {"type": "string"},
      "record_directory": {"type": "string", "minLength": 2},
      "http_proxy_server": {"type": "string", "minLength": 2},
      "ws_port": {"type": "integer", "minimum": 2000 },
      "wss_port": {"type": "integer", "minimum": 2000 },
      "api_http_port": {"type": "integer", "minimum": 2000 },
     "test_mode": {"type": "boolean", "enum": [true,false] },
      "request_subject": {"type": "string", "minLength": 5},
      "cpa_params": {
      "type": "array",
      "items": [
        {
            "type": "object",
            "properties": {
              "config_name": {"type": "string" },
              "tenant_id": {"type": "string" },
              "analysis": {"type": "string", "enum":["amd","sit"]},
              "min_ambient_energy": {"type": "integer", "minimum": 1},
              "initial_silence_ignore": {"type": "integer", "minimum": 0, "maximum": 5000},
              "sensitivity": {"type": "integer", "minimum": 2, "maximum": 5},
              "silence_detect_limit": {"type": "integer", "minimum": 1000, "maximum": 10000},
              "beep_to_silence_gap": {"type": "integer", "minimum": 0, "maximum": 10000},
              "tones": {"type": "object"},
              "log_voice": {"type": "boolean", "enum" : [true,false] },
              "log_rtp_history": {"type": "boolean", "enum" : [true,false] },
              "break_events": {"type": "string"},
              "amd_time_limit": {"type": "integer", "minimum": 1000, "maximum": 3000},
              "frequency_count": {"type": "integer", "minimum": 50, "maximum": 200},
              "amplitude_threshold": {"type": "integer", "minimum": 5000, "maximum": 100000},
              "detect_dtmf": {"type": "boolean", "enum" : [true,false] },
              "beep_is_am": {"type": "boolean", "enum" : [true,false] },
              "total_timeout": {"type": "integer", "minimum": 10000}
            },
            "required": [ "config_name", "tenant_id", "analysis"]
          }
        ]
      }
    },
    "anyOf": [{"required": ["ws_port"]},{"required": ["wss_port"]}],
    "required": ["use_self_signed_certificate","record_directory"]
}

After modifying the config files you will need to restart IraCPA. It is recommended to disable these settings in production environment as the logs can be quite a lot.