Versione 0.4 Gennaio 2009
Copyright 2009 Gianrico Fichera - Copiatura libera ma non se a scopo di lucro.
Obbligo di credits all'autore.
Soluzione Sangoma per linee analogiche in
ambiente Asterisk PBX
La soluzione Sangoma con codice "A200" e' un prodotto completo per l'interfacciamento di un PBX Asterisk con linee analogiche. La soluzione consiste di un sistema modulare con una scheda A200, con interfaccia PCI o PCI-Express, e un massimo di cinque schede figlie, con codice "REMORA". Ogni modulo ha quattro interfacce RJ11, per il collegamento di fino a quattro linee telefoniche analogiche, e due moduli interni di tipo FXS o FXO contenenti l'elettronica per la gestione delle quattro linee.
Con questa soluzione e' possibile gestire fino a 24 linee telefoniche, con tipo d'interfaccia FXS oppure FXO oppure entrambe, a seconda dei moduli che installiamo nelle card.
1. Installazione asterisk 1.4
2. Installazione asterisk 1.6
1. Installazione con Asterisk 1.4 e fedora 7 e zaptel
Inserire la scheda A200 nell'apposito slot PCI o PCI-Express con le
eventuali schede REMORA. Quindi accendere il sistema.
Per verificare la corretta installazione:
lspci -v
...
04:04.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS
Analog AFT card
Subsystem: NEC Corporation Unknown device 1100
Flags: bus master, medium devsel, latency 64, IRQ 11
Memory at feaf0000 (32-bit, non-prefetchable) [size=64K]
...
1. Installare zaptel, lib-pri (in lab. sono state provate zaptel-1.4.7.1 cd
libpri-1.4.3)
2. Installare asterisk (in lab. e' stato provato Asterisk 1.4.11)
[root@]# asterisk
[root@]# asterisk -r
Asterisk 1.4.11, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.11 currently running on IVRSAC (pid = 20816)
IVRSAC*CLI>
3. Installare i driver sangoma, ovvero wanpipe (in lab. e' stato provata la versione 3.2.3)
[root@]# tar xvfz wanpipe-3.2.3.tgz
...
wanpipe-3.2.3/patches/kdrivers/wanec/wanec_cmd.c
wanpipe-3.2.3/patches/kdrivers/wanec/Module.symvers
wanpipe-3.2.3/patches/kdrivers/wanec/.#wanec_cmd.c.1.34
...
wanpipe-3.2.3/zaptel/zaptel.patch
wanpipe-3.2.3/zaptel/zaptel-1.0.3.patch
[root@]# cd wanpipe-3.2.3
[root@]# ./Setup install
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE INSTALLATION
You are about to install WANPIPE Multi-Protocol
Voice & WAN Router into your system.
...
Please visit: http://wiki.sangoma.com for more info.
Would you like to install WANPIPE now? [y] (y/n) y
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Fixing file permissions...
Verifying files and fixing permissions ...Done
Checking for C developement tools ...(gcc) OK
Checking for C++ developement tools ...OK
Checking for Make utility ...OK
Checking for ncurses library ... OK
Checking for Perl developement tools ...OK
Checking for AWK ...OK
Checking for FLEX ...OK
Checking for Patch ...OK
Checking for libtermcap-devel...OK
Checking for bison...OK
Press [Enter] to continue...
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Installing WANPIPE Device Drivers: Linux KERNEL
To integrate WANPIPE Multi-Protocol Voice & WAN Router
modules into the Linux kernel, the kernel has to be
updated with latest wanpipe sources. Install will only
modify existing wanpipe source that is already in the
Kernel.
IMPORTANT:
It is always recommended to say YES to all options
prompted during the install!
Would you like build wanpipe kernel drivers? [y] (y/n) y
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Please specify absolute path name of your linux directory
Press Enter for Default: /lib/modules/2.6.21-1.3194.fc7/build
#>
Setting linux directory to /lib/modules/2.6.21-1.3194.fc7/build
Current WANPIPE kernel patch is 3.2.5
Upgrading WANPIPE kernel documentation ...Done.
Upgrading WANPIPE kernel headers ...Done.
Upgrading WANPIPE kernel drivers ...Done.
WANPIPE device drivers upgraded successfully!
Press [Enter] to continue...
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE KERNEL DRIVER COMPILATION
The next step in WANPIPE installation involves compiling
WANPIPE kernel modules.
This script will compile and install WANPIPE modules
into the currently running linux kernel.
For greater customization you will be prompted to
select which Protocol/Drivers you would like to
build into the WANPIPE kernel modules.
Wanpipe for Asterisk/Zaptel
Default for Asterisk/Zaptel
Wanpipe for Wan Routing/API
Default for Wan/IP Routing and Data API
Wanpipe for Asterisk SMG/SS7
Default for Asterisk SS7
Wanpipe for TDM API
Default for FreeSwitch and Voice API
Custom Compilation:
------------------
Customise WANPIPE driver compilation to add only the
protocols that you need. This way one can reduce
the size of the WANPIPE kernel drivers.
Refer to http://wiki.sangoma.com for more info
Proceed to build WANPIPE kernel modules ? [y] (y/n) y
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Please Select Compilation Mode
1. WAN Protocols Support
Protocols: Frame Relay, CHDLC, PPP, ATM, X25, ADSL, TDM API
Default for: Wan Routing, Data & Voice API devel.
2. TDM Voice (Zaptel) Support
Protocols: TDMV (Zaptel), TDM API on AFT adatpers.
Default for: Asterisk & CallWeaver
3. TDM Voice (Zaptel) + WAN Protocol Support
4. SMG (SS7) (Default for Asterisk/CallWeaver SMG/SS7 install)
5. SMG (SS7) + TDM Voice (Zaptel)
Default for: Asterisk/CallWeaver SS7 + PRI
6. TDM API
Protocols: TDM API on AFT adapters:
Default for: FreeSwitch, Yate, Sunrise
Custom voice development
7. Custom Compilation Mode
Specify protocols to be added into the WANPIPE
kernel drivers.
Please select (1,2,3,4,5,6 or 7) [Default: 1]: 3
Looking for zaptel directory in /usr/src ...
-------------------------------------------
No zaptel dirs found in /usr/src
Please use option "m" to enter zaptel path
------------------------------------------
------------------------------------------
m : Enter zaptel path manually
(ctrl-c to Exit)
Please select working zaptel directory [1-0][m]: m
Please enter zaptel dir: [Default: /usr/src/zaptel]
#> /root/tempfiles/zaptel-.1.4.7
<- o comunque dove tenete i sorgenti
Enabling the TDM Voice Asterisk Support
Native Zaptel HW HDLC Support Detected - No patch required
Zaptel source unmodified, no zaptel re-compilation needed!
Press [Enter] to continue...
...snip...
Source kernel name:2.6.21-1.3194.fc7
<-- questa e' la versione del sistema del lab.
Checking for SMP support ...Enabled.
Checking current processor type ...i386
...snip...
Linking Wanpipe Driver and protocols ...Done.
Updating Kernel Modules ...Done.
Visually Confirm that driver compilation was successful! (y/n) y
Compilation Successful.
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE BOOTSTRAP CONFIGURATION
Your system uses System V -style initialization scripts. You have an option
to add router start-up script to those scripts so that the router will start
automatically when system enters multi-user mode and shut down when it enters
single-user mode or when it is halted.
i.e. By selecting this option WANPIPE will startup on system bootup and
stop on system shutdown.
Would you like to install WANPIPE start-up scripts? (y/n) y
#############################################i##########################
# Sangoma Wanpipe: Zaptel/SMG/TDMAPI/BOOT Configuration Script #
# v2.10 #
# Sangoma Technologies Inc. #
# Copyright(c) 2007. #
########################################################################
Current boot level is 3
Wanrouter boot scripts configuration...
Removing existing wanrouter boot scripts...OK
Verifying Zaptel boot scripts...Enabled (level:09)
Verifying Zaptel shutdown scripts...Enabled (level:92)
...snip...
Please specify a desired location for WANPIPE configuration files.
(Press Enter for Default: /etc/wanpipe)
<specify path:>
Please specify a desired location for WANPIPE interface files.
(Press Enter for Default: /etc/wanpipe/interfaces)
<specify path:>
Please specify a location for WANPIPE binary, firmware files.
(Press Enter for Default: /etc/wanpipe/firmware)
<specify path:>
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE UTILITIES SETUP
WANPIPE utilities are used to:
1) create WANPIPE configuration files.
(/usr/sbin/wancfg)
2) create configuration files for Zaptel and Asterisk
(/usr/sbin/wancfg_zaptel)
3) start,stop,restart individual/all devices and interfaces.
(/usr/sbin/wanrouter)
4) debug line, protocol and driver problems.
(/usr/sbin/wanpipemon)
5) aid in WANPIPE API development
(/etc/wanpipe/api)
Refer to the WanpipeInstallation.(pdf/txt) for more information.
Press [Enter] to continue...
Compiling WANPIPE Utilities ...Done.
Compiling WANPIPE WanCfg Utility ...
Done.
Compiling WANPIPE Misc Utilities ...Done.
Compiling WANPIPE LibSangoma TDM API library ...Done.
Compiling WANPIPE API Development Utilities ...Done.
Compiling WANPIPE HWEC Utilities ...Done.
WANPIPE Environment Setup Complete !!!
Press [Enter] to continue...
Installing WANPIPE Files ... !
Installing WANPIPE Utilities in /usr/sbin
Installing wanrouter.rc in /etc/wanpipe
Installing wanpipe libraries in /etc/wanpipe
Installing firmware in /etc/wanpipe/firmware
Installing documentation in /usr/share/doc/wanpipe
Installing sample api code in /etc/wanpipe/api
Installing AFT Firmware update utility in /etc/wanpipe/util
Installing driver headers in /etc/wanpipe/api/include/linux
Installing Hardware Echo Cancel Utilites
Press [Enter] to continue...
----------------------------------------------------------
WANPIPE v3.2.3 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE INSTALLATON: COMPLETE
WANPIPE installation is now complete. WANPIPE kernel drivers
and configuration/debug utilities have been compiled and installed.
1) Proceed to configure the WANPIPE drivers:
Asterisk/Zaptel: /usr/sbin/wancfg_zaptel
TDM API : /usr/sbin/wancfg_tdmapi
SMG SS7 : /usr/sbin/wancfg_smg
WAN Routing/API: /usr/sbin/wancfg
2) Use the /usr/sbin/wanrouter startup scrip to start and stop
the router. (eg: wanrouter start)
3) To uninstall WANPIPE package run ./Setup remove
Please read http://wiki.sangoma.com for further instructions.
Wanpipe / Zaptel Configuration
==============================
wancfg_zaptel configurator can create all wanpipe devices
for ZAPTEL as well as /etc/zaptel.conf file.
Optionally: wancfg_zaptel can also create Asterisk zapata.conf
-----------------------------------------------------
Would you like to configure wanpipe devices for ZAPTEL? (y/n) y
#############################################i##########################
# Sangoma Wanpipe: Zaptel/SMG/TDMAPI/BOOT Configuration Script #
# v2.10 #
# Sangoma Technologies Inc. #
# Copyright(c) 2007. #
########################################################################
Would you like to generate /etc/asterisk/zapata.conf
1. YES
2. NO
[1-2]:1
---------------------------------------------
Configuring T1/E1 cards [A101/A102/A104/A108]
---------------------------------------------
------------------------------------
Configuring analog cards [A200/A400]
------------------------------------
-----------------------------------------------------------
A200 detected on slot:4 bus:4
-----------------------------------------------------------
Would you like to configure AFT-A200 on slot:4 bus:4
<-- ecco la scheda Sangoma A200
1. YES
2. NO
[1-2]:1
Which codec will be used?
1. MULAW - North America
2. ALAW - Europe
[1-2]:2
A200 configured on slot:4 bus:4 span:1
Press any key to continue:
Analog card configuration complete
Press any key to continue:
###################################################################
# SUMMARY #
###################################################################
0 T1/E1 port(s) detected, 0 configured
0 ISDN BRI port(s) detected, 0 configured
1 analog card(s) detected, 1 configured
Configurator has created the following files:
1. Wanpipe config files in /etc/wanpipe
2. Zaptel config file /etc/zaptel.conf
3. Zapata config file /etc/asterisk/zapata.conf
Your original configuration files will be saved to:
1. /etc/zaptel.conf.bak
2. /etc/asterisk/zapata.conf.bak
Your configuration has been saved in /etc/wanpipe/debug-2008-06-15.tgz.
When requesting support, email this file to techdesk@sangoma.com
Press any key to continue:
Zaptel and Wanpipe configuration complete: choose action
1. Save cfg: Restart Asterisk & Wanpipe now
2. Save cfg: Restart Asterisk & Wanpipe when convenient
3. Save cfg: Stop Asterisk & Wanpipe now
4. Save cfg: Stop Asterisk & Wanpipe when convenient
5. Do not save cfg: Exit
[1-5]:1
Stopping Asterisk...
Disconnected from Asterisk server
Stopping Wanpipe...
...snip...
Removing old configuration files...
Copying new Wanpipe configuration files...
Copying new Zaptel configuration file (/etc/zaptel.conf)...
Copying new chan_zap configuration files (/etc/asterisk/zapata.conf)...
Starting Wanpipe...
Wanrouter boot scripts configuration...
Removing existing wanrouter boot scripts...OK
Would you like wanrouter to start on system boot?
1. YES
2. NO
[1-2]:1
Infine, riavviare il sistema.
Al riavvio far partire asterisk ed eseguire:
CLI> zap show channels
Chan Extension
Context Language MOH
Interpret
pseudo default it default
1
default
it default
2
default
it default
CLI> zap show status
Description
Alarms IRQ bpviol
CRC4
wrtdm Board 1
OK 0
0
0
In questo esempio abbiamo quattro canali correttamente funzionanti. Se
non vedete nulla leggete nel troubleshooting.
Troubleshooting
Se qualcosa non funziona correttamente in asterisk, con il comando "zap show channels" non siete in grado di vedere i canali configurati oppure, il comando non esiste.
- 1. Verificare il caricamento dei canali delle schede con ztcfg
Eseguiamo il comando "ztcfg -vvv"
Verificate l'output (qui abbiamo 12 FXO):
Channel map:
Channel 01: FXS Kewlstart (Default) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)
Channel 05: FXS Kewlstart (Default) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Slaves: 07)
Channel 08: FXS Kewlstart (Default) (Slaves: 08)
Channel 09: FXS Kewlstart (Default) (Slaves: 09)
Channel 10: FXS Kewlstart (Default) (Slaves: 10)
Channel 11: FXS Kewlstart (Default) (Slaves: 11)
Channel 12: FXS Kewlstart (Default) (Slaves: 12)
12 channels to configure.
ZT_CHANCONFIG failed on channel 1: No such device or address (6)
2. Verificate che i driver siano caricati dal sistema:
[root@]# lsmod | grep zaptel
zaptel 188068 26 zttranscode,xpp,wctdm24xxp,wcte11xp,wct1xxp,wcte12xp,wct4xxp,wanpipe
3. Provate a riavviare wanpipe:
[root@ wanpipe]# wanrouter stop
[root@ wanpipe]# wanrouter start
Starting WAN Router...
Loading WAN drivers: wanpipe done.
Starting up device: wanpipe1
wanconfig: WAN device wanpipe1 driver load failed !!
: ioctl(wanpipe1,ROUTER_SETUP) failed:
:22 - Invalid argument
Wanpipe driver did not load properly
Please check /var/log/wanrouter and
/var/log/messages for errors
Configuring interfaces: w1g1 w1g1: unknown interface: No such device
done.
Zaptel Version: 1.4.7.1
Echo Canceller: MG2
Configuration
======================
4. Verificare file di log del sistema (/var/log/messagges)
Jun 15
16:57:29 IVRSAC kernel: wanpipe1: Configuring FXS/FXO Front End ...
Jun 15 16:57:30 IVRSAC kernel: wanpipe1: Module 0: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:57:30 IVRSAC kernel: wanpipe1: Module 1: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:57:30 IVRSAC kernel: wanpipe1: Module 2: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:57:31 IVRSAC kernel: wanpipe1: Module 3: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:57:33 IVRSAC kernel: wanpipe1: Module 4: VoiceDAA did not bring up
ISO link properly
Jun 15 16:57:46 IVRSAC last message repeated 7 times
Jun 15 16:57:47 IVRSAC ntpd[2499]: synchronized to 194.185.27.180, stratum 3
Jun 15 16:57:47 IVRSAC ntpd[2499]: time reset +0.192055 s
Jun 15 16:57:47 IVRSAC ntpd[2499]: kernel time sync enabled 0001
Jun 15 16:57:48 IVRSAC kernel: wanpipe1: Module 4: VoiceDAA did not bring up
ISO link properly
Jun 15 16:57:53 IVRSAC last message repeated 2 times
Jun 15 16:57:53 IVRSAC kernel: wanpipe1: Module 4: FXO failed!
Jun 15 16:57:55 IVRSAC kernel: wanpipe1: Module 5: VoiceDAA did not bring up
ISO link properly
Jun 15 16:58:17 IVRSAC last message repeated 10 times
Jun 15 16:58:17 IVRSAC kernel: wanpipe1: Module 5: FXO failed!
Jun 15 16:58:17 IVRSAC kernel: wanpipe1: Module 6: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:58:19 IVRSAC kernel: wanpipe1: Module 7: VoiceDAA did not bring up
ISO link properly
Jun 15 16:58:41 IVRSAC last message repeated 10 times
Jun 15 16:58:41 IVRSAC kernel: wanpipe1: Module 7: FXO failed!
Jun 15 16:58:41 IVRSAC kernel: wanpipe1: Module 8: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:58:42 IVRSAC kernel: wanpipe1: Module 9: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:58:42 IVRSAC kernel: wanpipe1: Module 10: Installed -- Auto FXO
(FCC mode)!
Jun 15 16:58:42 IVRSAC kernel: wanpipe1: Module 11: Installed -- Auto FXO
(FCC mode)!
Jun 15
16:58:42 IVRSAC kernel: wanpipe1: 3 FXO/FXS module(s) are failed to
initialize!
Jun 15 16:58:42 IVRSAC kernel: wanpipe1: Failed Front End configuration!
Jun 15 16:58:42 IVRSAC kernel: wanpipe1: Unconfiguring FXS/FXO Front End...
Jun 15 16:58:42 IVRSAC kernel: wanpipe1: Master shutting down
In questo esempio c'e' un guasto hardware in alcuni moduli FXO. I moduli
relativi ai canali 4/5/6/7 probabilmente non funzionano.
Toglierli e verificare se il problema si risolve. In tal caso sostituiteli.
Loading ec image OCT6116-64S.ima
Post-installazione
IVRSAC*CLI> zap show
channel 12
Channel: 12
File Descriptor: 19
Span: 1
Extension:
Dialing: no
Context: default
Caller ID:
Calling TON: 0
Caller ID name:
Destroy: 0
InAlarm: 0
Signalling Type: FXS Kewlstart
Radio: 0
Owner: Zap/12-1
Real: Zap/12-1 (Linear)
<--- in questa linea c'e' conversazione in corso
Callwait: <None>
Threeway: <None>
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: yes
Relax DTMF: yes
Dialing/CallwaitCAS: 0/0
Default law: alaw
Fax Handled: no
Pulse phone: no
Echo Cancellation: 128 taps, currently ON
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Hookstate (FXS only): Offhook
<--- questa linea e' collegata (con cavo) alla rete telefonica
IVRSAC*CLI> zap show channel 10
Channel: 10
File Descriptor: 17
Span: 1
Extension:
Dialing: no
Context: default
Caller ID:
Calling TON: 0
Caller ID name:
Destroy: 0
InAlarm: 0
Signalling Type: FXS Kewlstart
Radio: 0
Owner: <None>
<--- in questa linea non c'e' conversazione in corso
Real: <None>
Callwait: <None>
Threeway: <None>
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: no
Relax DTMF: yes
Dialing/CallwaitCAS: 0/0
Default law: alaw
Fax Handled: no
Pulse phone: no
Echo Cancellation: 128 taps, currently OFF
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Hookstate (FXS only): Onhook
<--- questa linea e' scollegata (senza cavo
Zaptel & Zapata
Dopo l'installazione zaptel e
zapata sono preconfigurati e pronti per essere utilizzati. Tuttavia
probabilmente il linguaggio di default potrebbe non essere l'italiano. Quindi
editate entrambe i file. In "/etc/zaptel.conf " modificate "loadzone=it e
defaultzone=it". In "/etc/asterisk/zapata.conf" inserite "language=it".
Potrebbe capitare che alla disconnessione dell'utente remoto asterisk non si
accorga dell'hangup lasciando la linea nello stato di up. Questo e' un problema
frequente. Ci sono numerose soluzioni e dipendono dall'ambiente di utilizzo. In
ogni caso potete utilizzare "busydetect=yes" in zapata.conf in modo che asterisk
ascolti il tono di linea e la butti giu' quanto sente l'occupato, il che succede
se l'utente remoto ha abbassato la cornetta.
Ecco un esempio di zaptel.conf
# Autogenerated by /usr/local/sbin/sangoma/setup-sangoma -- do not hand edit
# Zaptel Channels Configurations (zaptel.conf)
#
loadzone=it
defaultzone=it
#Sangoma A200 [slot:4 bus:4 span:1] <wanpipe1>
fxsks=1
fxsks=2
fxsks=3
fxsks=4
fxsks=9
fxsks=10
fxsks=11
fxsks=12
Nota: con FXS potrebbe sempre restare qualche chiamata appesa. Configurare, in sip.conf, questi due parametri:
rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP
rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTC
Hook-flash
Hook-flash e' quello che avviene nel momento in cui si preme il tasto "R" in alcuni telefoni analogici. Normalmente l'operazione server per passare la chiamata ad un interno, in presenza di un sistema PBX. Si tratta di inviare al PBX un brevissimo segnale di disconnessione, esattamente quello che avviene se premete per un attimo il dito sul pulsante dove poggia la cornetta del telefono. Questo viene interpretato dalla centrale come hook-flash e la stessa attende che vengano inviati i dtmf di un interno a cui trasferire la chiamata. Affinche' tutto questo funzioni e' necessario editare zapata.conf e inserire un comando del tipo "flash=200" dove si specifica il numero di millisecondi di durata dell'hook-flash in modo che esso venga interpretato correttamente. Poi si configura extensions.ael utilizzando il comando Flash() del dialplan e poi il comando SendDTMF() che inviano rispettivamente il flash e il numero d'interno a cui passare la telefonata.
2. Installazione con Asterisk 1.6 e fedora 9 e dahdi
Lavoriamo sempre su Fedora 9 con kernel:
2.6.25-14.fc9.i686
Installiamo la scheda Sangoma Remora. Dovra' essere visibile con il comando 'lspci'
come segue:
02:04.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS
Analog AFT card
Subsystem: NEC Corporation Unknown device 1100
Flags: bus master, medium devsel, latency 255, IRQ 16
Memory at d8000000 (32-bit, non-prefetchable) [size=64K]
Utilizziamo:
asterisk-1.6.0.1
dahdi-linux-2.0.0
dahdi-tools-2.0.0.tar.gz
libpri-1.4.7.tar.gz
speex-1.2rc1.tar.gz
wanpipe-3.3.14.tgz
[root@localhost SOFTWARE]# cd libpri-1.4.7
[root@localhost libpri-1.4.7]# make
[root@localhost libpri-1.4.7]# make install
mkdir -p /usr/lib
mkdir -p /usr/include
install -m 644 libpri.h /usr/include
install -m 755 libpri.so.1.4 /usr/lib
if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" |
grep -q "enabled"); then /sbin/restorecon -v /usr/lib/libpri.so.1.4; fi
( cd /usr/lib ; ln -sf libpri.so.1.4 libpri.so)
install -m 644 libpri.a /usr/lib
if test $(id -u) = 0; then /sbin/ldconfig -n /usr/lib; fi
[root@localhost libpri-1.4.7]#
[root@localhost libpri-1.4.7]# cd ..
[root@localhost SOFTWARE]# ls
asterisk-1.6.0.1 dahdi-linux-2.0.0 dahdi-tools-2.0.0.tar.gz libpri-1.4.7.tar.gz
speex-1.2rc1.tar.gz
asterisk-1.6.0.1.tar.gz dahdi-linux-2.0.0.tar.gz libpri-1.4.7 speex-1.2rc1
wanpipe-3.3.14.tgz
[root@localhost SOFTWARE]# cd dahdi-linux-2.0.0
[root@localhost dahdi-linux-2.0.0]# make
make -C /lib/modules/2.6.25-14.fc9.i686/build ARCH=i386 SUBDIRS=/root/SOFTWARE/dahdi-linux-2.0.0/drivers/dahdi
DAHDI_INCLUDE=/root/SOFTWARE/dahdi-linux-2.0.0/include DAHDI_MODULES_EXTRA=" "
HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory `/usr/src/kernels/2.6.25-14.fc9.i686'
CC [M] /root/SOFTWARE/dahdi-linux-2.0.0/drivers/dahdi/dahdi-base.o
...
CC /root/SOFTWARE/dahdi-linux-2.0.0/drivers/dahdi/xpp/xpp_usb.mod.o
LD [M] /root/SOFTWARE/dahdi-linux-2.0.0/drivers/dahdi/xpp/xpp_usb.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.25-14.fc9.i686'
[root@localhost dahdi-linux-2.0.0]#
[root@localhost dahdi-linux-2.0.0]# make install
make -C /lib/modules/2.6.25-14.fc9.i686/build ARCH=i386 SUBDIRS=/root/SOFTWARE/dahdi-linux-2.0.0/drivers/dahdi
DAHDI_INCLUDE=/root/SOFTWARE/dahdi-linux-2.0.0/include DAHDI_MODULES_EXTRA=" "
HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory `/usr/src/kernels/2.6.25-14.fc9.i686'
...
make[1]: Leaving directory `/root/SOFTWARE/dahdi-linux-2.0.0/drivers/dahdi/xpp/firmwares'
###################################################
###
### DAHDI installed successfully.
### If you have not done so before, install the package
### dahdi-tools.
###
###################################################
[root@localhost dahdi-linux-2.0.0]#
[root@localhost dahdi-linux-2.0.0]# cd ls
build_tools ChangeLog doc drivers include LICENSE LICENSE.LGPL Makefile README
UPGRADE.txt
[root@localhost dahdi-linux-2.0.0]# ls bucd ..
[root@localhost SOFTWARE]# ls
asterisk-1.6.0.1 dahdi-linux-2.0.0 dahdi-tools-2.0.0.tar.gz libpri-1.4.7.tar.gz
speex-1.2rc1.tar.gz
asterisk-1.6.0.1.tar.gz dahdi-linux-2.0.0.tar.gz libpri-1.4.7 speex-1.2rc1
wanpipe-3.3.14.tgz
[root@localhost SOFTWARE]# cd dahdi-tools-2.0.0.tar.gz tar xvfz
dahdi-tools-2.0.0.tar.gz
dahdi-tools-2.0.0/
...
dahdi-tools-2.0.0/blacklist.sample
dahdi-tools-2.0.0/UPGRADE.txt
dahdi-tools-2.0.0/init.conf.sample
[root@localhost SOFTWARE]# cd dahdi-tools-2.0.0o
[root@localhost dahdi-tools-2.0.0]# make ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
...
/usr/bin/install -c -D -m 644 tonezone.h /usr/include/dahdi/tonezone.h
###################################################
###
### DAHDI tools installed successfully.
### If you have not done so before, install init scripts with:
###
### make config
###
###################################################
[root@localhost dahdi-tools-2.0.0]# make config
install -D dahdi.init /etc/rc.d/init.d/dahdi
/usr/bin/install -c -D -m 644 init.conf.sample /etc/dahdi/init.conf
/usr/bin/install -c -D -m 644 modules.sample /etc/dahdi/modules
/usr/bin/install -c -D -m 644 modprobe.conf.sample /etc/modprobe.d/dahdi
/usr/bin/install -c -D -m 644 blacklist.sample /etc/modprobe.d/dahdi.blacklist
install -D ifup-hdlc /etc/sysconfig/network-scripts/ifup-hdlc
/sbin/chkconfig --add dahdi
DAHDI has been configured.
If you have any DAHDI hardware it is now recommended you
edit /etc/dahdi/modules in order to load support for only
the DAHDI hardware installed in this system. By default
support for all DAHDI hardware is loaded at DAHDI start.
I think that the DAHDI hardware you have on your system is:
pci:0000:02:04.0 wanpipe- 1923:0040 Sangoma Technologies Corp. A200/Remora FXO/FXS
Analog AFT card
[root@localhost dahdi-tools-2.0.0]#
[root@localhost dahdi-tools-2.0.0]#
[root@localhost dahdi-tools-2.0.0]# jed /etc/cat /etc/dahdi/hmodules
# Contains the list of modules to be loaded / unloaded by /etc/init.d/dahdi.
#
# NOTE: Please add/edit /etc/modprobe.d/dahdi or /etc/modprobe.conf if you
# would like to add any module parameters.
#
# Format of this file: list of modules, each in its own line.
# Anything after a '#' is ignore, likewise trailing and leading
# whitespaces and empty lines.
# Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1
# Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
# Digium TE220: PCI-Express dual-port T1/E1/J1
# Digium TE420: PCI-Express quad-port T1/E1/J1
wct4xxp
# Digium TE120P: PCI single-port T1/E1/J1
# Digium TE121: PCI-Express single-port T1/E1/J1
# Digium TE122: PCI single-port T1/E1/J1
wcte12xp
# Digium T100P: PCI single-port T1
# Digium E100P: PCI single-port E1
wct1xxp
# Digium TE110P: PCI single-port T1/E1/J1
wcte11xp
# Digium TDM2400P/AEX2400: up to 24 analog ports
# Digium TDM800P/AEX800: up to 8 analog ports
# Digium TDM410P/AEX410: up to 4 analog ports
wctdm24xxp
# X100P - Single port FXO interface
# X101P - Single port FXO interface
wcfxo
# Digium TDM400P: up to 4 analog ports
wctdm
# Xorcom Astribank Devices
xpp_usb
[root@localhost dahdi-tools-2.0.0]#
[root@localhost dahdi-tools-2.0.0]# service dahdi status
Usage: dahdi {start|stop|restart|reload|unload}
[root@localhost dahdi-tools-2.0.0]# service dahdi start
Loading DAHDI hardware modules:
wct4xxp: FATAL: Error inserting wct4xxp (/lib/modules/2.6.25-14.fc9.i686/misc/wct4xxp/wct4xxp.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
wcte12xp: FATAL: Error inserting wcte12xp (/lib/modules/2.6.25-14.fc9.i686/misc/wcte12xp/wcte12xp.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
wct1xxp: FATAL: Error inserting wct1xxp (/lib/modules/2.6.25-14.fc9.i686/misc/wct1xxp.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
wcte11xp: FATAL: Error inserting wcte11xp (/lib/modules/2.6.25-14.fc9.i686/misc/wcte11xp.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
wctdm24xxp: FATAL: Error inserting wctdm24xxp (/lib/modules/2.6.25-14.fc9.i686/misc/wctdm24xxp/wctdm24xxp.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
wcfxo: FATAL: Error inserting wcfxo (/lib/modules/2.6.25-14.fc9.i686/misc/wcfxo.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
wctdm: FATAL: Error inserting wctdm (/lib/modules/2.6.25-14.fc9.i686/misc/wctdm.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
xpp_usb: FATAL: Error inserting xpp_usb (/lib/modules/2.6.25-14.fc9.i686/misc/xpp/xpp_usb.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
[FAILED]
No hardware timing source found in /proc/dahdi, loading dahdi_dummy
Running dahdi_cfg: [ OK ]
[root@localhost SOFTWARE]# cd asterisk-1.6.0.1
[root@localhost asterisk-1.6.0.1]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
...
make[2]: Leaving directory `/root/SOFTWARE/asterisk-1.6.0.1/menuselect/mxml'
make[1]: Leaving directory `/root/SOFTWARE/asterisk-1.6.0.1/menuselect'
cp -f .cleancount .lastclean
[root@localhost asterisk-1.6.0.1]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
...
+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running: +
+ +
+ make install +
+-------------------------------------------+
[root@localhost asterisk-1.6.0.1]#
[root@localhost asterisk-1.6.0.1]# make install
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect
CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/root/SOFTWARE/asterisk-1.6.0.1/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/root/SOFTWARE/asterisk-1.6.0.1/menuselect'
[CC] astcanary.c -> astcanary.o
[LD] astcanary.o -> astcanary
...
[root@localhost asterisk-1.6.0.1]# make samples
[root@localhost asterisk-1.6.0.1]#make progdocs
[root@localhost asterisk-1.6.0.1]# asterisk -r
Asterisk 1.6.0.1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.0.1 currently running on localhost (pid = 2036)
localhost*CLI>
localhost*CLI> exit
[root@localhost SOFTWARE]# cd tar xvf- wanpipe-3.3.14.tgz
wanpipe-3.3.14/
wanpipe-3.3.14/edac/
...
...
wanpipe-3.3.14/zaptel/zaptel-1.0.3.patch
[root@localhost SOFTWARE]# cd wanpipe-3.3.14
[root@localhost wanpipe-3.3.14]# ./Setup install
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE INSTALLATION
You are about to install WANPIPE Multi-Protocol
TDM Voice & WAN Router into your system.
This script will examine your system, then install, create
and/or modify necessary files and directories.
You must have Linux Kernel Headers along with
full development tools (i.e. GNU C compiler and utilities)
installed in order to be able to install this product.
This script will automatically compile all WANPIPE kernel
drivers and install them in their appropriate directory.
If you are installing Wanpipe for ASTERISK/ZAPTEL this
script will will prompt you for zaptel source location.
If you have previoulsy installed WANPIPE, this release
will overrite/upgrade full release without the need to
uninstall first!
IMPORTANT:
It is always recommended to say YES to all options
prompted during the install!
Please visit: http://wiki.sangoma.com for more info.
Would you like to install WANPIPE now? [y] (y/n) y
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Fixing file permissions...
Verifying files and fixing permissions ...Done
Checking for C developement tools ...(gcc) OK
Checking for C++ developement tools ...OK
Checking for Make utility ...OK
Checking for ncurses library ... OK
Checking for Perl developement tools ...OK
Checking for AWK ...OK
Checking for FLEX ...OK
Checking for Patch ...OK
Checking for libtermcap-devel...OK
Checking for bison...OK
Press [Enter] to continue...
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Installing WANPIPE Device Drivers: Linux KERNEL
To integrate WANPIPE Multi-Protocol Voice & WAN Router
modules into the Linux kernel, the kernel has to be
updated with latest wanpipe sources. Install will only
modify existing wanpipe source that is already in the
Kernel.
IMPORTANT:
It is always recommended to say YES to all options
prompted during the install!
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Please specify absolute path name of your linux directory
Press Enter for Default: /lib/modules/2.6.25-14.fc9.i686/build
#>
Setting linux directory to /lib/modules/2.6.25-14.fc9.i686/build
Current WANPIPE kernel patch is 3.3.14
Upgrading WANPIPE kernel documentation ...Done.
Upgrading WANPIPE kernel headers ...Done.
Upgrading WANPIPE kernel drivers ...Done.
WANPIPE device drivers upgraded successfully!
Press [Enter] to continue...
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE KERNEL DRIVER COMPILATION
The next step in WANPIPE installation involves compiling
WANPIPE kernel modules.
This script will compile and install WANPIPE modules
into the currently running linux kernel.
For greater customization you will be prompted to
select which Protocol/Drivers you would like to
build into the WANPIPE kernel modules.
Wanpipe for Asterisk/Zaptel
Default for Asterisk/Zaptel
Wanpipe for Wan Routing/API
Default for Wan/IP Routing and Data API
Wanpipe for Asterisk SMG/SS7
Default for Asterisk SS7
Wanpipe for TDM API
Default for FreeSwitch and Voice API
Custom Compilation:
------------------
Customise WANPIPE driver compilation to add only the
protocols that you need. This way one can reduce
the size of the WANPIPE kernel drivers.
Refer to http://wiki.sangoma.com for more info
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
Please Select Compilation Mode
1. WAN Protocols Support
Protocols: Frame Relay, CHDLC, PPP, ATM, X25, ADSL, TDM API
Default for: Wan Routing, Data & Voice API devel.
2. TDM Voice (Zaptel) Support
Protocols: TDMV (Zaptel), TDM API on AFT adatpers.
Default for: Asterisk & CallWeaver
3. TDM Voice (Zaptel) + WAN Protocol Support
4. SMG (SS7) (Default for Asterisk SMG/SS7 install)
5. SMG (SS7) + TDM Voice (Zaptel)
Default for: Asterisk SS7 + PRI
6. SMG (BRI) (Default for Asterisk SMG/BRI install)
7. SMG (BRI) + TDM Voice (Zaptel)
Default for: Asterisk BRI + PRI + Analog
8. TDM API
Protocols: TDM API on AFT adapters:
Default for: FreeSwitch, Yate, Sunrise
Custom voice development
9. Custom Compilation Mode
Specify protocols to be added into the WANPIPE
kernel drivers.
Please select (1,2,3,4,5,6,7,8 or 9) [Default: 1]: 2
Looking for zaptel/dahdi directory in /usr/src ...
-------------------------------------------
No zaptel/dahdi dirs found in /usr/src
Please use option "m" to enter zaptel/dahdi path
------------------------------------------
1 : /root/SOFTWARE/dahdi-linux-2.0.0 (entered manually)
------------------------------------------
m : Enter zaptel path manually
(ctrl-c to Exit)
Please select working zaptel directory [1-1][m]: 1
Enabling the TDM Voice Asterisk Support
Dahdi HW HDLC Support Detected: Enabling DCHAN Feature
Native Dahdi HW HDLC Support Detected - No patch required
Dahdi source unmodified
Checking for UDEV Zaptel compatibility... UDEV rules not found/or not used
Enabling the AFT TE1 Support
Source kernel name:2.6.25-14.fc9.i686
Checking for SMP support ...Enabled.
Checking current processor type ...i686
Wan Update Flags: -DAF_WANPIPE_2612_FORCE_UPDATE -DWANPIPE_MOD_266_FORCE_UPDATE
--------------------------------------------------
CFLAGS: gcc -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dlinux
-D__KERNEL__ -I/lib/modules/2.6.25-14.fc9.i686/build/include -DMODULE
-DAF_WANPIPE_2612_FORCE_UPDATE -DWANPIPE_MOD_266_FORCE_UPDATE
--------------------------------------------------
Checking for REGPARM kernel option ...Enabled.
Compiling General WANPIPE Driver for 2.6.X Kernel .....Done.
WAN HWEC module enabled and compiled!
Linking Wanpipe Driver and protocols ...Done.
Updating Kernel Modules ...Done.
Visually Confirm that driver compilation was successful! (y/n) y
Compilation Successful.
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE META CONFIGURATION
There are two configuration files associated with WANPIPE.
1) /root/SOFTWARE/wanpipe-3.3.14/wanrouter.rc:
- defines locations of important files such as lock
and configuration files as well as start/stop
order of multiple WANPIPE devices.
2) /root/SOFTWARE/wanpipe-3.3.14/wanpipe1.conf:
- main configuration file for each WANPIPE device.
- defines interfaces, hardware and protocol information.
- this file can be created using the 'wancfg' GUI
utility or manually based on sample files located
in /etc/wanpipe/samples.
Please read the WanpipeInstallation.(pdf/txt) manual for further
information.
Press [Enter] to continue...
Please specify a desired location for WANPIPE configuration files.
(Press Enter for Default: /etc/wanpipe)
<specify path:>
Please specify a desired location for WANPIPE interface files.
(Press Enter for Default: /etc/wanpipe/interfaces)
<specify path:>
Please specify a location for WANPIPE binary, firmware files.
(Press Enter for Default: /etc/wanpipe/firmware)
<specify path:>
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE UTILITIES SETUP
WANPIPE utilities are used to:
1) create configuration files: for Zaptel and Asterisk
/usr/sbin/wancfg_zaptel#Zaptel and Asterisk
/usr/sbin/wancfg_dahdi#Dahdi and Asterisk
/usr/sbin/wancfg_smg#BRI/SS7, Zaptel and Asterisk
/usr/sbin/wancfg_tdmapi#TDM API
2) create WANPIPE WAN/IP configuration files.
(/usr/sbin/wancfg)
3) start,stop,restart individual/all devices and interfaces.
(/usr/sbin/wanrouter)
4) debug line, protocol and driver problems.
(/usr/sbin/wanpipemon)
5) aid in WANPIPE API development
(/etc/wanpipe/api)
Refer to the WanpipeInstallation.(pdf/txt) for more information.
Press [Enter] to continue...
Compiling WANPIPE Utilities ...Done.
Compiling WANPIPE WanCfg Utility ...
Done.
Compiling WANPIPE Misc Utilities ...Done.
Compiling WANPIPE LibSangoma TDM API library ...Done.
Compiling WANPIPE API Development Utilities ...Done.
Compiling WANPIPE HWEC Utilities ...Done.
WANPIPE Environment Setup Complete !!!
Press [Enter] to continue...
Installing WANPIPE Files ... !
Installing WANPIPE Utilities in /usr/sbin
Installing wanrouter.rc in /etc/wanpipe
Installing wanpipe libraries in /etc/wanpipe
Installing firmware in /etc/wanpipe/firmware
Installing documentation in /usr/share/doc/wanpipe
cp: omitting directory `doc/wan'
Installing sample api code in /etc/wanpipe/api
Installing AFT Firmware update utility in /etc/wanpipe/util
Installing driver headers in /etc/wanpipe/api/include/linux
Installing Hardware Echo Cancel Utilites
Press [Enter] to continue...
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE BOOTSTRAP CONFIGURATION
Your system uses System V -style initialization scripts. You have an option
to add router start-up script to those scripts so that the router will start
automatically when system enters multi-user mode and shut down when it enters
single-user mode or when it is halted.
i.e. By selecting this option WANPIPE will startup on system bootup and
stop on system shutdown.
Would you like to install WANPIPE start-up scripts? (y/n) y
########################################################################
# Sangoma Wanpipe #
# Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script #
# v2.21 #
# Sangoma Technologies Inc. #
# Copyright(c) 2008. #
########################################################################
Current boot level is 3
Wanrouter boot scripts configuration...
Removing existing wanrouter boot scripts...OK
Verifying boot scripts...Enabling wanrouter boot scripts ...(level:8)
Enabling wanrouter shutdown scripts ...(level:91)
Would you like to auto-execute ztcfg after wanrouter start? (y/n) y
----------------------------------------------------------
WANPIPE v3.3.14 Installation Script
Copyright (c) 1995-2008, Sangoma Technologies Inc.
----------------------------------------------------------
WANPIPE INSTALLATON: COMPLETE
WANPIPE installation is now complete. WANPIPE kernel drivers
and configuration/debug utilities have been compiled and installed.
1) Proceed to configure the WANPIPE drivers:
Asterisk/Zaptel: /usr/sbin/wancfg_zaptel
Asterisk/Dahdi : /usr/sbin/wancfg_dahdi
TDM API : /usr/sbin/wancfg_tdmapi
SMG SS7/BRI : /usr/sbin/wancfg_smg
WAN Routing/API: /usr/sbin/wancfg
2) Use the /usr/sbin/wanrouter startup scrip to start and stop
the router. (eg: wanrouter start)
3) To uninstall WANPIPE package run ./Setup remove
Please read http://wiki.sangoma.com for further instructions.
Wanpipe / Zaptel Configuration
==============================
wancfg_zaptel configurator can create all wanpipe config files
for ZAPTEL including /etc/zaptel.conf file.
Optionally: the configurator can also create Asterisk zapata.conf
-----------------------------------------------------
Would you like to configure wanpipe devices for DAHDI? (y/n) y
########################################################################
# Sangoma Wanpipe #
# Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script #
# v2.21 #
# Sangoma Technologies Inc. #
# Copyright(c) 2008. #
########################################################################
Would you like to generate /etc/asterisk/chan_dahdi.conf
1. YES
2. NO
[1-2]:1
---------------------------------------------
Configuring T1/E1 cards [A101/A102/A104/A108]
---------------------------------------------
------------------------------------
Configuring analog cards [A200/A400]
------------------------------------
-----------------------------------------------------------
A200 detected on slot:4 bus:2
-----------------------------------------------------------
Would you like to configure AFT-A200 on slot:4 bus:2
1. YES
2. NO
[1-2]:1
Which codec will be used?
1. MULAW - North America
2. ALAW - Europe
[1-2]:2
Which Operation Mode will be used?
1. FCC
2. TBR21
3. AUSTRALIA
[1-3, ENTER='FCC']:
Press any key to continue:
A200 configured on slot:4 bus:2 span:1
Analog card configuration complete
Press any key to continue:
###################################################################
# SUMMARY #
###################################################################
0 T1/E1 port(s) detected, 0 configured
0 ISDN BRI port(s) detected, 0 configured
1 analog card(s) detected, 1 configured
Configurator will create the following files:
1. Wanpipe config files in /etc/wanpipe
2. Dahdi config file /etc/dahdi/system.conf
3. Chan-Dahdi config file /etc/asterisk/chan_dahdi.conf
Your original configuration files will be saved to:
1. /etc/dahdi/system.conf.bak
2. /etc/asterisk/chan_dahdi.conf.bak
Your configuration has been saved in /etc/wanpipe/debug-2008-10-17.tgz.
When requesting support, email this file to techdesk@sangoma.com
###################################################################
Configuration Complete! Please select following:
1. YES - Continue
2. NO - Exit
[1-2]:1
Dahdi and Wanpipe configuration complete: choose action
1. Save cfg: Restart Asterisk & Wanpipe now
2. Save cfg: Restart Asterisk & Wanpipe when convenient
3. Save cfg: Stop Asterisk & Wanpipe now
4. Save cfg: Stop Asterisk & Wanpipe when convenient
5. Do not save cfg: Exit
[1-5]:1
Stopping Asterisk...
Stopping Wanpipe...
Unloading Dahdi modules...
Removing old configuration files...
Copying new Wanpipe configuration files...
Copying new Dahdi configuration file (/etc/dahdi/system.conf)...
Copying new Chan-Dahdi configuration files (/etc/asterisk/chan_dahdi.conf)...
Starting Wanpipe...
Starting WAN Router...
Loading WAN drivers: wanpipe done.
Starting up device: wanpipe1
Configuring interfaces: w1g1
done.
Notice: Configuration file is /etc/zaptel.conf
line 0: Unable to open configuration file '/etc/zaptel.conf'
1 error(s) detected
Loading Dahdi...
DAHDI Tools Version - 2.0.0
DAHDI Version: 2.0.0
Echo Canceller(s):
Configuration
======================
4 channels to configure.
Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Starting Asterisk...
Listing Asterisk channels...
Chan Extension Context Language MOH Interpret Blocked State
pseudo from-zaptel default In Service
1 from-zaptel default In Service
2 from-zaptel default In Service
3 from-zaptel default In Service
4 from-zaptel default In Service
Type "asterisk -r" to connect to Asterisk console
Wanrouter start complete...
Current boot level is 3
Wanrouter boot scripts configuration...
Removing existing wanrouter boot scripts...OK
Would you like wanrouter to start on system boot?
1. YES
2. NO
[1-2]:q
Error: Invalid option, input an integer
[1-2]:1
Verifying Dahdi boot scripts...Verifying Dahdi boot scripts...Enabled (level:09)
Verifying Dahdi shutdown scripts...Enabled (level:92)
Enabling wanrouter boot scripts ...(level:8)
Enabling wanrouter shutdown scripts ...(level:91)
Sangoma cards configuration complete, exiting...
>asterisk -r
Asterisk 1.6.0.1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.0.1 currently running on localhost (pid = 3755)
localhost*CLI>
localhost*CLI> dahdi show channels
localhost*CLI> Chan Extension Context Language MOH Interpret Blocked State
pseudo from-zaptel default In Service
1 from-zaptel default In Service
2 from-zaptel default In Service
3 from-zaptel default In Service
4 from-zaptel default In Service
localhost*CLI> exit
[root@localhost wanpipe-3.3.14]# lsmod | grep
[root@localhost wanpipe-3.3.14]# lsmod | grep dahdi
dahdi_echocan_mg2 9224 0
dahdi 184580 12 dahdi_echocan_mg2,wanpipe
crc_ccitt 5760 1 dahdi
[root@localhost wanpipe-3.3.14]#
CHAN-DAHDI.conf
[root@gianrico ~]# cat /etc/asterisk/chan_dahdi.conf
;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
;autogenrated on 2008-10-17
;Dahdi Channels Configurations
;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak
[trunkgroups]
[channels]
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=2.0
txgain=2.0
group=1
callgroup=1
pickupgroup=1
immediate=yes
;Sangoma A200 [slot:4 bus:2 span:1] <wanpipe1>
context=from-zaptel
group=0
echocancel=yes
signalling = fxs_ks
channel => 1
context=from-zaptel
group=0
echocancel=yes
signalling = fxs_ks
channel => 2
context=from-zaptel
group=1
echocancel=yes
signalling = fxs_ks
channel => 3
context=from-zaptel
group=1
echocancel=yes
signalling = fxs_ks
channel => 4
_0. => {
Dial(DAHDI/g0/${EXTEN:1},60,t);
hangup();
}
[root@gianrico dahdi-tools-2.0.0]# ./dahdi_scan
[1]
active=yes
alarms=OK
description=wrtdm Board 1
name=WRTDM/0
manufacturer=
devicetype=
location=
basechan=1
totchans=24
irq=0
type=analog
port=1,FXO
port=2,FXO
port=3,FXO
port=4,FXO
port=5,none
port=6,none
port=7,none
port=8,none
port=9,none
port=10,none
port=11,none
port=12,none
port=13,none
port=14,none
port=15,none
port=16,none
port=17,none
port=18,none
port=19,none
port=20,none
port=21,none
port=22,none
port=23,none
port=24,none
[root@gianrico dahdi-tools-2.0.0]# ./dahdi_cfg -vvvv
DAHDI Tools Version - 2.0.0
DAHDI Version: 2.0.0
Echo Canceller(s): MG2
Configuration
======================
Channel map:
Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)
4 channels to configure.
Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Copyright 2008 – Gianrico Fichera –
Questa pagina e' protetta dalla legge sul Diritto d'Autore. L’autore di questa pagina non si assume nessuna responsabilita’ e non da nessuna garanzia riguardante l’accuratezza e la completezza delle informazioni presenti nonche’ da conseguenze sull’uso delle informazioni presenti in questa pagina.
Pagina aggiornata il 20 Giugno 2008