Откуда: Киев
Сообщений: 64
|
Asterisk+DAHDI+Digium TDM 804
В этом деле я новичек так что сразу прошу меня не сильно ругать.С астериском работаю впервые.
Задача:есть телефонная линия,которую я подключил в карту Digium tdm 804p,люди звонят на тел.номер и у всех пользователей в офисе звонят сипфоны, а также пользователь сипфона мог бы позвонить с него в город и на моб. телефон через этот городской номер.
По поводу используемого ПО:
Версия астериска asterisk-1.6.0.5.
Версия Dahdi-linux dahdi-linux-2.2.0.2 и dahdi-tools-2.2.0.
Версия libpri-1.4.10.1
Вот мои конфиги которые я с горем собрал с других форумов:
1.sip.conf:
[general]
context=default
allowguest=no
allowoverlap=no
[200]
type=friend
host=dynamic
username=200
secret=user1_password
nat=no
canreinvite=no
context=office
callerid="User1" <200>
allow=gsm
allow=ulaw
allow=alaw
[201]
type=friend
host=dynamic
username=201
secret=user2_password
dtmfmode=rfc2833
context=office
callerid="User2" <202>
allow=gsm
allow=ulaw
allow=alaw
2. Extensions.conf:
[office]
include => cause-codes
exten => 200,1,Dial(SIP/200)
exten => 200,n,Hangup()
exten => 201,1,Dial(SIP/201)
exten => 201,n,Hagup()
exten => 202,1,Dial(SIP/202)
exten => 202,n,Hangup()
exten => _9X.,1,Dial(DAHDI/2/${EXTEN:1})
exten => _9X.,n,Hangup()
exten => 123,1,Answer
exten => 123,2,Playback(tt-weasels)
exten => 123,n,Hangup()
[from-pstn]
include => cause-codes
exten => s,1,Dial(DAHDI/1&SIP/200&SIP/201&SIP/202)
exten => s,n,Hangup()
[from-phone]
include => cause-codes
exten => _9X.,1,Dial(DAHDI/2/${EXTEN:1})
exten => _9X.,n,Hangup()
exten => 200,1,Dial(SIP/200)
exten => 200,n,hangup()
exten => 201,1,Dial(SIP/201)
exten => 201,n,Hangup()
exten => 202,1,Dial(SIP/202)
exten => 202,n,Hangup()
[cause-codes]
exten => i,1,Playback(invalid)
exten => i,n,hangup()
3./etc/dahdi/system.conf:
# cat /etc/dahdi/system.conf
fxsks=1
echocanceller=mg2,1
fxsks=2
echocanceller=mg2,2
# channel 3, WCTDM/0/2, no module.
# channel 4, WCTDM/0/3, no module.
fxsks=5
echocanceller=mg2,5
fxsks=6
echocanceller=mg2,6
# channel 7, WCTDM/0/6, no module.
# channel 8, WCTDM/0/7, no module.
# Global data
loadzone = us
defaultzone = us
4.chan_dahdi.conf:
[channels]
language=en
context=from-pstn
signalling=fxs_ks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=yes
rxgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=yes
musiconhold=default
channel => 1
dahdi show status
Description Alarms IRQ bpviol CRC4 Fra Codi Options LBO
Wildcard TDM800P Board 1 OK 2 0 0 CAS Unk YEL 0 db (CSU)/0-133 feet (DSX-1)
dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 from-ptsn default In Service
dahdi_cfg -vvvv
DAHDI Tools Version - 2.2.0
DAHDI Version: 2.2.0.2
Echo Canceller(s): MG2
Configuration
======================
Channel map:
Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 05: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 06)
4 channels to configure.
Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 5 to mg2
Setting echocan for channel 6 to mg2
cat /proc/dahdi/*
Span 1: WCTDM/0 "Wildcard TDM800P Board 1" (MASTER)
IRQ misses: 2
1 WCTDM/0/0 FXSKS (In use) RED(SWEC: MG2)
2 WCTDM/0/1 FXSKS RED(SWEC: MG2)
3 WCTDM/0/2 FXSKS
4 WCTDM/0/3 FXSKS
5 WCTDM/0/4 FXSKS RED(SWEC: MG2)
6 WCTDM/0/5 FXSKS RED(SWEC: MG2)
7 WCTDM/0/6 FXSKS
8 WCTDM/0/7 FXSKS
Вот дебаг который выдается, когда пытаюсь звонить:
DEBUG[4598]: acl.c:490 ast_ouraddrfor: Found IP address for this socket
== Using SIP RTP CoS mark 5
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:3915 do_setnat: Setting NAT on RTP to Off
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:5996 sip_alloc: Allocating new SIP dialog for NDRhZWQ0MDVkZTQ1NDI2ZTc0YWQ1NWM2OTIxODZhY2I. - INVITE (With RTP)
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:3915 do_setnat: Setting NAT on RTP to Off
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:2589 __sip_xmit: Trying to put 'SIP/2.0 40' onto UDP socket destined for 192.168.1.107:37410
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:3066 __sip_ack: Stopping retransmission on 'NDRhZWQ0MDVkZTQ1NDI2ZTc0YWQ1NWM2OTIxODZhY2I.' of Response 1: Match Found
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:3915 do_setnat: Setting NAT on RTP to Off
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:7129 process_sdp: We're settling with these formats: 0xc (ulaw|alaw)
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:17004 handle_request_invite: Checking SIP call limits for device 200
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:4499 update_call_counter: Updating call counter for incoming call
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:5418 sip_new: *** Our native formats are 0x4 (ulaw)
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:5419 sip_new: *** Joint capabilities are 0xc (ulaw|alaw)
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:5420 sip_new: *** Our capabilities are 0x8000e (gsm|ulaw|alaw|h263)
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:5421 sip_new: *** AST_CODEC_CHOOSE formats are 0x4 (ulaw)
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:5449 sip_new: This channel will not be able to handle video.
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:10209 build_route: build_route: Contact hop: <sip:200@192.168.1.107:37410>
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:17217 handle_request_invite: SIP/200-94000900: New call is still down.... Trying...
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:2589 __sip_xmit: Trying to put 'SIP/2.0 10' onto UDP socket destined for 192.168.1.107:37410
[Sep 8 17:47:42] DEBUG[4598]: devicestate.c:450 ast_devstate_changed_literal: Notification of state change to be queued on device/channel SIP/200
[Sep 8 17:47:42] DEBUG[4575]: chan_sip.c:19633 sip_devicestate: Checking device state for peer 200
[Sep 8 17:47:42] DEBUG[4575]: devicestate.c:441 do_state_change: Changing state for SIP/200 - state 1 (Not in use)
[Sep 8 17:47:42] DEBUG[4584]: app_queue.c:767 handle_statechange: Device 'SIP/200' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[Sep 8 17:47:42] DEBUG[4727]: pbx.c:3094 pbx_extension_helper: Launching 'Dial'
-- Executing [980679442877@office:1] Dial("SIP/200-94000900", "DAHDI/2/80679442877") in new stack
[Sep 8 17:47:42] WARNING[4727]: app_dial.c:1502 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
[Sep 8 17:47:42] DEBUG[4727]: rtp.c:1832 ast_rtp_early_bridge: Channel '<unspecified>' has no RTP, not doing anything
[Sep 8 17:47:42] DEBUG[4727]: app_dial.c:2005 dial_exec_full: Exiting with DIALSTATUS=CHANUNAVAIL.
[Sep 8 17:47:42] DEBUG[4727]: pbx.c:3094 pbx_extension_helper: Launching 'Hangup'
-- Executing [980679442877@office:2] Hangup("SIP/200-94000900", "") in new stack
[Sep 8 17:47:42] DEBUG[4727]: pbx.c:3726 __ast_pbx_run: Spawn extension (office,980679442877,2) exited non-zero on 'SIP/200-94000900'
== Spawn extension (office, 980679442877, 2) exited non-zero on 'SIP/200-94000900'
[Sep 8 17:47:42] DEBUG[4727]: channel.c:1543 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/200-94000900'
[Sep 8 17:47:42] DEBUG[4727]: channel.c:1636 ast_hangup: Hanging up channel 'SIP/200-94000900'
[Sep 8 17:47:42] DEBUG[4727]: chan_sip.c:4852 sip_hangup: Hangup call SIP/200-94000900, SIP callid NDRhZWQ0MDVkZTQ1NDI2ZTc0YWQ1NWM2OTIxODZhY2I.
[Sep 8 17:47:42] DEBUG[4727]: chan_sip.c:4801 hangup_cause2sip: AST hangup cause 16 (no match found in SIP)
[Sep 8 17:47:42] DEBUG[4727]: chan_sip.c:2589 __sip_xmit: Trying to put 'SIP/2.0 60' onto UDP socket destined for 192.168.1.107:37410
[Sep 8 17:47:42] DEBUG[4727]: devicestate.c:450 ast_devstate_changed_literal: Notification of state change to be queued on device/channel SIP/200
[Sep 8 17:47:42] DEBUG[4575]: chan_sip.c:19633 sip_devicestate: Checking device state for peer 200
[Sep 8 17:47:42] DEBUG[4575]: devicestate.c:441 do_state_change: Changing state for SIP/200 - state 1 (Not in use)
[Sep 8 17:47:42] DEBUG[4584]: app_queue.c:767 handle_statechange: Device 'SIP/200' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[Sep 8 17:47:42] DEBUG[4598]: chan_sip.c:3066 __sip_ack: Stopping retransmission on 'NDRhZWQ0MDVkZTQ1NDI2ZTc0YWQ1NWM2OTIxODZhY2I.' of Response 2: Match Found
Вообщем написал все что делал, и куда лазил. Пожалуйста помогите, или скажите куда копать.
|