2. Installation der Sangoma A500 ISDN-Karte

Sören Sprenger

Zusammenfassung

Installationsbeschreibung der Sangoma ISDN-Karte A500 auf einem Asterisk-System. Mit einem Beispiel für den Anschluss an das öffentliche ISDN-Netz.

Die von Sangoma für entwickelte A500-ISDN-Karte[175]ist eine erweiterbare ISDN-Karte mit 2 bis 24 Ports. Dabei können 6 Ports (12 B-Kanäle) auf einer einzelnen Karte verwendet werden. Wenn mehr als 6 Ports benötigt werden, kann man eine zweite Karte einbauen und über eine Steckverbindung mit der ersten Karte verbinden. Somit haben die Karten den gleichen Takt. Die Karte ist verfügbar für PCI[176]- und PCI-Express[177]-Steckplätze („Slots“) mit 5 V oder 3,3 V. Sie verwendet die hervorragende Hardware-Echounterdrückung (Echo Cancellation) von Octasic.

Die Karte ist sehr gut für mittelgroße und große Installationen geeignet, wo z. B. zusätzlich zur VoIP-Anbindung – oder auch ausschließlich – bis zu 48 B-Kanäle ins öffentliche ISDN-Netz betrieben werden sollen.[178] Es sind aber auch andere Szenarien denkbar: Die 6 ISDN-Ports lassen sich paarweise auf TE[179] oder NT[180] einstellen.

Einbau der A500-Karte

Geliefert wird die A500 in einer kleinen blauen Box, komplett mit Port-Splitter-Kabeln. Die Y-Kabel werden benötigt, um aus den ISDN-Buchsen jeweils 2 Leitungen mit „RJ-45[181]-Steckern herauszuführen. Außerdem liegt eine CD bei, mit Handbüchern, Treibern, Firmware etc. und auch dem Hinweis zur Registrierung bei Sangoma, wodurch man dann Gewährleistung erhält. Dass Sie beim Auspacken der Karte darauf achten, geerdet zu sein, versteht sich von selbst.

Ob die ISDN-Ports auf TE- oder NT-Modus eingestellt sind, wird dadurch bestimmt, wie die 3 BRI-Module in die Karte eingesteckt sind. Das linke Modul ist zuständig für Port 1 und 2, das mittlere für Port 3 und 4 und das rechte für Port 5 und 6. Gegebenenfalls steckt man die Module andersherum ein. In dieser Anleitung stellen wir beide Module auf TE, da wir die Karte an das öffentliche ISDN-Netz anschließen wollen. Wenn eines der Module im NT-Modus betrieben werden soll, muss die Karte über den Anschluss eines Molex-Steckers am hinteren Ende zusätzlich mit Strom versorgt werden. Für den TE-Modus müssen alle Leitungswiderstände (termination resistors) ausgeschaltet sein (für NT an), siehe http://wiki.sangoma.com/sangoma-wanpipe-smg-asterisk-bri-installation#HardwareInstallation.

Auf der Karte gibt es 12 kleine Schalter für die Wiederstände, jeweils einen für ein Adernpaar, also 2 für einen ISDN-Port bzw. 4 für eine Buchse an der Karte, da die Karte ja in einer Buchse 2 Ports herausführt. Es müssen pro BRI-Modul also die jeweiligen DIP-Doppelschalter Sw1 und Sw2 (bzw. Sw3 und Sw4, Sw5 und Sw6) alle gleich eingestellt sein.

Gute Schema-Zeichnungen zum Einbau der A500 finden Sie in http://sangoma.com/data/docs/A500_InstallationManual.pdf.

[Wichtig]Wichtig

Bei den BRI-Ports ist es wichtig, dass der Port 1 an das öffentliche ISDN-Netz angeschlossen wird, da dieser den Zeittakt übernimmt. Port 1 wird aus Buchse 1 herausgeführt; das ist die am weitesten von der Schraublasche der PCI-Blende entfernte Buchse, oder anders gesagt die Buchse mit dem geringsten Abstand vom PCI-Sockel auf dem Mainboard.

Für diese Anleitung wird ein frisch installiertes Debian GNU/Linux 5 („Lenny“) vorausgesetzt[182].

Bitte loggen Sie sich nach der Installation als Benutzer root am System ein, und führen Sie alle hier angegebenen Befehle mit diesem Benutzer aus.

Es versteht sich eigentlich von selbst, dass man auf einem frisch installierten System die Paketlisten für aptitude aktualisiert und wichtige Updates einspielt:

debian:~# aptitude update
[...]
Paketlisten werden gelesen... Fertig
debian:~# aptitude upgrade
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
debian:~# 

Für den Fall, dass beim Upgrade der Pakete auch ein neuer Kernel installiert wurde, müssen wir jetzt das System rebooten:

debian:~# shutdown -r now

Loggen Sie sich nach dem Hochfahren des Rechners bitte wieder als root ein, und kontrollieren Sie dann, dass die Karte richtig erkannt wird:

debian:~# lspci -nn -v -d 1923:
00:08.0 Network controller [0280]: Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card [1923:0040]
        Subsystem: Device [a500:3200]
        Flags: bus master, medium devsel, latency 255, IRQ 17
        Memory at fdfe0000 (32-bit, non-prefetchable) [size=64K]

Da ist sie. Wundern Sie sich nicht: Die Karte kann als A200 angezeigt werden, je nachdem, was in /usr/share/misc/pci.ids eingetragen ist. Wichtig ist, was bei Subsystem: Device [a500:3200] steht: "a500" sagt uns, dass es die richtige Karte ist. (1923 ist der PCI-Hersteller-Code von Sangoma).

Lassen Sie sich übrigens nicht von den Farben der LEDs in den Buchsen verwirren. Die Buchsen leuchten rot für TE (grün für NT).

Build-Umgebung

In den weiteren Abschnitten benötigen wir eine Build-Umgebung, also Compiler usw.:

debian:~# aptitude install build-essential
debian:~# aptitude install libncurses5-dev flex bison
debian:~# aptitude install bzip2

Und auch die Linux-Kernel-Header:

debian:~# aptitude install linux-headers-`uname -r`

Quellen von Asterisk

Asterisk[183]:

debian:~# aptitude install libssl-dev libncurses5-dev libcurl3-dev
debian:~# cd /usr/src/
debian:/usr/src# wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.21.tar.gz
debian:/usr/src# tar xzf asterisk-1.4.21.tar.gz 
debian:/usr/src# rm asterisk-1.4.21.tar.gz 
debian:/usr/src# cd asterisk-1.4.21/
debian:/usr/src/asterisk-1.4.21# ./configure 
debian:/usr/src/asterisk-1.4.21# make
debian:/usr/src/asterisk-1.4.21# make install
debian:/usr/src/asterisk-1.4.21# make samples
debian:/usr/src/asterisk-1.4.21# make config
debian:/usr/src/asterisk-1.4.21# update-rc.d -f asterisk remove
debian:/usr/src/asterisk-1.4.21# update-rc.d asterisk defaults 50 15

Installation von Wanpipe

Eine Build-Umgebung haben wir bereits[184]. Außerdem brauchen wir noch udev und lksctp:

debian:~# aptitude install udev lksctp-tools libsctp-dev

Auch logrotate sollte vorher vorhanden sein, damit das Skript automatisch eine entsprechende logrotate-Definition erstellen kann:

debian:~# aptitude install logrotate

Als Nächstes installieren wir die aktuelle Version von Wanpipe:

debian:~# cd /usr/src/
debian:/usr/src# wget -O wanpipe-current-stable.tgz \
  ftp://ftp.sangoma.com/linux/current_wanpipe/current-stable.tgz
debian:/usr/src# tar xzf wanpipe-*.tgz 
debian:/usr/src# rm wanpipe-*.tgz 
debian:/usr/src# cd wanpipe-*

Das Skript Setup kümmert sich um die Kompilierung und würde es melden, falls wir notwendige Software nicht installiert hätten. Es gibt zwei verschiedene Modi, die wir beide verstellen. Wir empfehlen für normale Installationen den einfacheren Silent-Modus („Silent-Modus-Installation“).

Silent-Modus-Installation

Im Silent-Modus wird vom Skript so wenig wie möglich gefragt. Wenn Sie mehr Kontrolle über den Installationsvorgang wünschen, dann finden Sie in „Interaktiver-Modus-Installation“ eine detaillierte Anleitung zum interaktiven Modus.

debian:/usr/src/wanpipe-3.6.0# ./Setup install --silent --protocol=BRI
        ----------------------------------------------------------
                  WANPIPE v3.6.0 Installation Script
            Copyright (c) 1995-2008, Sangoma Technologies Inc.
        ----------------------------------------------------------
[...]

Das Skript wird nun alle Aufgaben erledigen, die für den Installationsprozess benötigt werden. Dies kann eine Weile dauern. Am Ende sollte dann folgende Meldung kommen:

        ----------------------------------------------------------
                  WANPIPE v3.6.0 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 script 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.

Die Treiber, das Sangoma-Media-Gateway und Konfigurationsprogramme sind nun installiert.

Jetzt muss man noch die Karte mithilfe der Sangoma-Konfigurationstools konfigurieren:

debian:~# /usr/sbin/wancfg_smg
[...]
########################################################################
#                          Sangoma Wanpipe                              #
#        Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script             #
#                             v2.22                                    #
#                     Sangoma Technologies Inc.                        #
#                        Copyright(c) 2008.                            #
########################################################################
[...]

Jetzt geht es um die Konfiguration der BRI-Ports. Zur Erinnerung: „Point to multipoint“ bedeutet Mehrgeräteanschluss, also „normales“ ISDN, und „Point to point“ bedeutet Anlagenanschluss:

-----------------------------------------------------------
A500 detected on slot:8 bus:0
-----------------------------------------------------------


Would you like to configure AFT-A500 port 1 on slot:8 bus:0
 1. YES
 2. NO
 3. Exit
[1-3]: 1
Configuring port 1 on AFT-A500 [slot:8 bus:0 span:1]

Select connection type for port 1
 1. Point to multipoint
 2. Point to point
[1-2, ENTER='Point to multipoint']: 1
Input the group for this port
: 1
Select dialplan context for group:1
 1. from-pstn
 2. Custom
[1-2]: 1
Configuring span:1 as TEI:127
 1. YES - Keep this setting
 2. NO  - Specify a different TEI
[1-2, ENTER='YES']: enter

Das Gleiche machen wir noch einmal für Port 2, 3, 4, 5 und 6 (je nachdem, wie viele Module wir eingesteckt haben):

[...]

Would you like to configure AFT-A500 port 2 on slot:8 bus:0
 1. YES
 2. NO
 3. Exit
[1-3, ENTER='YES']: enter
Configuring port 2 on AFT-A500 [slot:8 bus:0 span:2]

Select connection type for port 2
 1. Point to multipoint
 2. Point to point
[1-2, ENTER='Point to multipoint']: enter
Input the group for this port
def="1": 1
Configuring span:2 as TEI:127
 1. YES - Keep this setting
 2. NO  - Specify a different TEI
[1-2, ENTER='YES']: enter
[...]

ISBN BRI card configuration complete
Press any key to continue: enter
[...]

###################################################################
#                             SUMMARY                             #
###################################################################

  0 T1/E1 port(s) detected, 0 configured
  2 ISDN BRI port(s) detected, 2 configured
  0 analog card(s) detected, 0 configured

Configurator will create the following files:
        1. Wanpipe config files in /etc/wanpipe
        2. sangoma_brid config file /etc/wanpipe/smg_bri
        3. Zapata config file /etc/asterisk/zapata.conf


Your original configuration files will be saved to:

Your configuration has been saved in /etc/wanpipe/debug-2009-02-23.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
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
[...]

Would you like to continue?
 1. No - exit
 2. YES
[1-2, ENTER='No']: 2
[...]

Wanrouter start complete...
Current boot level is 2

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
Verifying Zaptel boot scripts...Enabled (level:15)
Verifying Zaptel shutdown scripts...Enabled (level:30)
Enabling wanrouter boot scripts ...(level:14)
Enabling wanrouter shutdown scripts ...(level:29)
Verifying Network boot scripts...Not installed
Would you like smg_ctrl to start/stop on wanrouter start?
 1. YES
 2. NO
[1-2]: 1
smgbri start scrtip installed scuessfully
smgbri stop script installed successfully
Sangoma cards configuration complete, exiting...

Jetzt geht es mit „Runlevel“ weiter.

Interaktiver-Modus-Installation

Im interaktiven Modus kann man beim Installieren an allen Stellen eingreifen. Normalerweise kann man aber überall die Default-Werte benutzen oder sich das Leben mit dem Silent-Modus leichter machen (siehe „Silent-Modus-Installation“).

Als „Compilation Mode“ verwenden wir Nr. 6 („ SMG (BRI) (Default for Asterisk SMG/BRI install)“).

debian:/usr/src/wanpipe-3.6.0# ./Setup install
        ----------------------------------------------------------
                  WANPIPE v3.6.0 Installation Script
            Copyright (c) 1995-2008, Sangoma Technologies Inc.
        ----------------------------------------------------------
[...]
Would you like to install WANPIPE now? [y] (y/n) y
[...]
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... enter
[...]
Please specify absolute path name of your linux directory

Press Enter for Default: /lib/modules/2.6.26-1-686/build

#> enter
Setting linux directory to /lib/modules/2.6.26-1-686/build

Upgrading WANPIPE kernel documentation ...Done.


Upgrading WANPIPE kernel headers ...Done.

Upgrading WANPIPE kernel drivers ...Done.

WANPIPE device drivers upgraded successfully!

Press [Enter] to continue... enter
[...]
        Please Select Compilation Mode
[...]

6. SMG (BRI) (Default for Asterisk SMG/BRI install)

[...]

Please select (1,2,3,4,5,6,7,8 or 9) [Default: 1]: 6
Enabling the AFT TE1 Support
Checking for SCTP Utilities....OK.
Looking for Asteris/CallWeaver directory in /usr/src ...
-------------------------------------------
1 : /usr/src/asterisk-1.4.21 
------------------------------------------ 
------------------------------------------ 
m : Enter Asterisk/CallWeaver path manually

(ctrl-c to Exit)
Please select working Asterisk/CallWeaver directory [1-1][m]: 1
Source kernel name:2.6.26-1-686

Checking for SMP support ...Enabled.

Checking current processor type ...i686

[...]

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
[...]

WANPIPE META CONFIGURATION

There are two configuration files associated with WANPIPE.  

1) /usr/src/wanpipe-3.6.0/wanrouter.rc: 
        - defines locations of important files such as lock
          and configuration files as well as start/stop 
          order of multiple WANPIPE devices.
2) /usr/src/wanpipe-3.6.0/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... enter
Please specify a desired location for WANPIPE configuration files.

        (Press Enter for Default: /etc/wanpipe)

<specify path:> enter
Please specify a desired location for WANPIPE interface files.

        (Press Enter for Default: /etc/wanpipe/interfaces)

<specify path:> enter
Please specify a location for WANPIPE binary, firmware files.

        (Press Enter for Default: /etc/wanpipe/firmware)

<specify path:> enter
[...]

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_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... enter
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... enter
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... enter
[...]

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
[...]
Current boot level is 2

Wanrouter boot scripts configuration...

Removing existing wanrouter boot scripts...OK
Enabling wanrouter boot scripts ...(level:8)
Enabling wanrouter shutdown scripts ...(level:91)
[...]
Installing Sangoma Media Gateway Daemon...

Installing SMG Daemon...

Warning: asterisk is running
Would you like to stop asterisk? (y/n) y
Checking Syslog ....
 found /etc/rsyslog.conf 
Stopping enhanced syslogd: rsyslogd.
Starting enhanced syslogd: rsyslogd.
Stopping enhanced syslogd: rsyslogd.
Starting enhanced syslogd: rsyslogd.
Ok

Checking logrotate ...
Error: Logrotate dir: /etc/logrotate.d not found !
OK.

Checking for SCTP Utilities....
OK.

Checking for SCTP modules...
OK.

Compiling Sangoma MGD ...
[...]
install -D -m 755 sangoma_mgd /usr/sbin/sangoma_mgd
BRI control scripts installed
install -D -m 755 ../sangoma_bri/smg_ctrl /usr/sbin/smg_ctrl
sangoma_mgd Installed
Ok.
Compiling Woomera Channel ...
[...]
install -D -m 755 chan_woomera.so /usr/lib/asterisk/modules/chan_woomera.so
chan_woomera Installed
Ok.
---------------------------------

 SMG Install Done

--> Config: /etc/sangoma_mgd.conf
--> Start:  sangoma_mgd -bg

 Chan Woomera Install Done

--> Config: /etc/asterisk/woomera.conf
--> Start: start asterisk (part of asterisk)

---------------------------------


Installing SMG BRI Daemon...

----------------------------------------
Sangoma BRI Installation Complete

 -> To configure for BRI run:
 -> /usr/bin/wancfg_smg

----------------------------------------
Append sample config in Asterisk Extensions and Iax Conf (y/n) y
cat: ./conf_bri/woomera_ext.conf: Datei oder Verzeichnis nicht gefunden
Asterisk extensions.conf file updated with woomera config
cat: ./conf_bri/woomera_iax.conf: Datei oder Verzeichnis nicht gefunden
Asterisk iax.conf file updated with bri guest config
Press [Enter] to continue... enter
[...]

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/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 / SMG BRI Configuration
===============================

wancfg_smg configurator can create all wanpipe devices
for BRI as well as BRI config file and Asterisk config files.
-----------------------------------------------------
Would you like to configure wanpipe devices for SMG BRI/Asterisk/CallWeaver? (y/n) y
[...]

Generating configuration files for Sangoma Media Gateway
[...]
------------------------------------
Configuring ISDN BRI cards [A500]
------------------------------------

Jetzt geht es um die Konfiguration der BRI-Ports. Zur Erinnerung: „Point to multipoint“ bedeutet Mehrgeräteanschluss, also „normales“ ISDN, und „Point to point“ steht für den Anlagenanschluss:

-----------------------------------------------------------
A500 detected on slot:8 bus:0
-----------------------------------------------------------


Would you like to configure AFT-A500 port 1 on slot:8 bus:0
 1. YES
 2. NO
 3. Exit
[1-3]: 1
Configuring port 1 on AFT-A500 [slot:8 bus:0 span:1]

Select connection type for port 1
 1. Point to multipoint
 2. Point to point
[1-2, ENTER='Point to multipoint']: 1
Input the group for this port
: 1
Select dialplan context for group:1
 1. from-pstn
 2. Custom
[1-2]: 1
Configuring span:1 as TEI:127
 1. YES - Keep this setting
 2. NO  - Specify a different TEI
[1-2, ENTER='YES']: enter

Das Gleiche machen wir noch einmal für Port 2, 3, 4, 5 und 6 (je nachdem, wie viele Module wir eingesteckt haben):

[...]

Would you like to configure AFT-A500 port 2 on slot:8 bus:0
 1. YES
 2. NO
 3. Exit
[1-3, ENTER='YES']: enter
Configuring port 2 on AFT-A500 [slot:8 bus:0 span:2]

Select connection type for port 2
 1. Point to multipoint
 2. Point to point
[1-2, ENTER='Point to multipoint']: enter
Input the group for this port
def="1": 1
Configuring span:2 as TEI:127
 1. YES - Keep this setting
 2. NO  - Specify a different TEI
[1-2, ENTER='YES']: enter
[...]

ISBN BRI card configuration complete
Press any key to continue: enter
Would you like to configure A500 BRI card as timing source for Zaptel?
(Visit http://wiki.sangoma.com/wanpipe-linux-asterisk-appendix#bri-tdmv for more information)
 1. YES
 2. NO
[1-2]:
2
[...]

###################################################################
#                             SUMMARY                             #
###################################################################

  0 T1/E1 port(s) detected, 0 configured
  2 ISDN BRI port(s) detected, 2 configured
  0 analog card(s) detected, 0 configured

Configurator will create the following files:
        1. Wanpipe config files in /etc/wanpipe
        2. sangoma_brid config file /etc/wanpipe/smg_bri
        3. Zapata config file /etc/asterisk/zapata.conf


Your original configuration files will be saved to:

Your configuration has been saved in /etc/wanpipe/debug-2009-02-23.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
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
[...]

Would you like to continue?
 1. No - exit
 2. YES
[1-2, ENTER='No']: 2
[...]

Wanrouter start complete...
Current boot level is 2

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
Verifying Zaptel boot scripts...Enabled (level:15)
Verifying Zaptel shutdown scripts...Enabled (level:30)
Enabling wanrouter boot scripts ...(level:14)
Enabling wanrouter shutdown scripts ...(level:29)
Verifying Network boot scripts...Not installed
Would you like smg_ctrl to start/stop on wanrouter start?
 1. YES
 2. NO
[1-2]: 1
smgbri start scrtip installed scuessfully
smgbri stop script installed successfully
Sangoma cards configuration complete, exiting...

Runlevel

Im Default-Runlevel 2 sollten jetzt folgende Einträge stehen:

debian:/usr/src/wanpipe-3.6.0# ls -l /etc/rc2.d/
[...]
lrwxrwxrwx 1 root root  19 10. Jan 12:00 S14wanrouter -> ../init.d/wanrouter
lrwxrwxrwx 1 root root  16 10. Jan 12:00 S15zaptel -> ../init.d/zaptel
lrwxrwxrwx 1 root root  18 10. Jan 12:00 S16smg_ctrl -> ../init.d/smg_ctrl
[...]
lrwxrwxrwx 1 root root  18 10. Jan 12:00 S50asterisk -> ../init.d/asterisk

Wichtig sind dabei nicht die genauen Nummern, sondern die Reihenfolge beim Hochfahren: wanrouter, zaptel, smg_ctrl, asterisk.

Falls dies nicht der Fall ist oder Sie andere Runlevel bevorzugen, können Sie diese folgendermaßen einrichten:

debian:/usr/src/wanpipe-3.6.0# update-rc.d -f smg_ctrl remove
debian:/usr/src/wanpipe-3.6.0# update-rc.d smg_ctrl defaults 16 20

Konfiguration für die A500

Das Setup-Skript hat die Konfiguration für die Sangoma A500 bereits für uns angelegt. Daher soll die Konfigurationsdatei hier nur der Vollständigkeit halber erwähnt werden. Wenn man im Setup alles richtig eingegeben hat, muss man nichts verändern. Sollte man die Konfiguration der Ports erneut vornehmen wollen, kann man später setup-sangoma aufrufen.

Wanpipe

Die Wanpipe-Konfiguration befindet sich im Verzeichnis /etc/wanpipe/. Darin gibt es mehrere Dateien wanpipeX.conf, wobei X für die Nummer des Ports steht. 1 bis 6 sind die BRI-Ports.

Sangoma Media Gateway (SMG)/Woomera

An der Datei /etc/sangoma_mgd.conf müssen wir nichts ändern. Auch die /etc/wanpipe/smg_bri.conf kann fast so bleiben, wie sie ist. Für eine detaillierte Beschreibung der Parameter siehe http://wiki.sangoma.com/BriAdvancedOptions. Das einzige, was wir hier ändern. ist:

national_prefix=0
international_prefix=00

Asterisk

Im Folgenden sehen Sie die Einstellungen in der Asterisk-Konfiguration für die Sangoma A500.

woomera.conf für die A500

Auch die Konfiguration der BRI-Kanäle in der /etc/asterisk/woomera.conf für chan_woomera ist fertig:

[settings]
debug=2

[default]
host=localhost
port=42420
audio_ip=127.0.0.1
default_context=sangoma
debug=2
dtmf_enable=1
jb_enable=0
progress_enable=0

context=from-pstn
group=1
extensions.conf für die A500

Nun erzeugen wir noch die /etc/asterisk/extensions.conf:

; Context(e) für Anrufe die von den BRI-Ports der A500
; eingehen. Der Name entspricht dem/den in der
; /etc/asterisk/woomera.conf eingestellten Context(en).

[from-pstn]

exten => _X.,1,Verbose(1,### Eingehender Anruf von ${CALLERID(num)} an ${EXTEN})
exten => _X.,n,Ringing()
exten => _X.,n,Wait(8)
exten => _X.,n,Answer()
exten => _X.,n,Playback(demo-congrats)
exten => _X.,n,Hangup()

exten => 123456,1,Verbose(1,### Eingehender Anruf von ${CALLERID(num)} an ${EXTEN})
exten => 123456,n,Dial(SIP/10)
exten => 123456,n,Hangup()

; Context(e) für Anrufe von intern, also z. B. von einem SIP-Endgerät in Richtung Festnetz über die Sangoma-Karte
[from-internal]

exten => _X.,1,Verbose(1,### Anruf von intern an ${EXTEN})
exten => _X.,n,Dial(WOOMERA/g1/${EXTEN})  ; Gruppe 1
exten => _X.,n,Hangup()

Wichtige Befehle für Wanpipe

Folgende Befehle sind beim Arbeiten mit Wanpipe/Wanrouter nützlich und zeigen Informationen über die verbaute A500-Karte an.

wanrouter version oder /etc/init.d/wanrouter version zeigt die installierte Version von Wanpipe:

debian:~# wanrouter version

WANPIPE Release: 3.3.15

wanrouter summary oder /etc/init.d/wanrouter summary zeigt eine Übersicht über die Konfigurationsdateien /etc/wanpipe/wanpipe*.conf[185]:

debian:~# wanrouter summary

Configuration File Summary in : /etc/wanpipe/

Device          Protocol        Type   Cpu/Io Slot/Irq  Bus     State
------------------------------------------------------------------------
wanpipe1        WAN_AFT_ISDN_BRI        PCI     A       8       0       Connected
wanpipe2        WAN_AFT_ISDN_BRI        PCI     A       8       0       Connected

wanrouter status oder /etc/init.d/wanrouter status zeigt den Status aller aktiven Ports[186]:

debian:~# wanrouter status

Devices currently active:
        wanpipe1 wanpipe2


Wanpipe Config:

Device name | Protocol Map | Adapter  | IRQ | Slot/IO | If's | CLK | Baud rate |
wanpipe1    | N/A          | A500     | 17  | 8       | 1    | N/A | 0         |
wanpipe2    | N/A          | A500     | 17  | 8       | 1    | N/A | 0         |

Wanrouter Status:

Device name | Protocol | Station | Status        |
wanpipe1    | AFT ISDN | N/A     | Connected     |
wanpipe2    | AFT ISDN | N/A     | Connected     |

wanrouter hwprobe oder /etc/init.d/wanrouter hwprobe zeigt Informationen über die installierte Wanpipe-Hardware an:

debian:~# wanrouter hwprobe

-------------------------------
| Wanpipe Hardware Probe Info |
-------------------------------
1 . AFT-A500-SH : SLOT=8 : BUS=0 : IRQ=17 : PORT=1 : HWEC=64 : V=32
2 . AFT-A500-SH : SLOT=8 : BUS=0 : IRQ=17 : PORT=2 : HWEC=64 : V=32

Card Cnt: A500=1 

wanrouter hwprobe verbose funktioniert wie wanrouter hwprobe, zeigt aber noch zusätzliche Informationen wie den TE/NT-Modus an:

debian:~# wanrouter hwprobe verbose

-----------------------------------------
| Wanpipe Hardware Probe Info (verbose) |
-----------------------------------------
1 . AFT-A500-SH : SLOT=8 : BUS=0 : IRQ=17 : PORT=1 : HWEC=64 : V=32
+01:TE: PCI:C01
2 . AFT-A500-SH : SLOT=8 : BUS=0 : IRQ=17 : PORT=2 : HWEC=64 : V=32
+02:TE: PCI:C01

Card Cnt: A500=1
 

Und dann gibt es natürlich die ganz normalen Befehle /etc/init.d/wanrouter {start|stop|restart} wie bei jedem Skript in /etc/init.d/ zum Starten bzw. Stoppen des Dienstes.

Durch den Aufruf von wanrouter ohne weitere Optionen erhalten Sie eine Liste aller möglichen Befehle.

Mit wanpipemon -g bekommen Sie ein grafisches Menü zur Analyse der Wanpipe-Ports.

Mittels cat /proc/interrupts können Sie prüfen, ob sich die Karte PCI-Interrupts mit anderen Geräten (Festplatte, Netzwerkkarte, ...) teilen muss.

debian:~# cat /proc/interrupts 
[...]
  17:     123533   IO-APIC-fasteoi   wanpipe1, wanpipe2

Experten finden weitere Status-Informationen in speziellen Dateien im Verzeichnis /proc/net/wanrouter/.



[177] abgekürzt: PCIe oder PCI-E (nicht PCI-X), http://de.wikipedia.org/wiki/PCI-Express

[178] Falls Sie wirklich 48 B-Kanäle betreiben wollen, sollten Sie allerdings über einen PRI- (auch S2M- oder Multiplex-)Anschluss nachdenken. Ein solcher Anschluss ist meistens günstiger und einfacher.

[179] Terminal Equipment, Endeinrichtung, d. h., unsere Seite agiert als Endgerät, also extern.

[180] Network Termination, Netzabschluss, die Seite, die einem Endgerät eine Teilnehmeranschlussleitung (TAL, engl.: local loop) bereitstellt, also intern

[181] 8P8C

[182] Die Vorgängerversion 4 („Etch“) funktioniert ebenfalls.

[183] Falls vorher bereits eine ältere Version von Asterisk installiert war, müssen Sie zuerst die alten Module entfernen:

debian:~# rm -rf /usr/lib/asterisk/modules

[184] Hätten wir sie noch nicht, müssten wir sie so installieren:

debian:~# aptitude install build-essential flex bison libncurses5-dev
debian:~# aptitude install linux-headers-`uname -r`

[185] Die Ausgabe wurde hier etwas in der Breite gekürzt.

[186] Die Ausgabe wurde hier etwas in der Breite gekürzt.


AMOOCON 2010

Noch kein Ticket? Dann wird es Zeit. Nur noch wenige Tage.

Twitter

Flattr

Das gedruckte Buch

Werbung