Detect machine answer tone using mod_avmd

Hello All,

I am attempting to detect voicemails using the mod_avmd module for auto-originating calls in a Lua file.

Here is my sample code (I run the Lua file after the call is answered).

session:execute("loop_playback", '+5 call-waiting.wav')

With the above code, I am successfully getting a BEEP tone, but it’s not consistently accurate. With the same scenario, the successful BEEP detection rate is 5 or 6 out of 10 times, or about 50% to 60%.

How can I increase this success rate? Are there any parameters that need to be added to detect the tone using avmd?

Additionally, I currently need to play a WAV file for 10 to 15 seconds to receive the beep tone. Is there an alternative method to detect the tone without playing back a file?"