in reply to Re^2: Socket programmingin thread Socket programming
Also see Net::SIP, which should have large parts of a SIP client and server.