System information
; Specify bind address and port number. Default port is 4520.
;bindaddr=0.0.0.0
port=4520
entityid=00:00:00:00:00:00
ttl=32
autokill=yes
;secretpath=dundi
In the next section we’ll create our initial DUNDi peers.
Initial DUNDi Peer Definition
A DUNDi peer is identified by the unique layer-two MAC address of an interface on
the remote system. The dundi.conf file is where we define what context to search for
peers requesting a lookup and which peers we want to use when doing a lookup for a
particular network. The following configuration is defined in the dundi.conf file on our
Toronto system:
[00:00:00:00:00:00] ; Vancouver Remote Office
model = symmetric
host = vancouver.example.com
inkey = vancouver
outkey = toronto
qualify = yes
dynamic=yes
The remote peer’s identifier (MAC address) is enclosed in square brackets ([]). The
inkey and outkey are the public/private key pairs that we use for authentication. Key
pairs are generated with the astgenkey script, located in the ~/src/asterisk-complete/
asterisk/1.8/contrib/scripts/ source directory. We use the -n flag so that we don’t have
to initialize passwords every time we start Asterisk:
$ cd /var/lib/asterisk/keys
$ sh ~/src/asterisk-complete/asterisk/1.8/contrib/scripts/astgenkey -n toronto
We’ll place the resulting keys, toronto.pub and toronto.key, in our /var/lib/asterisk/
keys/ directory. The toronto.pub file is the public key, which we’ll post to a web server
so that it is easily accessible for anyone with whom we wish to peer. When we peer, we
can give our peers the HTTP-accessible public key, which they can then place in
their /var/lib/asterisk/keys/ directories (using something like wget).
On the Vancouver box, we’ll use the following peer configuration in dundi.conf:
[FF:FF:FF:FF:FF:FF] ; Toronto Remote Office
model = symmetric
host = toronto.example.com
inkey = toronto
outkey = vancouver
qualify = yes
dynamic=yes
Then we’ll execute the same astgenkey script on the Vancouver box to generate the
public and private vancouver keys. Finally, we’ll place the toronto.pub key on the
Configuring Asterisk for Use with DUNDi | 509