Answerphone tone detection


I am trying to create an application that is dependent upon being able to detect when voicemail / an answerphone has answered the call. I am hoping to be able to do this by Asterisk detecting the ‘Beep’ (as in ‘please leave your message after the beep’). I have not been able to find any documentation on how to do this. If you can set me off in the right direction it would be much appreciated.