Hi Michael,

the cell phone carriers in the US use a beep tone that is out of the range that is typically detected. i've had success using tone_detect rather than mod_vmd. if my memory serves me correctly 786 is the tone you need to listen for. the same is true for sprint and t-mobile voice mail beeps

--matt
freeswitch based voice broadcasting - http://www.hellohunter.com/voice_broadcast.php
freeswitch based predictive dialing - http://www.hellohunter.com/predictive_dialer.php

On Wed, Mar 3, 2010 at 7:04 PM, Michael De Lorenzo <delorenzodesign@gmail.com> wrote:
Has anyone experienced issues with vmd or dtmf with Verizon wireless?  I have another script that doesn't even register digits pressed -- it's like no keys are pressed at all.

I've checked the FS log and it doesn't seem to log anything with regard to the mod_vmd other than an indication of MIN_TIME of 8000 (not sure what that does exactly).

Does anyone have any sample scripts available other than what's on the FS wiki?


On Mon, Mar 1, 2010 at 10:17 PM, Michael De Lorenzo <delorenzodesign@gmail.com> wrote:
I've got the following Lua script working in a sense, but the InputCallback never seems to get called while the file is being streamed to the call recipient.  I've tried moving the "vmd start" command and set input callback around a bit, but to no avail.  I'm testing this against a cell phone voice mailbox (Verizon).

freeswitch.consoleLog("info","########################################################\n\n");

number_to_call = argv[1]
message_to_play = "/opt/freeswitch/recordings/messages/" .. argv[2]

voicemail_detected = false;

function onInput(s, type, obj)
    freeswitch.consoleLog("notice","*********** Type?: " .. type .. " *************\n");
    -- freeswitch.consoleLog("notice","*********** VMD?: " .. session:getVariable("vmd_detect") .. " *************\n");

    if(type == "event" and voicemail_detected == false) then
        freeswitch.consoleLog("notice","************ VOICE MAIL/ANSWERING MACHINE DETECTED *************\n");
        voicemail_detected = true;
        return "break";
    end
end

function playbackMessage()
    sleep_time = 1000;
    if(voicemail_detected) then
       sleep_time = 2500;
    end
    -- sleep a second
    session:sleep(sleep_time);
    -- play a file
    session:streamFile(message_to_play);
end

function notify()
    session = freeswitch.Session("{ignore_early_media=true}sofia/gateway/voicenetwork/1" .. number_to_call)



    if(session:ready()) then
        -- answer the call
        session:answer();
        session:setInputCallback("onInput", "");
        session:execute("vmd","start");

        playbackMessage();
        if(voicemail_detected) then
            freeswitch.consoleLog("notice","************ DOING PLAYBACK FOR VOICEMAIL/ANSWERING MACHINE *************\n");
            playbackMessage();
        end

        freeswitch.consoleLog("notice", "********* hanging up session **********\n");
        -- hangup
        session:hangup();
    end
end

notify();

freeswitch.consoleLog("info","########################################################\n\n");

--
Michael De Lorenzo


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org