[asterisk-dev] Generic analysis of incoming voice packets

Juan Carlos Castro y Castro jcastro at vialink.com.br
Mon Feb 13 07:35:27 MST 2006


I'd like to be able to examine incoming voice packets on a call and
determine what they are -- silence? DTMF? human voice? Fax tone? Noise?

I took a look at app_rxfax.c and at the doxygen-generated spandsp
documentation, but I couldn't find a function that gets a block of audio
samples that can contain anything and analyzes them. The rxfax main loop,
although it looks promising, is fax-specific:

        while (ast_waitfor(chan, -1) > -1)
        {
            inf = ast_read(chan);
            if (inf == NULL)
            {
                res = -1;
                break;
            }
            if (inf->frametype == AST_FRAME_VOICE)
            {
                if (fax_rx(&fax, inf->data, inf->samples))
                    break;

Instead of fax_rx(), I want to put something that takes the samples and
determines with passable accuracy what the netherworld they are. What should
I be looking at?

Thnx n dvnc,
Juan

__________________________________________________________
Mensagem enviada usando o Webmail da ViaLink ver. 2.7.8





More information about the asterisk-dev mailing list