Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
voip:asterisk:isdn [08.03.2011 13:40. ] – [Konfiguration] djangovoip:asterisk:isdn [31.10.2023 18:48. ] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
 +====== Asterisk Anbindung ans ISDN ======
 +
 +{{voip:asterisk.gif|Asterisk Logo}} \\
 +\\
 +Da wir mit unserem Asterisk nicht nur //hausintern// telefonieren wollen, sondern auch raus in der große weite Welt, werden wir eine Verbindung zum ISDN herstellen. Hierzu verwenden wir eine [[https://www.avm.de/de/Produkte/Weitere/FRITZ_Card_PCI/index.php|FRITZ!Card PCI]].\\
 +===== Installation =====
 +Dank des [[voip:asterisk:repo|Asterisk-Repository]] gestaltet sich die Installation von **mISDN** und der für **Asterisk 1.6** sehr einfach.\\
 +Wir installieren uns also die folgenden Pakete: **asterisk16-misdn**, **mISDN**, **mISDNuser** und **kmod-mISDN**
 +  # yum install asterisk16-misdn mISDN mISDNuser kmod-mISDN
 +Was uns die Pakete alles mitbringt, offenbart uns jeweils der Aufruf von **rpm -iql** *PAKETNAME*. 
 +==== asterisk16-misdn ====
 +  # rpm -iql asterisk16-misdn
 +<code>Name        : asterisk16-misdn             Relocations: (not relocatable)
 +Version     : 1.6.2.6                           Vendor: Digium, Inc.
 +Release     : 1_centos5                     Build Date: Mi 17 Mär 2010 19:31:43 CET
 +Install Date: Mo 12 Apr 2010 20:21:32 CEST      Build Host: localhost.localdomain
 +Group       : Utilities/System              Source RPM: asterisk16-1.6.2.6-1_centos5.src.rpm
 +Size        : 1007659                          License: GPL
 +Signature   : (none)
 +Packager    : Jason Parker <jparker@digium.com>
 +URL         : https://www.asterisk.org
 +Summary     : mISDN channel driver for Asterisk
 +Description :
 +mISDN channel driver for Asterisk
 +/usr/lib/asterisk/modules/chan_misdn.so</code>
 +==== misdn ====
 +  # rpm -iql mISDN
 +<code>Name        : mISDN                        Relocations: (not relocatable)
 +Version     : 1.1.7.2                           Vendor: mISDN
 +Release     : 3_centos5                     Build Date: Do 30 Jul 2009 23:59:51 CEST
 +Install Date: Mo 12 Apr 2010 20:21:31 CEST      Build Host: localhost.localdomain
 +Group       : Utilities/System              Source RPM: mISDN-1.1.7.2-3_centos5.src.rpm
 +Size        : 65785                            License: GPL
 +Signature   : (none)
 +Packager    : Jason Parker <jparker@digium.com>
 +URL         : https://www.misdn.org/
 +Summary     : The mISDN project
 +Description :
 +The mISDN project
 +/etc/init.d/mISDN
 +/etc/init.d/misdn-init
 +/etc/modprobe.d/mISDN
 +/etc/modules.d/mISDN
 +/usr/lib/mISDN
 +/usr/lib/mISDN/mISDN.conf.bnx.xsl
 +/usr/lib/mISDN/mISDN.conf.hfcmulti.xsl
 +/usr/lib/mISDN/mISDN.conf.hfcsusb.xsl
 +/usr/lib/mISDN/mISDN.conf.inc.xsl
 +/usr/lib/mISDN/mISDN.conf.l1oip.xsl
 +/usr/lib/mISDN/mISDN.conf.mISDN_debugtool.xsl
 +/usr/lib/mISDN/mISDN.conf.mISDN_dsp.xsl
 +/usr/lib/mISDN/mISDN.conf.singlepci.xsl
 +/usr/lib/mISDN/mISDN.conf.xhfc.xsl
 +/usr/lib/mISDN/mISDN.conf.xsl
 +/usr/sbin/mISDN
 +/usr/sbin/misdn-init</code>
 +==== mISDNuser ====
 +  # rpm -iql mISDNuser
 +<code>Name        : mISDNuser                    Relocations: (not relocatable)
 +Version     : 1.1.7.2                           Vendor: mISDN
 +Release     : 1_centos5                     Build Date: Mi 06 Aug 2008 18:04:25 CEST
 +Install Date: Mo 12 Apr 2010 20:21:10 CEST      Build Host: localhost.localdomain
 +Group       : Utilities/System              Source RPM: mISDNuser-1.1.7.2-1_centos5.src.rpm
 +Size        : 859322                           License: GPL
 +Signature   : (none)
 +Packager    : Jason Parker <jparker@digium.com>
 +URL         : https://www.misdn.org/
 +Summary     : The mISDNuser project
 +Description :
 +The open source mISDNuser project
 +/usr/bin/loadfirm
 +/usr/bin/mISDNdebugtool
 +/usr/bin/misdnportinfo
 +/usr/bin/sendhwctrl
 +/usr/bin/testcon
 +/usr/bin/testcon_l2
 +/usr/bin/testlayer1
 +/usr/bin/testlayer3
 +/usr/bin/testlib
 +/usr/bin/tstlib
 +/usr/bin/voipisdn
 +/usr/lib/libisdnnet.so
 +/usr/lib/libmISDN.so
 +/usr/lib/libsuppserv.so</code>
 +==== kmod-mISDN ====
 +  # rpm -iql kmod-mISDN
 +<code>Name        : kmod-mISDN                   Relocations: (not relocatable)
 +Version     : 1.1.7.2                           Vendor: beroNet GmbH
 +Release     : 3_centos5.2.6.18_164.15.1.el5   Build Date: Mo 12 Apr 2010 17:30:25 CEST
 +Install Date: Mo 12 Apr 2010 20:21:06 CEST      Build Host: localhost.localdomain
 +Group       : System Environment/Kernel     Source RPM: mISDN-kmod-1.1.7.2-3_centos5.2.6.18_164.15.1.el5.src.rpm
 +Size        : 8450722                          License: GPL
 +Signature   : (none)
 +Packager    : Jason Parker <jparker@digium.com>
 +URL         : https://www.misdn.org/
 +Summary     : mISDN kernel module(s)
 +Description :
 +This package provides the mISDN kernel modules built for the Linux
 +kernel 2.6.18-164.15.1.el5 for the i686 family of processors.
 +/lib/modules/2.6.18-164.15.1.el5
 +/lib/modules/2.6.18-164.15.1.el5/extra
 +/lib/modules/2.6.18-164.15.1.el5/extra/avmfritz.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/hfcmulti.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/hfcpci.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/hfcsmini.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/hfcsusb.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/l3udss1.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_capi.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_core.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_debugtool.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_dsp.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_dtmf.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_isac.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_l1.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_l2.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/mISDN_x25dte.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/sedlfax.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/w6692pci.ko
 +/lib/modules/2.6.18-164.15.1.el5/extra/xhfc.ko</code>
 +===== Konfiguration =====
 +Als erstes suchen wir nach unserer/unseren installierten ISDN-Karten. Hierzu rufen wir den **mISDN-Daemon** mit der Option //scan// auf.
 +  # service mISDN scan
 +<code>1 mISDN compatible device(s) found:
 +>> avmfritz</code>
 +Als nächstes legen wir die Konfigurationsdatei für mISDN unter //**/etc/mISDN.conf**// an - auch das geht einfach von Statten. Wir rufen den Daemon mit der Option //config// auf.
 +  # service mISDN config
 +<code>Writing /etc/mISDN.conf for 1 mISDN compatible device(s):
 +>> avmfritz</code>
 +Mit Hilfe des vorgenannten Aufrufes wird automatisch die Konfigurationsdatei angelegt.
 +<code xml >
 +<?xml version="1.0"?>
 +<!--
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Card Type: BN2S0, BN4S0, BN8S0
 +Card Attributes: ulaw=(yes|no), dtmf=(yes|no), pcm_slave=(yes|no),
 +                 ignore_pcm_frameclock=(yes|no), rxclock=(yes|no),
 +                 crystalclock=(yes|no), watchdog=(yes|no)
 +Port Attributes: mode=(te|nt), link=(ptp|ptmp), master-clock=(yes|no),
 +                 capi=(yes|no)
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Card Type: BN2E1
 +Card Attributes: ulaw=(yes|no), dtmf=(yes|no), pcm_slave=(yes|no),
 +                 ignore_pcm_frameclock=(yes|no), rxclock=(yes|no),
 +                 crystalclock=(yes|no), watchdog=(yes|no)
 +Port Attributes: mode=(te|nt), link=(ptp|ptmp), optical=(yes|no), los=(yes|no),
 +                 ais=(yes|no), slip=(yes|no), nocrc4=(yes|no), capi=(yes|no)
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Card Type: hfcmulti, avmfritz, w6692pci
 +Port Attributes: mode=(te|nt), link=(ptp|ptmp), capi=(yes|no)
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Module: hfcmulti
 +Options: poll=<number>, pcm=<number>, debug=<number>, timer=(yes|no)
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Module: hfcsusb
 +Options: debug=<number> poll=<number>
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Module: xhfc
 +Options: debug=<number>
 +Port Attributes: mode=(te|nt), link=(ptp|ptmp), line=(s0|up) capi=(yes|no)
 +                 lineloop_b1=(yes|no) lineloop_b2=(yes|no), lineloop_d=(yes|no)
 +                 polx=(yes|no)
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +Module: mISDN_dsp
 +Options: debug=<number>, options=<number>, poll=<number>,
 +         dtmfthreshold=<number>
 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 +-->
 +<mISDNconf>
 +        <module poll="128" debug="0" timer="no">hfcmulti</module>
 +        <module debug="0" options="0">mISDN_dsp</module>
 +        <devnode user="root" group="root" mode="644">mISDN</devnode>
 +        <card type="avmfritz">
 +                <port mode="te" link="ptmp">1</port>
 +        </card>
 +</mISDNconf>
 +</code>
 +===== mISDN Daemon starten =====
 +==== erster Programmstart ====
 +Zum Laden der Kernelmodule und zum Starten des **mISDN**-Daemon erfolgt mit:
 +  # service mISDN start
 +<code>-- Loading mISDN modules --
 +>> /sbin/modprobe --ignore-install capi
 +>> /sbin/modprobe --ignore-install mISDN_core debug=0
 +>> /sbin/modprobe --ignore-install mISDN_l1 debug=0
 +>> /sbin/modprobe --ignore-install mISDN_l2 debug=0
 +>> /sbin/modprobe --ignore-install l3udss1 debug=0
 +>> /sbin/modprobe --ignore-install mISDN_capi
 +>> /sbin/modprobe --ignore-install avmfritz protocol=0x2 layermask=0xf
 +>> /sbin/modprobe --ignore-install mISDN_dsp debug=0 options=0
 +creating device node: /dev/mISDN</code>
 +Der Start wird uns im **syslog** entsprechend positiv vermerkt.
 +<code>Apr 12 21:09:28 office kernel: CAPI Subsystem Rev 1.1.2.8
 +Apr 12 21:09:28 office kernel: capifs: Rev 1.1.2.3
 +Apr 12 21:09:28 office kernel: capi20: Rev 1.1.2.7: started up with major 68 (middleware+capifs)
 +Apr 12 21:09:28 office kernel: Modular ISDN Stack core version (1_1_7_2) revision ($Revision: 1.40 $)
 +Apr 12 21:09:28 office kernel: ISDN L1 driver version 1.20
 +Apr 12 21:09:28 office kernel: ISDN L2 driver version 1.32
 +Apr 12 21:09:28 office kernel: mISDN: DSS1 Rev. 1.47
 +Apr 12 21:09:28 office kernel: mISDN Capi 2.0 driver file version 1.21
 +Apr 12 21:09:28 office kernel: ISAC module $Revision: 1.18 $
 +Apr 12 21:09:28 office kernel: AVM Fritz PCI/PnP driver Rev. 1.43
 +Apr 12 21:09:28 office kernel: ACPI: PCI Interrupt 0000:06:01.0[A] -> GSI 19 (level, low) -> IRQ 177
 +Apr 12 21:09:28 office kernel: mISDN_fcpcipnp: found adapter Fritz!Card PCI v2 at 0000:06:01.0
 +Apr 12 21:09:28 office kernel: AVM PCI V2: stat 0x243020e
 +Apr 12 21:09:28 office kernel: AVM PCI V2: Class E Rev 2
 +Apr 12 21:09:28 office kernel: AVM PnP: HDLC version 2
 +Apr 12 21:09:28 office kernel: mISDN: AVM Fritz!PCIv2 config irq:177 base:0xD000
 +Apr 12 21:09:28 office kernel: AVM PCI/PnP: reset
 +Apr 12 21:09:28 office kernel: AVM PCI/PnP: S0/S1 40/2
 +Apr 12 21:09:28 office kernel: mISDN_isac_init: ISACSX
 +Apr 12 21:09:28 office kernel: AVM Fritz!PCI: IRQ 177 count 2
 +Apr 12 21:09:28 office kernel: fritz 1 cards installed
 +Apr 12 21:09:28 office kernel: mISDN_dsp: Audio DSP  Rev. 1.29 (debug=0x0) EchoCancellor MG2 dtmfthreshold(100)
 +Apr 12 21:09:28 office kernel: mISDN_dsp: DSP clocks every 64 samples. This equals 8 jiffies.</code>
 +Mit **misdnportinfo** kann nun zum einen geprüft werden, ob die Module korrekt geladen wurden, und zum anderen die momentane Portkonfiguration ausgegeben werden: 
 +  # misdnportinfo 
 +<code>
 +Port  1: TE-mode BRI S/T interface line (for phone lines)
 + -> Protocol: DSS1 (Euro ISDN)
 + -> childcnt: 2
 +--------
 +
 +mISDN_close: fid(3) isize(131072) inbuf(0x9358060) irp(0x9358060) iend(0x9358060)
 +</code>
 +
 +==== automatischer Programmstart ====
 +Damit unser mISDN-Daemon automatisch bei jedem Systemstart starten kann ergänzen wir noch das startscript //**/etc/init.d/mISDN**//. Am Anfang der Datei tragen wir folgende Zeilen ein.
 +   # vim /etc/init.d/mISDN
 +<code>#!/bin/bash
 +#
 +# mISDN       Start up mISDN subsystem
 +#
 +# chkconfig: 2345 10 90
 +# description: Activates/Deactivates mISDN subsystem for Asterisk telephony server
 +#
 +### BEGIN INIT INFO
 +# Provides: $mISDN
 +### END INIT INFO
 +
 +</code>
 +Der Automatische Start kann nun durch Aufruf des folgenden Befehles erreicht werden:
 +  # chkconfig mISDN on
 +Ein Überprüfung ob der Dienst (Daemon) mISDN wirklich bei jedem Systemstart automatisch mit gestartet wird, kann durch folgenden Befehl erreicht werden:
 +  # chkconfig --list | grep mISDN
 +  mISDN            0:Aus   1:Aus   2:Aus   3:Ein   4:Ein   5:Ein   6:Aus
 +
 +Wichtig ist jeweils der Schalter **on** bei den Runleveln - **3 4 5**.