English version

Отладка Quasar/Quasar-mini в Asterisk.

Основная статья

Конфигурация

Пробная загрузка драйвера DAHDI из нашей сборки.

#cd ~/dahdi_2.6.1+2.6.1-parabel_2.6.2/parabel/
#sudo ./run

Waiting for DAHDI to come online...
DAHDI Tools Version - 2.6.1

DAHDI Version: 2.6.1
Echo Canceller(s): HWEC, OSLEC
Configuration
======================

SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

62 channels to configure.

Setting echocan for channel 1 to oslec
Setting echocan for channel 2 to oslec
Setting echocan for channel 3 to oslec
Setting echocan for channel 4 to oslec
Setting echocan for channel 5 to oslec
Setting echocan for channel 6 to oslec
Setting echocan for channel 7 to oslec
Setting echocan for channel 8 to oslec
Setting echocan for channel 9 to oslec
Setting echocan for channel 10 to oslec
Setting echocan for channel 11 to oslec
Setting echocan for channel 12 to oslec
Setting echocan for channel 13 to oslec
Setting echocan for channel 14 to oslec
Setting echocan for channel 15 to oslec
Setting echocan for channel 16 to none
Setting echocan for channel 17 to oslec
Setting echocan for channel 18 to oslec
Setting echocan for channel 19 to oslec
Setting echocan for channel 20 to oslec
Setting echocan for channel 21 to oslec
Setting echocan for channel 22 to oslec
Setting echocan for channel 23 to oslec
Setting echocan for channel 24 to oslec
Setting echocan for channel 25 to oslec
Setting echocan for channel 26 to oslec
Setting echocan for channel 27 to oslec
Setting echocan for channel 28 to oslec
Setting echocan for channel 29 to oslec
Setting echocan for channel 30 to oslec
Setting echocan for channel 31 to oslec
Setting echocan for channel 32 to oslec
Setting echocan for channel 33 to oslec
Setting echocan for channel 34 to oslec
Setting echocan for channel 35 to oslec
Setting echocan for channel 36 to oslec
Setting echocan for channel 37 to oslec
Setting echocan for channel 38 to oslec
Setting echocan for channel 39 to oslec
Setting echocan for channel 40 to oslec
Setting echocan for channel 41 to oslec
Setting echocan for channel 42 to oslec
Setting echocan for channel 43 to oslec
Setting echocan for channel 44 to oslec
Setting echocan for channel 45 to oslec
Setting echocan for channel 46 to oslec
Setting echocan for channel 47 to none
Setting echocan for channel 48 to oslec
Setting echocan for channel 49 to oslec
Setting echocan for channel 50 to oslec
Setting echocan for channel 51 to oslec
Setting echocan for channel 52 to oslec
Setting echocan for channel 53 to oslec
Setting echocan for channel 54 to oslec
Setting echocan for channel 55 to oslec
Setting echocan for channel 56 to oslec
Setting echocan for channel 57 to oslec
Setting echocan for channel 58 to oslec
Setting echocan for channel 59 to oslec
Setting echocan for channel 60 to oslec
Setting echocan for channel 61 to oslec
Setting echocan for channel 62 to oslec

Драйвер загрузился без ошибок.
Внимание! Возможно, в вашей системе отсутствуют драйвера hdlc. Соответствующее сообщение можно проигнорировать.

Проверим фактические настройки.

#dahdi_scan

[1]
active=yes
alarms=OK
description=Parabel Quasar-mini 0 Span 1
name=Quasarm_0_1
manufacturer=Parabel ltd.
devicetype=Parabel Quasar-mini E1
location=PCI Bus 03 Slot 01
basechan=1
totchans=31
irq=0
type=digital-E1
syncsrc=1
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=HDB3
framing=CCS
[2]
active=yes
alarms=OK
description=Parabel Quasar-mini 0 Span 2
name=Quasarm_0_2
manufacturer=Parabel ltd.
devicetype=Parabel Quasar-mini E1
location=PCI Bus 03 Slot 01
basechan=32
totchans=31
irq=0
type=digital-E1
syncsrc=1
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=HDB3
framing=CCS

coding и framing в точности, как мы его задали в system.conf .
Таймирование плата будет получать со span 1 (syncsrc=1 на обоих портах).

Проверим сигнализацию, правильно ли прописали каналы.
#cat /proc/dahdi/1

Span 1: Quasarm_0_1 "Parabel Quasar-mini 0 Span 1" (MASTER) HDB3/CCS/CRC4 ClockSource

1 Quasarm_0_1_1 Clear (EC: OSLEC - INACTIVE)
2 Quasarm_0_1_2 Clear (EC: OSLEC - INACTIVE)
3 Quasarm_0_1_3 Clear (EC: OSLEC - INACTIVE)
4 Quasarm_0_1_4 Clear (EC: OSLEC - INACTIVE)
5 Quasarm_0_1_5 Clear (EC: OSLEC - INACTIVE)
6 Quasarm_0_1_6 Clear (EC: OSLEC - INACTIVE)
7 Quasarm_0_1_7 Clear (EC: OSLEC - INACTIVE)
8 Quasarm_0_1_8 Clear (EC: OSLEC - INACTIVE)
9 Quasarm_0_1_9 Clear (EC: OSLEC - INACTIVE)
10 Quasarm_0_1_10 Clear (EC: OSLEC - INACTIVE)
11 Quasarm_0_1_11 Clear (EC: OSLEC - INACTIVE)
12 Quasarm_0_1_12 Clear (EC: OSLEC - INACTIVE)
13 Quasarm_0_1_13 Clear (EC: OSLEC - INACTIVE)
14 Quasarm_0_1_14 Clear (EC: OSLEC - INACTIVE)
15 Quasarm_0_1_15 Clear (EC: OSLEC - INACTIVE)
16 Quasarm_0_1_16 HDLCFCS
17 Quasarm_0_1_17 Clear (EC: OSLEC - INACTIVE)
18 Quasarm_0_1_18 Clear (EC: OSLEC - INACTIVE)
19 Quasarm_0_1_19 Clear (EC: OSLEC - INACTIVE)
20 Quasarm_0_1_20 Clear (EC: OSLEC - INACTIVE)
21 Quasarm_0_1_21 Clear (EC: OSLEC - INACTIVE)
22 Quasarm_0_1_22 Clear (EC: OSLEC - INACTIVE)
23 Quasarm_0_1_23 Clear (EC: OSLEC - INACTIVE)
24 Quasarm_0_1_24 Clear (EC: OSLEC - INACTIVE)
25 Quasarm_0_1_25 Clear (EC: OSLEC - INACTIVE)
26 Quasarm_0_1_26 Clear (EC: OSLEC - INACTIVE)
27 Quasarm_0_1_27 Clear (EC: OSLEC - INACTIVE)
28 Quasarm_0_1_28 Clear (EC: OSLEC - INACTIVE)
29 Quasarm_0_1_29 Clear (EC: OSLEC - INACTIVE)
30 Quasarm_0_1_30 Clear (EC: OSLEC - INACTIVE)
31 Quasarm_0_1_31 Clear (EC: OSLEC - INACTIVE)

 

Аналогично для следующего канала.

#cat /proc/dahdi/2

Span 2: Quasarm_0_2 "Parabel Quasar-mini 0 Span 2" HDB3/CCS/CRC4

32 Quasarm_0_2_1 Clear (EC: OSLEC - INACTIVE)
33 Quasarm_0_2_2 Clear (EC: OSLEC - INACTIVE)
34 Quasarm_0_2_3 Clear (EC: OSLEC - INACTIVE)
35 Quasarm_0_2_4 Clear (EC: OSLEC - INACTIVE)
36 Quasarm_0_2_5 Clear (EC: OSLEC - INACTIVE)
37 Quasarm_0_2_6 Clear (EC: OSLEC - INACTIVE)
38 Quasarm_0_2_7 Clear (EC: OSLEC - INACTIVE)
39 Quasarm_0_2_8 Clear (EC: OSLEC - INACTIVE)
40 Quasarm_0_2_9 Clear (EC: OSLEC - INACTIVE)
41 Quasarm_0_2_10 Clear (EC: OSLEC - INACTIVE)
42 Quasarm_0_2_11 Clear (EC: OSLEC - INACTIVE)
43 Quasarm_0_2_12 Clear (EC: OSLEC - INACTIVE)
44 Quasarm_0_2_13 Clear (EC: OSLEC - INACTIVE)
45 Quasarm_0_2_14 Clear (EC: OSLEC - INACTIVE)
46 Quasarm_0_2_15 Clear (EC: OSLEC - INACTIVE)
47 Quasarm_0_2_16 HDLCFCS
48 Quasarm_0_2_17 Clear (EC: OSLEC - INACTIVE)
49 Quasarm_0_2_18 Clear (EC: OSLEC - INACTIVE)
50 Quasarm_0_2_19 Clear (EC: OSLEC - INACTIVE)
51 Quasarm_0_2_20 Clear (EC: OSLEC - INACTIVE)
52 Quasarm_0_2_21 Clear (EC: OSLEC - INACTIVE)
53 Quasarm_0_2_22 Clear (EC: OSLEC - INACTIVE)
54 Quasarm_0_2_23 Clear (EC: OSLEC - INACTIVE)
55 Quasarm_0_2_24 Clear (EC: OSLEC - INACTIVE)
56 Quasarm_0_2_25 Clear (EC: OSLEC - INACTIVE)
57 Quasarm_0_2_26 Clear (EC: OSLEC - INACTIVE)
58 Quasarm_0_2_27 Clear (EC: OSLEC - INACTIVE)
59 Quasarm_0_2_28 Clear (EC: OSLEC - INACTIVE)
60 Quasarm_0_2_29 Clear (EC: OSLEC - INACTIVE)
61 Quasarm_0_2_30 Clear (EC: OSLEC - INACTIVE)
62 Quasarm_0_2_31 Clear (EC: OSLEC - INACTIVE)

 

Загрузим модуль dahdi в Asterisk (предварительно - выгрузите модуль).

#asterisk -rvvvvv

CLI> module load chan_dahdi.so
Loaded chan_dahdi.so
== Registered application 'DAHDISendKeypadFacility'
== Parsing '/etc/asterisk/chan_dahdi.conf': == Found
== Parsing '/etc/asterisk/users.conf': == Found
-- Registered channel 1, ISDN PRI signalling
-- Registered channel 2, ISDN PRI signalling
-- Registered channel 3, ISDN PRI signalling
-- Registered channel 4, ISDN PRI signalling
-- Registered channel 5, ISDN PRI signalling
-- Registered channel 6, ISDN PRI signalling
-- Registered channel 7, ISDN PRI signalling
-- Registered channel 8, ISDN PRI signalling
-- Registered channel 9, ISDN PRI signalling
-- Registered channel 10, ISDN PRI signalling
-- Registered channel 11, ISDN PRI signalling
-- Registered channel 12, ISDN PRI signalling
-- Registered channel 13, ISDN PRI signalling
-- Registered channel 14, ISDN PRI signalling
-- Registered channel 15, ISDN PRI signalling
-- Registered channel 17, ISDN PRI signalling
-- Registered channel 18, ISDN PRI signalling
-- Registered channel 19, ISDN PRI signalling
-- Registered channel 20, ISDN PRI signalling
-- Registered channel 21, ISDN PRI signalling
-- Registered channel 22, ISDN PRI signalling
-- Registered channel 23, ISDN PRI signalling
-- Registered channel 24, ISDN PRI signalling
-- Registered channel 25, ISDN PRI signalling
-- Registered channel 26, ISDN PRI signalling
-- Registered channel 27, ISDN PRI signalling
-- Registered channel 28, ISDN PRI signalling
-- Registered channel 29, ISDN PRI signalling
-- Registered channel 30, ISDN PRI signalling
-- Registered channel 31, ISDN PRI signalling
-- Registered channel 32, ISDN PRI signalling
-- Registered channel 33, ISDN PRI signalling
-- Registered channel 34, ISDN PRI signalling
-- Registered channel 35, ISDN PRI signalling
-- Registered channel 36, ISDN PRI signalling
-- Registered channel 37, ISDN PRI signalling
-- Registered channel 38, ISDN PRI signalling
-- Registered channel 39, ISDN PRI signalling
-- Registered channel 40, ISDN PRI signalling
-- Registered channel 41, ISDN PRI signalling
-- Registered channel 42, ISDN PRI signalling
-- Registered channel 43, ISDN PRI signalling
-- Registered channel 44, ISDN PRI signalling
-- Registered channel 45, ISDN PRI signalling
-- Registered channel 46, ISDN PRI signalling
-- Registered channel 48, ISDN PRI signalling
-- Registered channel 49, ISDN PRI signalling
-- Registered channel 50, ISDN PRI signalling
-- Registered channel 51, ISDN PRI signalling
-- Registered channel 52, ISDN PRI signalling
-- Registered channel 53, ISDN PRI signalling
-- Registered channel 54, ISDN PRI signalling
-- Registered channel 55, ISDN PRI signalling
-- Registered channel 56, ISDN PRI signalling
-- Registered channel 57, ISDN PRI signalling
-- Registered channel 58, ISDN PRI signalling
-- Registered channel 59, ISDN PRI signalling
-- Registered channel 60, ISDN PRI signalling
-- Registered channel 61, ISDN PRI signalling
-- Registered channel 62, ISDN PRI signalling
-- Automatically generated pseudo channel
[Jan 31 18:40:40] WARNING[5287]: chan_dahdi.c:17134 process_dahdi: Ignoring any changes to 'userbase' (on reload) at line 23.
[Jan 31 18:40:40] WARNING[5287]: chan_dahdi.c:17134 process_dahdi: Ignoring any changes to 'vmsecret' (on reload) at line 31.
[Jan 31 18:40:40] WARNING[5287]: chan_dahdi.c:17134 process_dahdi: Ignoring any changes to 'hassip' (on reload) at line 35.
[Jan 31 18:40:40] WARNING[5287]: chan_dahdi.c:17134 process_dahdi: Ignoring any changes to 'hasiax' (on reload) at line 39.
[Jan 31 18:40:40] WARNING[5287]: chan_dahdi.c:17134 process_dahdi: Ignoring any changes to 'hasmanager' (on reload) at line 47.
== Starting D-Channel on span 1
== Starting D-Channel on span 2
== Registered channel type 'DAHDI' (DAHDI Telephony Driver w/PRI & SS7 & MFC/R2)
== Registered application 'DAHDIAcceptR2Call'
== Manager registered action DAHDITransfer
== Manager registered action DAHDIHangup
== Manager registered action DAHDIDialOffhook
== Manager registered action DAHDIDNDon
== Manager registered action DAHDIDNDoff
== Manager registered action DAHDIShowChannels
== Manager registered action DAHDIRestart
Loaded chan_dahdi.so => (DAHDI Telephony Driver w/PRI & SS7 & MFC/R2)
[Jan 31 18:40:40] NOTICE[5288]: chan_dahdi.c:12696 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1
[Jan 31 18:40:40] NOTICE[5289]: chan_dahdi.c:12696 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 2
== Primary D-Channel on span 2 up
== Primary D-Channel on span 1 up

Драйвер загрузился без ошибок (вида ERROR[]).
Однократное предупреждение о ошибке в HDLC потоке законно, т.к. мы только запустили поток.
PRI канал готов к работе.

Проверим статус портов.

CLI> dahdi show status
Description Alarms IRQ bpviol CRC4 Fra Codi Options LBO
Parabel Quasar-mini 0 Span 1 OK 0 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
Parabel Quasar-mini 0 Span 2 OK 0 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)

 

Проверим, все ли каналы видит Asterisk.

CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 pri0 default In Service
2 pri0 default In Service
3 pri0 default In Service
4 pri0 default In Service
5 pri0 default In Service
6 pri0 default In Service
7 pri0 default In Service
8 pri0 default In Service
9 pri0 default In Service
10 pri0 default In Service
11 pri0 default In Service
12 pri0 default In Service
13 pri0 default In Service
14 pri0 default In Service
15 pri0 default In Service
17 pri0 default In Service
18 pri0 default In Service
19 pri0 default In Service
20 pri0 default In Service
21 pri0 default In Service
22 pri0 default In Service
23 pri0 default In Service
24 pri0 default In Service
25 pri0 default In Service
26 pri0 default In Service
27 pri0 default In Service
28 pri0 default In Service
29 pri0 default In Service
30 pri0 default In Service
31 pri0 default In Service
32 pri1 default In Service
33 pri1 default In Service
34 pri1 default In Service
35 pri1 default In Service
36 pri1 default In Service
37 pri1 default In Service
38 pri1 default In Service
39 pri1 default In Service
40 pri1 default In Service
41 pri1 default In Service
42 pri1 default In Service
43 pri1 default In Service
44 pri1 default In Service
45 pri1 default In Service
46 pri1 default In Service
48 pri1 default In Service
49 pri1 default In Service
50 pri1 default In Service
51 pri1 default In Service
52 pri1 default In Service
53 pri1 default In Service
54 pri1 default In Service
55 pri1 default In Service
56 pri1 default In Service
57 pri1 default In Service
58 pri1 default In Service
59 pri1 default In Service
60 pri1 default In Service
61 pri1 default In Service
62 pri1 default In Service

 

Проверим, в каком состоянии PRI.

CLI> pri show spans
PRI span 1/0: Provisioned, Up, Active
PRI span 2/0: Provisioned, Up, Active

 

Позвоним с SIP телефона через порт 2 на порт 1.

CLI>
== Using SIP RTP CoS mark 5
-- Executing [201@test_context:1] Wait("SIP/sip1-00000002", "0") in new stack
-- Executing [201@test_context:2] Dial("SIP/sip1-00000002", "DAHDI/g1/01") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g1/01
-- Accepting call from '' to '01' on channel 0/1, span 1
-- Executing [01@pri0:1] Answer("DAHDI/1-1", "") in new stack
-- Executing [01@pri0:2] Verbose("DAHDI/1-1", "Received callerID: "" <>") in new stack
Received callerID: <>
-- Executing [01@pri0:3] Echo("DAHDI/1-1", "") in new stack
-- DAHDI/32-1 is proceeding passing it to SIP/sip1-00000002
-- DAHDI/32-1 answered SIP/sip1-00000002
CLI>
CLI>
-- Hungup 'DAHDI/32-1'
== Spawn extension (test_context, 201, 2) exited non-zero on 'SIP/sip1-00000002'
-- Channel 0/1, span 1 got hangup request, cause 16
== Spawn extension (pri0, 01, 3) exited non-zero on 'DAHDI/1-1'
-- Hungup 'DAHDI/1-1'

Порт 1 и порт 2 должны быть соединены кабелем.
Наберите на SIP телефоне 201.
Звонок был отправлен в группу 1 (SPAN 2, PRI_NET) и поступил на SPAN 1, PRI_CPE.
Т.о. мы проверили работу устройства в обоих режимах - LTE(PRI_CPE) и LTE(PRI_NET).

Одно-портовую плату не получится проверить саму с собой.
Подключите ее к PSTN, позвоните со стороны PSTN.

Проследим текущий звонок.
CLI> core show channels
Channel Location State Application(Data)
DAHDI/1-1 01@pri0:3 Up Echo()
DAHDI/32-1 (None) Up AppDial((Outgoing Line))
SIP/sip1-00000003 201@test_context:2 Up Dial(DAHDI/g1/01)
3 active channels
2 active calls
8 calls processed
   Поиск | Подписка на новости | Контакты Поиск по сайту


  Россия, Новосибирск
  Контакты


©2001-2012 Parabel inc.