Asterisk Hacking

Understanding how to install and configure Asterisk is important, but for the hacking side, it s also important to understand the core of how VoIP works. This doesn t only deal with Asterisk, but VoIP in general. Asterisk uses a standard set of protocols to communicate with remote systems be it Asterisk or other types of VoIP systems and hardware.
Knowing how these VoIP protocols function will not only give you a clear picture of how Asterisk deals with VoIP, but show you how other systems work as well. Many VoIP systems deal with standardized protocols for interoperability.
In order for your voice to travel across the wires, routers, and tubes of the Internet (as Senator Ted Stevens so amusingly put it), several conversions and protocols are used. The back-end protocol for SIP and H.323, the one where your voice is actually stored in data packets, is known as the Real Time Protocol, or RTP.
Other protocols are used to get your call from one side of the Internet to the other. These are known as signaling protocols. We ll discuss these protocols later, but it s important to understand how and why RTP is used to transfer your voice. RTP uses the User Datagram Protocol (UDP), which is part of the TCP/IP suite.
Upon first glance, UDP may sound like a terrible thing to use if you re not familiar with it. It is a stateless protocol, which means UDP doesn t offer any guarantee the packet will even make it...