i don't think it be possible to do the job with microcontroller only ,
you should use a chip for detecting tones and a microcontroller to manage it .
you can use CMX867 , modem IC wich can do what you have said , both detecting and transmitting these tones and many more functions.