If you are using a standard system with a normal distribution (such as Fedora or Centos or something like that), download just-sources.tar.gz, and un-tar it into /usr/src. You will have to build from scratch, and remember, in asterisk, run make menuselect, setting the 'LOW_MEMORY' and 'RADIO_RELAX' compiler flags and enabling the 'app_rpt' application.
If you are running an embedded system using Limey Linux, then download mkdevel into /usr/local/bin, and download ncurincl.tgz (ncurses headers), and astsrc.tgz into /mnt/cf. Make sure to chown /usr/local/bin/mkdevel to 755. You can then mkdevel to make the new stuff.