====== Плата Digium TDM ======
* [[https://wiki.asterisk.org/wiki/display/DAHDI/DAHDI|Digium Asterisk Hardware Device Interface (DAHDI)]]
* [[http://www.pbxware.ru/catalog/platy_digium/analogovye_platy/plata_digium_a4a00f/|Плата Digium A4A00F]]
* [[http://www.asteriskguru.com/tutorials/wildcard_tdm400p.html|How to install and configure Wildcard TDM400p]]
* [[https://www.mikeslab.net/?p=381|Asterisk 13/DAHDI: Setting up an FXO Channel]]
* [[http://parabel.ru/articles/echo/|Эхоподавление в Asterisk]]
* [[https://en.wikipedia.org/wiki/Loop_start|Loop start, Kewlstart]]
См. /* http://www.asteriskguru.com/tutorials/resolving_hangup_detection_problems_fxo_tdm_voicemail.html */ комментарий
$ lspci | grep TDM
01:09.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11)
$ dmesg | grep 01:09.0
[ 0.153287] pci 0000:01:0a.0: [d161:8005] type 00 class 0x020000
[ 0.153304] pci 0000:01:0a.0: reg 0x10: [io 0xe800-0xe8ff]
[ 0.153315] pci 0000:01:0a.0: reg 0x14: [mem 0xfbfffc00-0xfbffffff]
[ 0.153355] pci 0000:01:0a.0: reg 0x30: [mem 0xfbfc0000-0xfbfdffff pref]
[ 0.153388] pci 0000:01:0a.0: supports D1 D2
[ 0.153390] pci 0000:01:0a.0: PME# supported from D0 D1 D2 D3hot D3cold
Можно сразу **asterisk-dahdi**
Время: 3-4 минуты
# apt install dahdi
$ dahdi_hardware
pci:0000:01:0a.0 wctdm24xxp+ d161:8005 Wildcard TDM410P
# init 6
$ dmesg | grep 01:09.0
...
[ 12.263151] wctdm24xxp 0000:01:0a.0: Port 1: Installed -- AUTO FXS/DPO
[ 12.263155] wctdm24xxp 0000:01:0a.0: Port 2: Not installed
[ 12.263157] wctdm24xxp 0000:01:0a.0: Port 3: Not installed
[ 12.263160] wctdm24xxp 0000:01:0a.0: Port 4: Installed -- AUTO FXO (FCC mode)
[ 13.556239] wctdm24xxp 0000:01:0a.0: Found a Wildcard TDM: Wildcard TDM410P (0 BRI spans, 2 an
$ lsmod | grep dah
dahdi_voicebus 57344 1 wctdm24xxp
dahdi 217088 2 wctdm24xxp,dahdi_voicebus
# dahdi_span_assignments auto
Не обязательно:
# cat /etc/dahdi/genconf_parameters
lc_country ru
# dahdi_genconf -v
Default parameters from /etc/dahdi/genconf_parameters
Generating /etc/dahdi/assigned-spans.conf
Generating /etc/dahdi/system.conf
Generating /etc/asterisk/dahdi-channels.conf
/usr/sbin/dahdi_genconf: Failed to open /etc/asterisk/dahdi-channels.conf: No such file or directory
# dahdi_scan -vvvvv
[1]
active=yes
alarms=OK
description=Wildcard TDM410P
name=WCTDM/0
manufacturer=Digium
devicetype=Wildcard TDM410P
location=PCI Bus 01 Slot 11
basechan=1
totchans=4
irq=0
type=analog
port=1,FXS
port=2,none
port=3,none
port=4,FXO
# less /etc/dahdi/system.conf
# Autogenerated by /usr/sbin/dahdi_genconf on Mon Jul 2 16:09:11 2018
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCTDM/0 "Wildcard TDM410P" (MASTER)
fxoks=1
echocanceller=oslec,1
# channel 2, WCTDM/0/1, no module.
# channel 3, WCTDM/0/2, no module.
fxsks=4
echocanceller=oslec,4
# Global data
loadzone = us
defaultzone = us
# ls -l /dev/dahdi/channel
Время: 1-2 минуты
# apt install asterisk-dahdi
# init 6
# ls -l /dev/dahdi/channel
# dahdi_genconf -v
# cat /etc/asterisk/dahdi-channels.conf
; Autogenerated by /usr/sbin/dahdi_genconf on Mon Jul 10 12:46:23 2017
;;; line="1 WCTDM/0/0 FXOKS"
signalling=fxo_ks
callerid="Ivan Ivanov" <101>
context=default
channel => 1
;;; line="4 WCTDM/0/3 FXSKS"
signalling=fxs_ks
callerid=asreceived
context=from-101
channel => 4
# cat /etc/asterisk/chan_dahdi.conf
...
[channels]
#include /etc/asterisk/dahdi-channels.conf
...
# cat /etc/asterisk/extensions.conf
[default]
exten => 101,1,Dial(DAHDI/1)
exten => 102,1,Dial(DAHDI/2)
exten => _1XX/101,1,Dial(DAHDI/4/${EXTEN})
exten => _1XX/102,1,Dial(DAHDI/3/${EXTEN})
[from-101]
exten => s,1,Goto(default,101,1)
[from-102]
exten => s,1,Goto(default,102,1)
# cat /etc/asterisk/modules.conf
[modules]
;bug ubuntu 16
noload => res_pjsip.so
...
*CLI> dahdi show channels
# apt purge asterisk-dahdi asterisk-config asterisk dahdi-linux
# apt autoremove
# rm -r /etc/asterisk/ /etc/dahdi/
# init 6