This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
плата_digium_tdm [2017/07/11 11:30] val |
плата_digium_tdm [2021/03/23 07:46] (current) val |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Плата Digium TDM ====== | ====== Плата 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.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]] | * [[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]] | * [[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]] | ||
- | <code> | + | См. /* http://www.asteriskguru.com/tutorials/resolving_hangup_detection_problems_fxo_tdm_voicemail.html */ комментарий |
- | # lspci | grep -i tdm | + | |
- | 01:0a.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11) | + | |
- | # dmesg | grep 0000:01:0a.0 | + | <code> |
+ | $ lspci | grep TDM | ||
+ | 01:09.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11) | ||
+ | </code><code> | ||
+ | $ dmesg | grep 01:09.0 | ||
[ 0.153287] pci 0000:01:0a.0: [d161:8005] type 00 class 0x020000 | [ 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.153304] pci 0000:01:0a.0: reg 0x10: [io 0xe800-0xe8ff] | ||
Line 16: | Line 21: | ||
[ 0.153388] pci 0000:01:0a.0: supports D1 D2 | [ 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 | [ 0.153390] pci 0000:01:0a.0: PME# supported from D0 D1 D2 D3hot D3cold | ||
+ | </code> | ||
+ | Можно сразу **asterisk-dahdi** | ||
+ | Время: 3-4 минуты | ||
+ | <code> | ||
# apt install dahdi | # apt install dahdi | ||
- | + | </code><code> | |
- | # dahdi_hardware | + | $ dahdi_hardware |
pci:0000:01:0a.0 wctdm24xxp+ d161:8005 Wildcard TDM410P | pci:0000:01:0a.0 wctdm24xxp+ d161:8005 Wildcard TDM410P | ||
+ | </code><code> | ||
# init 6 | # init 6 | ||
- | + | </code><code> | |
- | # dmesg | grep 0000:01:0a.0 | + | $ dmesg | grep 01:09.0 |
- | ... | + | |
- | [ 12.895133] wctdm24xxp 0000:01:0a.0: Port 1: Installed -- AUTO FXS/DPO | + | |
... | ... | ||
- | [ 12.895143] wctdm24xxp 0000:01:0a.0: Port 4: Installed -- AUTO FXO (FCC mode) | + | [ 12.263151] wctdm24xxp 0000:01:0a.0: Port 1: Installed -- AUTO FXS/DPO |
- | [ 14.211217] wctdm24xxp 0000:01:0a.0: Found a Wildcard TDM: Wildcard TDM410P (0 BRI spans, 2 analog channels) | + | [ 12.263155] wctdm24xxp 0000:01:0a.0: Port 2: Not installed |
- | + | [ 12.263157] wctdm24xxp 0000:01:0a.0: Port 3: Not installed | |
- | root@VAL:~# lsmod | grep dah | + | [ 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 | ||
+ | </code><code> | ||
+ | $ lsmod | grep dah | ||
dahdi_voicebus 57344 1 wctdm24xxp | dahdi_voicebus 57344 1 wctdm24xxp | ||
dahdi 217088 2 wctdm24xxp,dahdi_voicebus | dahdi 217088 2 wctdm24xxp,dahdi_voicebus | ||
- | + | </code><code> | |
- | root@VAL:~# dahdi_scan -vvvvv | + | # dahdi_span_assignments auto |
+ | </code> | ||
+ | Не обязательно: | ||
+ | <code> | ||
+ | # cat /etc/dahdi/genconf_parameters | ||
+ | lc_country ru | ||
+ | </code><code> | ||
+ | # 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 | ||
+ | </code><code> | ||
+ | # dahdi_scan -vvvvv | ||
+ | </code><code> | ||
[1] | [1] | ||
active=yes | active=yes | ||
Line 53: | Line 77: | ||
port=3,none | port=3,none | ||
port=4,FXO | port=4,FXO | ||
+ | </code><code> | ||
+ | # less /etc/dahdi/system.conf | ||
+ | </code><code> | ||
+ | # 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 | ||
- | # dahdi_span_assignments auto | + | loadzone = us |
- | + | defaultzone = us | |
- | # cat /etc/dahdi/genconf_parameters | + | </code><code> |
- | lc_country ru | + | # ls -l /dev/dahdi/channel |
+ | </code> | ||
+ | Время: 1-2 минуты | ||
+ | <code> | ||
+ | # apt install asterisk-dahdi | ||
+ | </code><code> | ||
+ | # init 6 | ||
+ | </code><code> | ||
+ | # ls -l /dev/dahdi/channel | ||
+ | </code><code> | ||
# dahdi_genconf -v | # dahdi_genconf -v | ||
- | + | </code><code> | |
- | # cat /etc/dahdi/system.conf | + | |
# cat /etc/asterisk/dahdi-channels.conf | # cat /etc/asterisk/dahdi-channels.conf | ||
+ | </code><code> | ||
; Autogenerated by /usr/sbin/dahdi_genconf on Mon Jul 10 12:46:23 2017 | ; Autogenerated by /usr/sbin/dahdi_genconf on Mon Jul 10 12:46:23 2017 | ||
;;; line="1 WCTDM/0/0 FXOKS" | ;;; line="1 WCTDM/0/0 FXOKS" | ||
signalling=fxo_ks | signalling=fxo_ks | ||
- | callerid="Ivanov I I" <101> | + | callerid="Ivan Ivanov" <101> |
context=default | context=default | ||
channel => 1 | channel => 1 | ||
Line 78: | Line 127: | ||
context=from-101 | context=from-101 | ||
channel => 4 | channel => 4 | ||
- | + | </code><code> | |
- | /etc/asterisk/chan_dahdi.conf | + | # cat /etc/asterisk/chan_dahdi.conf |
+ | </code><code> | ||
+ | ... | ||
+ | [channels] | ||
#include /etc/asterisk/dahdi-channels.conf | #include /etc/asterisk/dahdi-channels.conf | ||
+ | ... | ||
+ | </code><code> | ||
# cat /etc/asterisk/extensions.conf | # cat /etc/asterisk/extensions.conf | ||
+ | </code><code> | ||
[default] | [default] | ||
exten => 101,1,Dial(DAHDI/1) | exten => 101,1,Dial(DAHDI/1) | ||
- | exten => 107,1,Dial(DAHDI/4/107) | + | exten => 102,1,Dial(DAHDI/2) |
+ | |||
+ | exten => _1XX/101,1,Dial(DAHDI/4/${EXTEN}) | ||
+ | |||
+ | exten => _1XX/102,1,Dial(DAHDI/3/${EXTEN}) | ||
[from-101] | [from-101] | ||
- | exten => s,1,Answer() | + | exten => s,1,Goto(default,101,1) |
- | exten => s,n,Goto(default,101,1) | + | |
+ | [from-102] | ||
+ | exten => s,1,Goto(default,102,1) | ||
+ | </code><code> | ||
+ | # cat /etc/asterisk/modules.conf | ||
+ | </code><code> | ||
+ | [modules] | ||
+ | ;bug ubuntu 16 | ||
+ | noload => res_pjsip.so | ||
+ | ... | ||
+ | </code><code> | ||
+ | *CLI> dahdi show channels | ||
+ | </code><code> | ||
+ | # apt purge asterisk-dahdi asterisk-config asterisk dahdi-linux | ||
+ | |||
+ | # apt autoremove | ||
+ | |||
+ | # rm -r /etc/asterisk/ /etc/dahdi/ | ||
+ | |||
+ | # init 6 | ||
</code> | </code> |