What is DUNDi

From TD-er's Wiki
Jump to navigationJump to search

What is DUNDi?

DUNDi is a p2p system, used to to translate phone numbers to VoIP-addresses.

It works very much like the DNS system, or a phone book. Only difference with the DNS system is that you are only advertising your own numbers. The difference with the phonebook is that you don't have all pages, but those are spread among the peers in the network.

It can be used in private or public networks. For use in public networks, you will have to agree to the General Peering Agreement.


How does it work?

Ask a friend, and they ask their friends until someone knows the answer.

Even if you didn’t request it, remember it for a period of time (cache), in order to put less strain on the network.

This answer to a DUNDi lookup will tell you about how to reach the phone (extension) you want. Most often these directions will not lead you directly to the phone on the other end, but it will lead you to a point where they will connect you.

DUNDi call flow

For a DUNDi-lookup, followed by a call, several config-files will play a role.

  1. Initial DUNDi request from end point and authentication
  2. Internal lookup in dialplan to determine if we should reply
  3. If found, pass information back to DUNDi module
  4. Reply is sent back to requesting node
  5. Incoming call setup and authentication
  6. Call is controlled via dialplan logic



Basic configuration

  • Create a set of keys using astkeygen
  • Place keys in /var/lib/asterisk/keys and distribute public key to DUNDi peers (also be sure to initialize the keys!)
  • Configure dundi.conf to control advertisements and lookups
  • Configure extensions.conf to control what we advertise
  • Configure a channel configuration file (sip.conf, iax.conf) for incoming calls
  • verify pbx_dundi.so module is (re)loaded in modules.conf


dundi.conf

  • Used to control how we reply to requests
  • Controls “DUNDi peers” <= used to control who we will reply to, and who we will use to send requests
  • Can setup multiple groups / networks

Dialplan (extensions.conf)

  • Controls what we advertise and how to handle the call
  • Can use the same context for both advertisements and call handling – or separate contexts (recommended)
  • Can use pattern matching to advertise “ranges”


Channel configuration file

  • Controls the authentication of the incoming call and delivery to incoming context (as per usual Asterisk fashion)
  • Usually via iax.conf, but not necessarily
  • Authentication using dbsecret to pull rotating key from AstDB

DUNDi as a routing protocol