FÓRUM DigiVoice

Fórum de Suporte Digivoice

Você não está logado.

  • Índice
  •  » VoicerLib
  •  » VB6060 - Programa simples para executar dg_EnableDTMFFilter

#1 12/09/2010 19:30:25

VB6060 - Programa simples para executar dg_EnableDTMFFilter

Possuo uma placa VB6060PCI com dois E1s instalada em uma máquina Debian 5.0.4 com o Asterisk 1.6.2.7, a qual utilizo para receber ligações da rede pública e envia-lás a um servidor de conferências. No entanto, os dígitos DTMF estão sendo enviados para o servidor de conferência junto com áudio de saída, o que provoca a identificação do mesmo DTMF no canal dos outros usuários em conferência. Para evitar esse problema, pensei em criar um pequeno programa que é executado em algum momento (inicialização da máquina, inicialização do asterisk, etc...) que executaria o comando  dg_EnableDTMFFilter em todos os canais da placa, o que imagino que resolveria o meu problema, correto???

Para desenvolver o programa, estou utilizando o exemplo encontrado em http://www.digivoice.com.br/suportefiles/files/vlib/linux/hellodigi.tar.gz.  Inseri o programa hellodigi.c em /usr/src/voicerlib-4.2.2.0/samples/dll_so/c e, ao tentar compilá-lo com o makefile de exemplo, verifiquei inicialmente dois problemas que geraram uma série de outros erros. Os problemas foram:

hellodigi.c:50:29: error: ../../voicerlib.h: No such file or directory
hellodigi.c:51:31: error: ../../vppci/vppci.h: No such file or directory

Para o voicerlib.h substituí ../../voicerlib.h por ../../../src_common/voicerlib.h no programa hellodigi.c, o que resolveu esse problema, mas não consegui encontrar o arquivo vppci em nenhum lugar. Compilando novamente, obtive os seguintes erros:

----------------------------
server01:/usr/src/voicerlib-4.2.2.0/samples/dll_so/c# make
gcc -c -g hellodigi.c
In file included from ../../../src_common/voicerlib.h:44,
                 from hellodigi.c:50:
../../../src_common/generic.h:88: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âDIGIVOICE_CRITICAL_SECTIONâ
../../../src_common/generic.h:303: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âcmd_mutexâ
../../../src_common/generic.h:304: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âevent_mutexâ
../../../src_common/generic.h:309: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âcard_mutexâ
../../../src_common/generic.h:311: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âport_mutexâ
In file included from hellodigi.c:50:
../../../src_common/voicerlib.h:1417: error: expected declaration specifiers or â...â before âDIGIVOICE_CRITICAL_SECTIONâ
hellodigi.c:51:31: error: ../../vppci/vppci.h: No such file or directory
hellodigi.c:78: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âevent_contextâ
hellodigi.c: In function âReceiveEventsâ:
hellodigi.c:103: error: âdg_event_data_strucutureâ undeclared (first use in this function)
hellodigi.c:103: error: (Each undeclared identifier is reported only once
hellodigi.c:103: error: for each function it appears in.)
hellodigi.c:103: error: âEventContextâ undeclared (first use in this function)
hellodigi.c:105: error: âMAX_PATHâ undeclared (first use in this function)
hellodigi.c:112: error: expected expression before â)â token
hellodigi.c:117: error: âC_R2â undeclared (first use in this function)
hellodigi.c:120: error: âC_ALARMEâ undeclared (first use in this function)
hellodigi.c:148: error: âC_NUMERO_RECEBIDOâ undeclared (first use in this function)
hellodigi.c:161: error: âC_CATEGORIAâ undeclared (first use in this function)
hellodigi.c:173: error: âEV_RINGâ undeclared (first use in this function)
hellodigi.c: In function âmainâ:
hellodigi.c:260: warning: cast from pointer to integer of different size
hellodigi.c:277: error: âctVBPCIâ undeclared (first use in this function)
hellodigi.c:280: error: âctVPPCIâ undeclared (first use in this function)
hellodigi.c:283: error: âctVBE1â undeclared (first use in this function)
hellodigi.c:294: warning: incompatible implicit declaration of built-in function âstrlenâ
hellodigi.c:324: error: âevent_contextâ undeclared (first use in this function)
hellodigi.c:346: warning: incompatible implicit declaration of built-in function âstrcpyâ
make: *** [hellodigi.o] Error 1
--------------------------------

Ou seja:
-Apareceram alguns erros devido ao arquivo ../../../src_common/generic.h incluído em voicerlib.h
-O arquivo ../../vppci/vppci.h ainda não foi encontrado
-Várias constantes também não foram encontradas, as quais provavelmente deveriam estar em vppci.h.

Dando uma olhada no arquivo voicerlib.h, pude verificar que na linha 57 há a seguinte instrução comentada: //#include "vppci/vppci.h"
Esse vppci é algum arquivo que foi eliminado em novas versões da voicerlib e o arquivo hellodigi.c obtido no site da digivoice está desatualizado? Como posso fazer para compilar corretamente esse programa??? Assim que conseguir compilá-lo, irei modificá-lo para apenas executar os comandos dg_EnableDTMFFilter.

Offline

 
  • Índice
  •  » VoicerLib
  •  » VB6060 - Programa simples para executar dg_EnableDTMFFilter

Rodapé do fórum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson