Назад | Перейти на главную страницу

Транк PSTN TDM400P Установить на Asterisk / Trixbox

Я пытаюсь получить карту TDM400P с модулем FXO для подключения к нашей линии PSTN. Карта корректно определяется Linux:

[trixbox1.localdomain asterisk] # lspci 00: 09.0 Коммуникационный контроллер: Tiger Jet Network Inc. Модем Tiger3XX / интерфейс ISDN

Я запустил setup-pstn, который выдает следующий результат

trixbox1.localdomain ~]# setup-pstn
--------------------------------------------------------------
Detecting PSTN cards and USB PSTN Devices
-------------------------------------------------------------- 
Hardware present!

STOPPING ASTERISK
Asterisk Stopped

STOPPING FOP SERVER
FOP Server Stopped
Unloading DAHDI hardware modules: done
Loading DAHDI hardware modules:
  wct4xxp:                                                 [  OK  ]
  wcte12xp:                                                [  OK  ]
  wct1xxp:                                                 [  OK  ]
  wcte11xp:                                                [  OK  ]
  wctdm24xxp:                                              [  OK  ]
  opvxa1200:                                               [  OK  ]
  wcfxo:                                                   [  OK  ]
  wctdm:                                                   [  OK  ]
  wcb4xxp:                                                 [  OK  ]
  wctc4xxp:                                                [  OK  ]
  xpp_usb:                                                 [  OK  ]

Running dahdi_cfg:                                         [  OK  ]

SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK
Asterisk Started

STARTING FOP SERVER
FOP Server Started
   Chan Extension  Context         Language   MOH Interpret        Blocked    State     
 pseudo            default         en         default                         In Service
      1            from-pstn       en         default                         In Service

dahdi_scan возвращает:

dahdi_scan [1] 
active=yes 
alarms=OK 
description=Wildcard TDM400P REV I Board 5 
name=WCTDM/4 
manufacturer=Digium 
devicetype=Wildcard TDM400P REV I 
location=PCI Bus 00 Slot 10 
basechan=1 
totchans=4 
irq=209 
type=analog 
port=1,FXO 
port=2,none 
port=3,none 
port=4,none

А звездочка может видеть канал:

> trixbox1*CLI> dahdi show channel 1
> Channel: 1LI>  File Descriptor: 14
> Span: 11*CLI>  Extension: I>  Dialing:
> noI>  Context: from-pstn Caller ID: I>
> Calling TON: 0 Caller ID name: 
> Mailbox: none  Destroy: 0LI>  InAlarm:
> 1LI>  Signalling Type: FXS Kewlstart
> Radio: 0*CLI>  Owner: <None>  Real:
> <None>>  Callwait: <None> Threeway:
> <None> Confno: -1LI>  Propagated
> Conference: -1 Real in conference: 0
> DSP: no1*CLI>  Busy Detection: no TDD:
> no1*CLI>  Relax DTMF: no
> Dialing/CallwaitCAS: 0/0 Default law:
> ulaw Fax Handled: no Pulse phone: no
> DND: no1*CLI>  Echo Cancellation:
> trixbox1128 taps trixbox1(unless TDM
> bridged) currently OFF Actual
> Confinfo: Num/0, Mode/0x0000 Actual
> Confmute: No
> Hookstate (FXS only): Onhook

Кот из /etc/asterisk/dahdi.conf показывает:

[trixbox1.localdomain ~]# cat /etc/asterisk/dahdi-channels.conf
; Autogenerated by /usr/sbin/dahdi_genconf on Tue May 25 17:45:13 2010
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) 
;;; line="1 WCTDM/4/0 FXSKS  (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

Я настроил «Магистраль ZAP (режим совместимости с DAHDI)» с идентификатором ZAP 1 и исходящим маршрутом, но когда я пытаюсь сделать внешний вызов через него, я получаю сообщение «Все каналы сейчас заняты, попробуйте позвонить еще раз. позднее сообщение ".

У меня есть один исходящий маршрут, использующий схему набора 9 |. и Trunk Zap / 1 и один Zap Trunk, который использует Zap Identifier (имя транка): 1 и не имеет правил набора номера.

Модуль FXO напрямую подключается к нашей телефонной линии от BT через кабель BT-> RJ11.

При запуске tail -f / var / log / asterisk / full и выполнении вызова я получаю следующий вывод:

[May 26 11:10:52] VERBOSE[2723] logger.c:   == Using SIP RTP TOS bits 184
[May 26 11:10:52] VERBOSE[2723] logger.c:   == Using SIP RTP CoS mark 5
[May 26 11:10:52] VERBOSE[2723] logger.c:   == Using SIP VRTP TOS bits 136
[May 26 11:10:52] VERBOSE[2723] logger.c:   == Using SIP VRTP CoS mark 6
[May 26 11:10:52] WARNING[2661] pbx.c: FONALITY: This thread has already held the conlock, skip locking
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [901483890915@from-internal:1] Macro("SIP/801-b7ce8c28", "user-callerid,SKIPTTL,") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/801-b7ce8c28", "AMPUSER=801") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:2] GotoIf("SIP/801-b7ce8c28", "0?report") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:3] ExecIf("SIP/801-b7ce8c28", "1?Set(REALCALLERIDNUM=801)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:4] Set("SIP/801-b7ce8c28", "AMPUSER=801") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/801-b7ce8c28", "AMPUSERCIDNAME=Jona") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/801-b7ce8c28", "0?report") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:7] Set("SIP/801-b7ce8c28", "AMPUSERCID=801") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:8] Set("SIP/801-b7ce8c28", "CALLERID(all)="Jona" <801>") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:9] Set("SIP/801-b7ce8c28", "REALCALLERIDNUM=801") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:10] ExecIf("SIP/801-b7ce8c28", "0?Set(CHANNEL(language)=)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:11] GotoIf("SIP/801-b7ce8c28", "1?continue") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-user-callerid,s,20)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-user-callerid:20] NoOp("SIP/801-b7ce8c28", "Using CallerID "Jona" <801>") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [901483890915@from-internal:2] Set("SIP/801-b7ce8c28", "_NODEST=") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [901483890915@from-internal:3] Macro("SIP/801-b7ce8c28", "record-enable,801,OUT,") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-record-enable:1] GotoIf("SIP/801-b7ce8c28", "1?check") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-record-enable,s,4)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-record-enable:4] AGI("SIP/801-b7ce8c28", "recordingcheck,20100526-111052,1274868652.1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
[May 26 11:10:52] VERBOSE[2858] logger.c:  recordingcheck,20100526-111052,1274868652.1: Outbound recording not enabled
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- <SIP/801-b7ce8c28>AGI Script recordingcheck completed, returning 0
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-record-enable:5] MacroExit("SIP/801-b7ce8c28", "") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [901483890915@from-internal:4] Macro("SIP/801-b7ce8c28", "dialout-trunk,1,01483890915,") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:1] Set("SIP/801-b7ce8c28", "DIAL_TRUNK=1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/801-b7ce8c28", "0?sub-pincheck,s,1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/801-b7ce8c28", "0?disabletrunk,1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:4] Set("SIP/801-b7ce8c28", "DIAL_NUMBER=01483890915") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:5] Set("SIP/801-b7ce8c28", "DIAL_TRUNK_OPTIONS=tr") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:6] Set("SIP/801-b7ce8c28", "OUTBOUND_GROUP=OUT_1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/801-b7ce8c28", "1?nomax") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-dialout-trunk,s,9)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/801-b7ce8c28", "0?skipoutcid") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:10] Set("SIP/801-b7ce8c28", "DIAL_TRUNK_OPTIONS=") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:11] Macro("SIP/801-b7ce8c28", "outbound-callerid,1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERPRES()=)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/801-b7ce8c28", "0?Set(REALCALLERIDNUM=801)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/801-b7ce8c28", "1?normcid") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-outbound-callerid,s,6)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:6] Set("SIP/801-b7ce8c28", "USEROUTCID=") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:7] Set("SIP/801-b7ce8c28", "EMERGENCYCID=") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:8] Set("SIP/801-b7ce8c28", "TRUNKOUTCID=") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/801-b7ce8c28", "1?trunkcid") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-outbound-callerid,s,12)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERID(all)=)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERID(all)=)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/801-b7ce8c28", "0?AGI(fixlocalprefix)") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:13] Set("SIP/801-b7ce8c28", "OUTNUM=01483890915") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:14] Set("SIP/801-b7ce8c28", "custom=DAHDI/1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/801-b7ce8c28", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:16] Macro("SIP/801-b7ce8c28", "dialout-trunk-predial-hook,") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/801-b7ce8c28", "") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/801-b7ce8c28", "0?bypass,1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/801-b7ce8c28", "0?customtrunk") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:19] Dial("SIP/801-b7ce8c28", "DAHDI/1/01483890915,300,") in new stack
[May 26 11:10:52] WARNING[2858] app_dial.c: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
[May 26 11:10:52] VERBOSE[2858] logger.c:   == Everyone is busy/congested at this time (1:0/0/1)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-dialout-trunk:20] Goto("SIP/801-b7ce8c28", "s-CHANUNAVAIL,1") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf("SIP/801-b7ce8c28", "1?noreport") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp("SIP/801-b7ce8c28", "TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 0) - failing through to other trunks") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [901483890915@from-internal:5] Macro("SIP/801-b7ce8c28", "outisbusy,") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- Executing [s@macro-outisbusy:1] Playback("SIP/801-b7ce8c28", "all-circuits-busy-now,noanswer") in new stack
[May 26 11:10:52] VERBOSE[2858] logger.c:     -- <SIP/801-b7ce8c28> Playing 'all-circuits-busy-now.ulaw' (language 'en')
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- Executing [s@macro-outisbusy:2] Playback("SIP/801-b7ce8c28", "pls-try-call-later,noanswer") in new stack
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- <SIP/801-b7ce8c28> Playing 'pls-try-call-later.ulaw' (language 'en')
[May 26 11:10:54] WARNING[2661] pbx.c: FONALITY: This thread has already held the conlock, skip locking
[May 26 11:10:54] VERBOSE[2858] logger.c:   == Spawn extension (macro-outisbusy, s, 2) exited non-zero on 'SIP/801-b7ce8c28' in macro 'outisbusy'
[May 26 11:10:54] VERBOSE[2858] logger.c:   == Spawn extension (from-internal, 901483890915, 5) exited non-zero on 'SIP/801-b7ce8c28'
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- Executing [h@from-internal:1] Macro("SIP/801-b7ce8c28", "hangupcall") in new stack
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/801-b7ce8c28", "vw") in new stack
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- Executing [s@macro-hangupcall:2] NoCDR("SIP/801-b7ce8c28", "") in new stack
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- Executing [s@macro-hangupcall:3] GotoIf("SIP/801-b7ce8c28", "1?skiprg") in new stack
[May 26 11:10:54] VERBOSE[2858] logger.c:     -- Goto (macro-hangupcall,s,6)
[May 26 11:10:55] VERBOSE[2858] logger.c:     -- Executing [s@macro-hangupcall:6] GotoIf("SIP/801-b7ce8c28", "1?skipblkvm") in new stack
[May 26 11:10:55] VERBOSE[2858] logger.c:     -- Goto (macro-hangupcall,s,9)
[May 26 11:10:55] VERBOSE[2858] logger.c:     -- Executing [s@macro-hangupcall:9] GotoIf("SIP/801-b7ce8c28", "1?theend") in new stack
[May 26 11:10:55] VERBOSE[2858] logger.c:     -- Goto (macro-hangupcall,s,11)
[May 26 11:10:55] VERBOSE[2858] logger.c:     -- Executing [s@macro-hangupcall:11] Hangup("SIP/801-b7ce8c28", "") in new stack
[May 26 11:10:55] VERBOSE[2858] logger.c:   == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/801-b7ce8c28' in macro 'hangupcall'
[May 26 11:10:55] VERBOSE[2858] logger.c:   == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/801-b7ce8c28'

Я предполагаю, что где-то пропустил шаг настройки, но не знаю, где, любая помощь очень ценится.

Прошло некоторое время с тех пор, как я использовал модули FXO со звездочкой и BT, поэтому я не могу подтвердить, что это все еще необходимо (или что trixbox не делает этого самостоятельно), но следовали ли вы инструкциям в разделе "Линии TDM 400 FXS и BT POTS"раздел на этой странице:

http://www.voip-info.org/wiki/view/UK+Asterisk+Details

В частности:

Установите карту в соответствии со спецификацией линий Великобритании, добавив

параметры wctdm opermode = UK fwringdetect = 1 battthresh = 4

в /etc/modprobe.conf (или, возможно, /etc/modprobe.d/zaptel или /etc/modules.conf в зависимости от дистрибутива?)

Если это не помогает, можете ли вы опубликовать вывод «статуса показа дахди» и «каналов показа дахди» из интерфейса командной строки звездочки.

Из командной строки запустите:

setup-pstn

Как только это будет сделано, отредактируйте файл конфигурации: vi /etc/asterisk/dahdi-channels.conf

Сигнализация будет противоположной тому, что вы на самом деле используете! Так fxs_ks правильно.

Возможно, вам придется изменить контекст:

По умолчанию это: context=from-zaptel

Возможно, вам придется изменить его на: context=from-pstn