Page 335 - Asterisk™: The Future of Telephony
P. 335
When you create a call file, do not do so from the spool directory. As-
terisk monitors the spool aggressively and will try to grab your file before
you’ve even finished writing it! Create call files in some other folder,
make a copy in the same folder, and then mv the copy into the spool
directory. Note that we said mv, not cp. This is important, because the
way that Linux copies files means that the file appears in the destination
folder before it is completely there. Contrast that with a mv operation,
which will not allow the file to appear in the destination folder until the
move operation is complete. If you copy, there is a very good chance
that Asterisk will read the file before it is all there, which will cause
unexpected results.
DUNDi
If there were any concerns that Mark Spencer was in danger of running out of good
ideas, Distributed Universal Number Discovery (DUNDi) ought to lay such thoughts
to rest. DUNDi is poised to be as revolutionary as Asterisk. The DUNDi web site (http://
www.dundi.com) says it best: “DUNDi™ is a peer to peer system for locating Internet
gateways to telephony services. Unlike traditional centralized services (such as the re-
markably simple and concise ENUM standard; http://www.faqs.org/rfc/rfc2916.txt),
DUNDi is fully distributed with no centralized authority whatsoever.” DUNDi is
somewhat of a routing protocol for VoIP.
How Does DUNDi Work?
Think of DUNDi as a large phone book that allows you to ask peers if they know of an
alternative VoIP route to an extension number or PSTN telephone number.
For example, assume that you are connected to the DUNDi-test network (a free and
open network that terminates calls to traditional PSTN numbers). You ask your friend
Bob if he knows how to reach 1-212-555-1212, a number for which you have no direct
access. Bob replies, “I don’t know how to reach that number, but let me ask my peer
Sally.”
Bob asks Sally if she knows how to reach the requested number, and she responds with,
“You can reach that number at IAX2/dundi:very_long_password@hostname/extension.”
Bob then stores the address in his database and passes on to you the information about
how to reach 1-800-555-1212 via VoIP, allowing you an alternative method of reaching
the same destination through a different network.
Because Bob has stored the information he found, he’ll be able to provide it to any peers
who later request the same number from him, so the lookup won’t have to go any
further. This helps reduce the load on the network and increases response times for
numbers that are looked up often. (However, it should be noted that DUNDi creates
a rotating key and, thus, stored information is valid for a limited period of time.)
DUNDi | 307