The dundi.conf File

It is often useful to be aware of the options available to us prior to delving into the configuration file, but feel free to skip this section for now and come back to reference particular options after you’ve got your initial configuration up and working.

There are three sections in the dundi.conf file: the [general] section, the [mappings] section, and the peer definitions, such as [FF:FF:FF:FF:FF:FF]. We’ll show the options available for each section in separate tables.

Table 23.1, “Options available in the [general] section” lists the options available in the [general] section of dundi.conf.

Table 23.1. Options available in the [general] section

OptionDescription
department Used when querying a remote system’s contact information. An example might be: Communications.
organization Used when querying a remote system’s contact information. An example might be: ShiftEight.org.
locality Used when querying a remote system’s contact information. An example might be: Toronto.
stateprov Used when querying a remote system’s contact information. An example might be: Ontario.
country Used when querying a remote system’s contact information. An example might be: Canada.
email Used when querying a remote system’s contact information. An example might be: support@shifteight.org
phone Used when querying a remote system’s contact information. An example might be: +1-416-555-1212
bindaddr Used to control which IP address the system will bind to. This can only be an IPv4 address. The default is 0.0.0.0, meaning the system will listen (and respond) on all available interfaces.
port The port to listen for requests on. The default is 4520.
tos The Terms of Service or Quality of Service (ToS/QoS) value to be used for requests. See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for more information about the values available and how to use them.
entityid The entity ID of the system. Should be an externally (network) facing MAC address. The format is 00:00:00:00:00:00.
cachetime How long peers should cache our responses for, in seconds. The default is 3600.
ttl The time-to-live, or, maximum depth to search the network for a response. The maximum wait time for a response is calculated using (2000 + 200 * ttl) ms.
autokill Used to control how long we wait for an ACK to our DPDISCOVER. Setting this timeout prevents the lookups from stalling due to a latent peer. This can be yes, no, or a numeric value representing the number of milliseconds to wait. You can use the qualify option to enable this per-peer.
secretpath A rotating key is created and stored within the AstDB. The value is stored in the key ’secret’ under the family defined by secretpath. The default secretpath is dundi, resulting in the key being stored in dundi/secret by default.
storehistory Used to indicate whether or not the history of the last several requests should be stored in memory, along with how long the requests took. Valid values are yes and no (also available using the CLI commands dundi store history and dundi no store history). This is a debugging tool that is disabled by default due to possible performance impacts.

Table 23.2, “Options available in the [mappings] section” lists the options you can configure in the [mappings] section of dundi.conf.

Table 23.2. Options available in the [mappings] section

OptionDescription
nounsolicited Used for advertising no unsolicited calls to the returned result. Used in public networks.
nocomunsolicit Used for advertising no commercial unsolicited calls to the returned result. Used in public networks.
residential Used to define the route returned as being a residential location. Used in public networks.
commercial Used to define the route returned as being a commercial location. Used in public networks.
mobile Used to define the route returned as being a mobile phone. Used in public networks.
nopartial Used to prevent partial number lookups from being performed against this mapping.
${NUMBER} Variable that contains the value of the request being looked up.
${IPADDR} Variable that contains the IP address of the local system. Can be used to dynamically construct mapping responses. Not recommended.
${SECRET} Variable that contains the value of the rotating secret key as defined in the secretpath location within the AstDB.

Finally, Table 23.3, “Options available for peer definitions in dundi.conf” lists the options available in the peer sections of dundi.conf.

Table 23.3. Options available for peer definitions in dundi.conf

OptionDescription
inkey The inbound authentication key.
outkey The key used for authentication to the remote peer.
host The hostname or IP address of the remote peer.
port The port on which to communicate with the remote peer.
order The search order associated with this peer. Values include primary, secondary, tertiary, and quartiary. Will only search primary peers unless none are available, in which case secondary peers will be searched, and so on.
include Used to control whether this peer is included in searches for the mapping defined. Can be set to the value of all if used for all mappings.
noinclude Used to control whether this peer is excluded from searches for the mapping defined. Can be set to all if this peer should be excluded from all lookups.
permit Used to control whether this peer can perform lookups against a particular mapping. If the value is set to all, this peer can search against all defined mappings.
deny Used to control which mappings this peer is restricted from searching. The value can be set to all to restrict this peer from being able to perform any lookups against defined mappings.
model Used to control whether this peer can receive requests (inbound), transmit requests (outbound) or do both (symmetric).
precache Typically used when we have a node with only a few routes that wants to push those values up to another node that is providing more responses (this is known as precaching, providing an answer when no request has been received). The values include outgoing, incoming, and symmetric. If this is set to outgoing, we push routes to this peer. If set to incoming, we receive routes from this peer. If set to symmetric, we do both.