#
# Digital Voice Modem - Conference FNE Software Configuration
#

# Flag indicating whether the host will run as a background or foreground task.
daemon: true

#
# Logging Configuration
#   Logging Levels:
#     1 - Debug
#     2 - Message
#     3 - Informational
#     4 - Warning
#     5 - Error
#     6 - Fatal
#
log:
    # Console display logging level (used when in foreground).
    displayLevel: 1
    # File logging level.
    fileLevel: 1
    # Full path for the directory to store the log files.
    filePath: .
    # Flag indicating file logs should be sent to syslog instead of a file.
    useSyslog: false
    # Full path for the directory to store the activity log files.
    activityFilePath: .
    # Log filename prefix.
    fileRoot: DVM

#
# Master
#
master:
    # Network Peer ID
    peerId: 9000100
    # Hostname/IP address to listen on (blank for all).
    address: 0.0.0.0
    # Port number to listen on.
    port: 62031
    # FNE access password.
    password: RPT1234
    # Flag indicating whether or not verbose logging is enabled.
    verbose: true
    # Flag indicating whether or not verbose debug logging is enabled.
    debug: false

    # Maximum permitted connections (hard maximum is 250 peers).
    connectionLimit: 100

    # Flag indicating whether or not peer pinging will be reported.
    reportPeerPing: true

    # Flag indicating whether or not master endpoint networking is encrypted.
    encrypted: false
    # AES-256 32-byte Preshared Key
    #   (This field *must* be 32 hex bytes in length or 64 characters
    #    0 - 9, A - F.)
    presharedKey: "000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F"

    # Flag indicating whether or not DMR traffic will be passed.
    allowDMRTraffic: true
    # Flag indicating whether or not P25 traffic will be passed.
    allowP25Traffic: true
    # Flag indicating whether or not NXDN traffic will be passed.
    allowNXDNTraffic: true

    # Flag indicating whether packet data will be passed.
    disablePacketData: false
    # Flag indicating whether verbose dumping of data packets is enabled.
    dumpDataPacket: false

    # Delay from when a call on a parrot TG ends to when the playback starts (in milliseconds).
    parrotDelay: 2000
    # Flag indicating whether or not a parrot TG call will generate a grant demand.
    parrotGrantDemand: true
    # Flag indicating whether or not a parrot TG call will only be sent to the originating peer.
    parrotOnlyToOrginiatingPeer: false

    # Flag indicating whether or not a grant responses will only be sent to TGs with affiliations, if the TG is configured for affiliation gating.
    restrictGrantToAffiliatedOnly: false

    # Flag indicating whether or not a adjacent site broadcasts will pass to any peers.
    disallowAdjStsBcast: false
    # Flag indicating whether or not a P25 ADJ_STS_BCAST will pass to connected external peers.
    disallowExtAdjStsBcast: true
    # Flag indicating whether or not a conventional site can override affiliation rules.
    allowConvSiteAffOverride: true

    # Flag indicating that traffic headers will be filtered by destination ID (i.e. valid RID or valid TGID).
    filterHeaders: true
    # Flag indicating that terminators will be filtered by destination ID (i.e. valid RID or valid TGID).
    filterTerminators: true

    # List of peers that unit to unit calls are dropped for.
    dropUnitToUnit: []

    # Flag indicating whether or not InfluxDB logging and metrics recording is enabled.
    enableInflux: false
    # Hostname/IP address of the InfluxDB instance to connect to.
    influxServerAddress: 127.0.0.1
    # Port number of the InfluxDB instance to connect to.
    influxServerPort: 8086
    # API Token to access the InfluxDB instance API.
    influxServerToken: "APITOKEN"
    # Organization Name on InfluxDB instance API.
    influxOrg: "dvm"
    # Data Bucket Name on InfluxDB instance API.
    influxBucket: "dvm"
    # Flag indicating whether TSBK/CSBK/RCCH messages will be logged to InfluxDB.
    influxLogRawData: false

    #
    # Talkgroup Rules Configuration
    #
    talkgroup_rules:
        # Full path to the talkgroup rules file.
        file: talkgroup_rules.yml
        # Amount of time between updates of talkgroup rules file. (minutes)
        time: 30

#
# External Peers
#
peers:
    - name: EXAMPLEPEER
      # Flag indicating whether or not the peer is enabled.
      enabled: true
      # Hostname/IP address of the FNE master to connect to.
      masterAddress: 127.0.0.1
      # Port number of the FNE master to connect to.
      masterPort: 32090
      # FNE access password.
      password: RPT1234
      # Textual identity of this peer.
      identity: EXPEER
      # Network Peer ID
      peerId: 9000990

      # List of peer IDs to block sending traffic to from this peer.
      blockTrafficTo: []

      # Flag indicating whether or not peer endpoint networking is encrypted.
      encrypted: false
      # AES-256 32-byte Preshared Key
      #   (This field *must* be 32 hex bytes in length or 64 characters
      #    0 - 9, A - F.)
      presharedKey: "000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F"

      # 
      rxFrequency: 0
      #
      txFrequency: 0
      # Latitude.
      latitude: 0.0
      # Longitude.
      longitude: 0.0
      # Textual location for this host.
      location: Anywhere, USA

      # Flag indicating whether or not verbose debug logging is enabled.
      debug: false

#
# System Configuration
#
system:
    # Time in seconds between pings to peers.
    pingTime: 5
    # Maximum number of missable pings before a peer is considered disconnected.
    maxMissedPings: 10

    # Time in minutes between updates of the talkgroup rules.
    tgRuleUpdateTime: 10

    # Flag indicating the TGID information for this master will be sent to its peers.
    sendTalkgroups: true

    # Flag indicating the FNE should use an alternate port dedicated to diagnostic and activity
    # log processing. This port number is always: master port + 1 (so for example, a master port
    # of 62031 will use 62032 for diagnostic and activity messages.)
    # NOTE: Disabling useAlternatePortForDiagnostics will result in some tools like, SysView, to stop working properly.
    #   SysView requires useAlternatePortForDiagnostics to receive peer status updates.
    useAlternatePortForDiagnostics: true
    # Flag indicating whether or not the host activity log will be sent to the network.
    # NOTE: Disabling allowActivityTransfer will result in some tools like, SysView, to stop working properly.
    #   SysView requires allowActivityTransfer to receive peer status updates.
    allowActivityTransfer: true
    # Flag indicating whether or not the host diagnostic log will be sent to the network.
    allowDiagnosticTransfer: true

    # Flag indicating whether or not REST API is enabled.
    restEnable: false
    # IP address of the network interface to listen for REST API on (or 0.0.0.0 for all).
    restAddress: 127.0.0.1
    # Port number for REST API to listen on.
    restPort: 9990
    # Flag indicating whether or not REST API is operating in SSL mode.
    restSsl: false
    # HTTPS/TLS certificate.
    restSslCertificate: web.crt
    # HTTPS/TLS key file.
    restSslKey: web.key
    # REST API authentication password.
    restPassword: "PASSWORD"
    # Flag indicating whether or not verbose REST API debug logging is enabled.
    restDebug: false

    #
    # Radio ID ACL Configuration
    #
    radio_id:
        # Full path to the Radio ID ACL file.
        file: rid_acl.dat
        # Amount of time between updates of Radio ID ACL file. (minutes)
        time: 2

    #
    # Peer whitelist and blacklist configuration
    #
    peer_acl:
        # Flag indicating whether or not the peer ACLs are enabled.
        enabled: false
        # Peer ACL mode: whitelist or blacklist
        mode: whitelist
        # Full path to the white/blacklist file.
        file: peer_list.dat
        # Amount of time between updates of white/blacklist file. (minutes)
        time: 2

#
# Packet Data Virtual Network Tunnel Configuration
#
vtun:
    # Flag indicating the virtual network tunnel is enabled.
    # (If this is enabled, dvmfne must be run as root to create the TUN interface.)
    enabled: false
    # Operational mode for the network tunnel (dmr or p25).
    digitalMode: p25

    # Kernel Interface Name
    interfaceName: fne0
    # IP address of the tunnel network interface
    address: 192.168.1.254
    # Netmask of the tunnel network interface
    netmask: 255.255.255.0
    # Broadcast address of the tunnel network interface
    broadcast: 192.168.1.255
