System information

country=CA
email=support@toronto.example.com
phone=+14165551212
;
; Specify bind address and port number. Default is port 4520.
;bindaddr=0.0.0.0
port=4520
entityid=FF:FF:FF:FF:FF:FF
ttl=32
autokill=yes
;secretpath=dundi
The entity identifier defined by entityid should generally be the Media Access Control
(MAC) address of an interface in the machine. The entity ID defaults to the first Ethernet
address of the server, but you can override this with entityid, as long as it is set to the
MAC address of something you own. The MAC address of the primary external interface
is recommended. This is the address that other peers will use to identify you.
The time-to-live (ttl) field defines how many hops away the peers we receive replies
from can be and is used to break loops. Each time a request is passed on down the line
because the requested number is not known, the value in the TTL field is decreased by
one, much like the TTL field of an ICMP packet. The TTL field also defines the max-
imum number of seconds we are willing to wait for a reply.
When you request a number lookup, an initial query (called a DPDISCOVER) is sent to
your peers requesting that number. If you do not receive an acknowledgment (ACK) of
your query (DPDISCOVER) within 2000 ms (enough time for a single transmission only)
and autokill is set to yes, Asterisk will send a CANCEL to the peers. (Note that an ac-
knowledgment is not necessarily a reply to the query; it is just an acknowledgment that
the peer has received the request.) The purpose of autokill is to keep the lookup from
stalling due to hosts with high latency. In addition to the yes and no options, you may
also specify the number of milliseconds to wait.
The pbx_dundi module creates a rotating key and stores it in the local Asterisk database
(AstDB). The key name secret is stored in the dundi family. The value of the key can
be viewed with the database show command at the Asterisk console. The database
family can be overridden with the secretpath option.
We need another peer to interact with, so here’s the configuration for the other node:
; DUNDi configuration file for Vancouver
;
[general]
;
department=IT
organization=vancouver.example.com
locality=Vancouver
stateprov=BC
country=CA
email=support@vancouver.example.com
phone=+16135551212
;
508 | Chapter 23:Distributed Universal Number Discovery (DUNDi)