I've done some experiments on that, with partial success. Here are the findings:

1. You can initiate voicemail detection for current channel in mod_httapi script:

<work>
        <execute application="avmd">start</execute>

this will run the detection procedure until it's terminated later in the work script

<execute application="avmd">stop</execute>

of course you need to enable 'avmd' application in mod_httapi config


2. According to the docs, mod_avmd is supposed to set avmd_detect channel variable after detecting voicemail
So, I thought I can get this variable to my httapi scirpt with

<getVariable name="avmd_detect" />

(you need to enable get permission for this variable in mod_httapi config )

Unfortunately, the variable is never returned to mod_httapi (it's not present in request headers), even after mod_avmd detects the voicemail (there's an avmd::beep event reported for that channel)
Do you know what i'm doing wrong?
My workaround for this would be to subscribe to avmd::beep events throug event socket and receive them there, bypassing http. But this is more difficult and introduces additional complexity to application.

Best regards
RG



On Tue, Sep 17, 2013 at 7:16 PM, Rafal Gwizdala <rafal.gwizdala@gmail.com> wrote:
Hi, is it possible to use mod_avmd from mod_httapi xml scripts? I'd like the script to recognize if voicemail is being recorded and if so, play a message dedicated for that purpose. 
Thanks
Rafal