我正在尝试用星号配置 b410p 卡。我已将电话 isdn 连接到卡的 NT 端口。这是我的配置
/etc/dahdi/system.conf
# Span 1: B4/0/1 "B4XXP (PCI) Card 0 Span 1" AMI/CCS RED
span=1,0,0,ccs,ami
# termtype: nt
bchan=1-2
hardhdlc=3
echocanceller=mg2,1-2
# Span 2: B4/0/2 "B4XXP (PCI) Card 0 Span 2" AMI/CCS RED
span=2,0,0,ccs,ami
# termtype: nt
bchan=4-5
hardhdlc=6
echocanceller=mg2,4-5
# Span 3: B4/0/3 "B4XXP (PCI) Card 0 Span 3" AMI/CCS RED
span=3,0,0,ccs,ami
# termtype: nt
bchan=7-8
hardhdlc=9
echocanceller=mg2,7-8
# Span 4: B4/0/4 "B4XXP (PCI) Card 0 Span 4" (MASTER) AMI/CCS
span=4,0,0,ccs,ami
# termtype: nt
bchan=10-11
hardhdlc=12
echocanceller=mg2,10-11
/etc/asterisk/chan_dahdi.conf
[trunkgroups]
[channels]
language=it
context=local
switchtype=euroisdn
signalling=bri_net_ptmp
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
context= incoming
echocancel=yes
channel => 1,2,4,5,7,8,10,11
echocancelwhenbridged=yes
group=1
callgroup=1
pickupgroup=1
/etc/asterisk/dahdi-channels.conf
; Span 1: B4/0/1 "B4XXP (PCI) Card 0 Span 1" AMI/CCS RED
group=0,11
context=from-dahdi
switchtype = euroisdn
signalling = bri_net_ptmp
channel => 1-2
context = default
group = 63
; Span 2: B4/0/2 "B4XXP (PCI) Card 0 Span 2" AMI/CCS RED
group=0,12
context=from-dahdi
switchtype = euroisdn
signalling = bri_net_ptmp
channel => 4-5
context = default
group = 63
; Span 3: B4/0/3 "B4XXP (PCI) Card 0 Span 3" AMI/CCS RED
group=0,13
context=from-dahdi
switchtype = euroisdn
signalling = bri_net_ptmp
channel => 7-8
context = default
group = 63
; Span 4: B4/0/4 "B4XXP (PCI) Card 0 Span 4" (MASTER) AMI/CCS
group=0,14
context=from-dahdi
switchtype = euroisdn
signalling = bri_net_ptmp
channel => 10-11
context = default
group = 63
连接电话的端口是绿色的,所以没问题
dahdi_tool 说:
RED B4XXP (PCI) Card 0 Span 1 ↑ │
│ RED B4XXP (PCI) Card 0 Span 2 ▒ │
│ RED B4XXP (PCI) Card 0 Span 3 ▮ │
│ OK B4XXP (PCI) Card 0 Span 4
从 isdn 电话我尝试调用 200 测试扩展并退出 isdn 错误代码 3302
这是我的 extensions.conf 部分
exten => 200,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
exten => 1000,1,Dial(dahdi/4,20)
当我尝试从控制台调用“1000”时说
Span 2: Channel 0/1 got hangup, cause 18
-- Hungup 'DAHDI/i2/-2'
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'ALSA/default' status is 'CHANUNAVAIL'
<< Hangup on console >>
一些忠告?谢谢
Pri 调试报告此(我已将扩展名从 1000 更改为 039991122 和 extensions.conf
039991122
-- Executing [039991122@local:1] Dial("ALSA/default", "DAHDI/g14/039991122") in new stack
PRI Span: 4 -- Making new call for cref 32773
-- Requested transfer capability: 0x00 - SPEECH
PRI Span: 4 Sending message for call 0x7f0d84008b20 on call->link: 0x782140 with TEI/SAPI 127/63
PRI Span: 4
PRI Span: 4 > Protocol Discriminator: Q.931 (8) len=26
PRI Span: 4 > TEI=127 Call Ref: len= 1 (reference 5/0x5) (Sent from originator)
PRI Span: 4 > Message Type: SETUP (5)
PRI Span: 4 > [04 03 80 90 a3]
PRI Span: 4 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 4 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 4 > User information layer 1: A-Law (35)
PRI Span: 4 > [18 01 89]
PRI Span: 4 > Channel ID (len= 3) [ Ext: 1 IntID: Implicit BRI Spare: 0 Exclusive Dchan: 0
PRI Span: 4 > ChanSel: B1 channel
PRI Span: 4 > ]
PRI Span: 4 > [70 0b 80 30 37 38 34 33 36 36 35 30 38]
PRI Span: 4 > Called Party Number (len=13) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '039991122' ]
PRI Span: 4 > [a1]
PRI Span: 4 > Sending Complete (len= 1)
PRI Span: 4 q931.c:6531 q931_setup: Call 32773 enters state 1 (Call Initiated). Hold state: Idle
-- Called DAHDI/g14/039991122
PRI Span: 4 T303 timed out. cref:32773
PRI Span: 4 Sending message for call 0x7f0d84008b20 on call->link: 0x782140 with TEI/SAPI 127/63
PRI Span: 4
PRI Span: 4 > Protocol Discriminator: Q.931 (8) len=26
PRI Span: 4 > TEI=127 Call Ref: len= 1 (reference 5/0x5) (Sent from originator)
PRI Span: 4 > Message Type: SETUP (5)
PRI Span: 4 > [04 03 80 90 a3]
PRI Span: 4 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 4 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 4 > User information layer 1: A-Law (35)
PRI Span: 4 > [18 01 89]
PRI Span: 4 > Channel ID (len= 3) [ Ext: 1 IntID: Implicit BRI Spare: 0 Exclusive Dchan: 0
PRI Span: 4 > ChanSel: B1 channel
PRI Span: 4 > ]
PRI Span: 4 > [70 0b 80 30 37 38 34 33 36 36 35 30 38]
PRI Span: 4 > Called Party Number (len=13) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '039991122' ]
PRI Span: 4 > [a1]
PRI Span: 4 > Sending Complete (len= 1)
PRI Span: 4 T303 timed out. cref:32773
PRI Span: 4 q931.c:6415 t303_expiry: Call 32773 enters state 22 (Call Abort). Hold state: Idle
PRI Span: 4 Fake clearing. cref:32773
PRI Span: 4 q931.c:9910 pri_internal_clear: alive 1, hangupack 1
Span 4: Processing event PRI_EVENT_HANGUP(6)
-- Span 4: Channel 0/1 got hangup, cause 18
PRI Span: 4 q931.c:7270 q931_hangup: Hangup master cref:32773
PRI Span: 4 q931.c:7312 q931_hangup: Remaining slaves 0
-- Hungup 'DAHDI/i4/039991122-5'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [039991122@local:2] Hangup("ALSA/default", "") in new stack
== Spawn extension (local, 039991122, 2) exited non-zero on 'ALSA/default'
<< Hangup on console >>
PRI Span: 4 T312 timed out. cref:32773
PRI Span: 4 Destroying call 0x7f0d84008b20, ourstate Call Abort, peerstate Call Present, hold-state Idle
另一个问题是:来电正在“工作”,因为电话响了(当应答失败时),来电没有被 pri 调试报告:我错过了什么?这是新的 extensions.conf
[from-dahdi]
exten => _XXXXX.,1,Dial(DAHDI/g14/${EXTEN})
exten => _XXXXX.,2,Hangup()
如何定义拨出电话的分机?
找到的解决方案是usb重定向的问题(使用带有usb-2控制器的pci-e卡解决),在我使用usb主机重定向(使用libvirt)之前,现在我重定向整个usb控制器,将isdn ta连接到usb端口。现在isdn软电话可以拨打和接听。我忘了说 isdn ta 已连接到虚拟机。