lunes, 21 de noviembre de 2011

Commandos dahdi utiles al momento de la Instalación de una Tarjeta para Asterisk



Corremos este comando para detectar el  hardware dahdi_hardware

1)Verificamos que el hard ha sido detectado con el comand : lspci –vvvvv
00:0c.0 Network controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
Subsystem: Unknown device 9100:0001
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (250ns min, 32000ns max)
Interrupt: pin A routed to IRQ 185
Region 0: I/O ports at b800 [size=256]
Region 1: Memory at febfe000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=55mA PME(D0+,D1-,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

run command: dahdi_genconf, the command will automatically generate the /etc/dahdi/system.conf and /etc/asterisk/dahdi-channels.conf.







The command above will generate two files /etc/system/dahdi.conf and /etc/asterisk/dahdichannels.conf. The default parameters for dahdi_genconf are usually fine, but you can change 
them in the file /etc/dahdi/genconf_parameters. By default, it will insert the lines (FXO) in the 
context from-pstn and the phones (FXS) in the context from-internal. 
Step 3: After running dahdi_genconf, in the last line of the file /etc/asterisk/chan_dahdi.conf
insert the following line:
#include dahdi-channels.conf




or  run the command :
echo "#include dahdi-channels.conf" >> /etc/asterisk/chan_dahdi.conf 



2.a) Verifica el status del hardware instalado
asterisk*CLI> dahdi show status
  Description                              Alarms     IRQ        bpviol     CRC4      
  Wildcard TDM410P Board 1                 OK         0          0          0         
  Wildcard TDM800P Board 2                 OK         0          0          0    


3.b) Verifica si los canales estan configurados
asterisk*CLI> dahdi show channels
    Chan Extension  Context         Language   MOH Interpret       
  pseudo            default                    default             
       1            from-pstn       de         default             
       2            from-pstn       de         default             
       3            from-pstn       de         default             
       4            from-pstn       de         default             
       5            from-pstn       de         default             
       6            from-pstn       de         default             
       7            from-pstn       de         default             
       8            from-pstn       de         default             
       9            from-pstn       de         default             
      10            from-pstn       de         default             
      11            from-pstn       de         default             
      12            from-pstn       de         default             
  asterisk*CLI> 
 
Dial plan para probar la tarjeta luego de instalada
[from-pstn]
exten => s,1,Answer() // Responde la llamada entrante
exten => s,n,Playback(cc_welcome) //reproduce un mensaje de bienvenida
exten => s,n,Hangup()
[from-internal]
exten => X.,1,Dial(dahdi/1/${EXTEN}) // Reeliza una llmada saliente  desde  el dahdi channel 1
exten => X.,2,Hangup()
tambien otro ejemplo seria :
[outgoing]
exten => _9X.,1,Dial(dahdi/g2/${EXTEN:1})
exten => _91.,1,Dial(dahdi/g1/${EXTEN:1})
Aqui  las llamadas salientes salen por cualquier interfaz libre  en el grupo  1 y si están todas ocupadas salta al grupo 2

No hay comentarios:

Publicar un comentario