[Asterisk-Dev] couldn't hear anything while playing file

Timur V. Elzhov Timur.Elzhov at jinr.ru
Wed Aug 17 07:57:00 MST 2005


Dear Asterisk users,

I'd like to slightly modify voicemail application, and I want to play
the file, say its name will is msg_file_name, which is assigned
to string "/var/spool/asterisk/voicemail/cheetara_vm/incoming/5aec208f"
(in that directory there are three sound files with name "5aec208f",
with wav, WAV, and gsm extensions)

So in order to play it, I use that code:

    res = ast_fileexists(msg_file_name, NULL, NULL);
    if (res <= -1)
        ast_log(LOG_WARNING, "File '%s' doesn't exist!\n", msg_file_name);
    else {
        res = ast_streamfile(chan, msg_file_name, chan->language);
        if (res >= 0)
            res = ast_waitstream(chan, "");
    }

Asterisk logs:

    -- Executing VoiceMailMain("SIP/2202-4110", "7702|d") in new stack
('d' is my own option, don't pay attention)

    -- Playing '/var/spool/asterisk/voicemail/cheetara_vm/incoming/5aec208f' (language 'en')
    == Auto fallthrough, channel 'SIP/2202-4110' status is 'UNKNOWN'

The ast_waitstream(chan, "") call returns zero.
So all the seem OK, but, I hear nothing :-/ (sure, any of that file is
successfully played with "play" command.)

I have no problem with sound in Asterisk, i.e. I successfully hear any
other Asterisk greeting.

Where am I wrong?
Much thanks.


-- 
Best regards,
Timur Elzhov




More information about the asterisk-dev mailing list