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("avmd_start","detection_mode=2,inbound_channel=1,outbound_channel=1,debug=1") session:execute("loop_playback", '+5 call-waiting.wav') session:execute("avmd_stop")
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?"