DUNDi Howto

DUNDi HOWTO

Generate keys and get preliminary information

Generate keys on both hosts
cd /usr/local/share/callweaver/keys/ && callweaver_genkey -n `hostname`

We’re going to pretend we have “host1” and “host2” from the previous step

scp .pub key from each host to the other host’s keydir (i.e. /usr/local/share/callweaver/keys/)
root@host1# scp "/usr/local/share/callweaver/keys/`hostname`.pub" host2:/usr/local/share/callweaver/keys/
Make sure the callweaver user has ownership (or at least permissions) to the key files
chown callweaver:callweaver /usr/local/share/callweaver/keys/*
On each host at the CLI, do the following
CLI> dundi show entityid

Set up the dundi.conf to allow lookups from one host to the other

Put these mappings on both hosts (you may have to change ${IPADDR} to your FQDN or external IP on a multihomed system)

priv => dundi-my-dids,0,IAX2,priv:${SECRET}@${IPADDR}/${NUMBER},nopartial
priv => dundi-registered-users,100,IAX2,priv:${SECRET}@${IPADDR}/${NUMBER},nopartial
priv => dundi-pstn,400,IAX2,priv:${SECRET}@${IPADDR}/${NUMBER},nopartial

Use host1’s EID here and put this in the dundi.conf file on host2

[00:00:00:00:00:00]
model = symmetric
host = host1.example.com
inkey = host1
outkey = host2
include = priv
permit = priv
qualify = no
order = primary

Use host2’s EID here and put this in the dundi.conf file on host1

[99:99:99:99:99:99]
model = symmetric
host = host2.example.com
inkey = host2
outkey = host1
include = priv
permit = priv
qualify = no
order = primary

Set up your iax or sip peer(s) to allow calls

iax.conf

[priv]
type=user
dbsecret=dundi/secret
context=dundi-accept

sip.conf

[dundi]
type=user
dbsecret=dundi/secret
context=dundi-accept

Set up the contexts in your extensions.conf

[dundi-my-dids]
; these are your DID's
exten => 17775551234,1,NoOp() ;this just needs to be here to make the loopup succeed

[dundi-registered-users]
; you can set the "regcontext" in sip.conf so all registered users get a NoOp() extension here

[dundi-pstn]
; local calling for you, or whatever you want to terminate for others

[dundi-accept]
exten => _X.,Proc(YourOutgoingCallProcessor|${EXTEN})

[dundi-out]
switch => DUNDi/priv