It may be interesting to have a look at the 74-Line IP Telephone article which Lincoln D. Stein wrote for the Perl Journal which can be found here. This article has been incorporated into the recently published O'Reilly title Computer Science and Perl Programming.