Есть 3 TDE200, есть астериск, общаются они друг с другом по h.323. Общаются они вполне успешно, звонки ходят туда-сюда между АТСками и астериском, с астериска во внешку через TDE, в общем в простых случаях все нормально. Задумал я голосовое приветствие сделать на астериске. Появилась одна очень неприятная проблема. Если человек знает внутренний номер и набирает его - все замечательно, звонок переводится, люди разговаривают. В астериске настроен тайм-аут голосового меню, после которого входящий идет на ICDG секретарей (2601).Далее возможно 2 варианта. Первый: секретарь переключает на номер на той же АТСке 2ХХХ, звонок переключается и все тоже нормально. Второй вариант: серетарь переключает на номер НЕ на той же АТСке (на 1ХХХ или 3ХХХ) - и вот тут возникает проблема. 2ая АТС посылает сигнал о разрыве соединения астериску. В результате, у клиента - короткие гудки, у менеджера - тишина. Вот для наглядности логи с астериска.
В первом случае
Код: Выделить всё
== New H.323 Connection created.
Q.931 message data is 74 octets {
08 01 33 05 04 03 90 90 a3 18 01 81 1c 35 91 aa ..3..........5..
06 80 01 00 82 01 00 8b 01 00 a1 27 02 01 d5 06 ...........'....
0b 2b 0c 02 87 7b 01 01 01 01 0a 06 04 15 01 01 .+...{..........
00 05 02 00 80 06 01 80 80 04 40 00 01 00 82 03 ..........@.....
00 00 00 70 05 89 36 31 30 30 ...p..6100
}
Error while decoding Q.931 message
--Received SETUP message
Setting capabilities to 0x10c (ulaw|alaw|g729)
Capabilities in preference order is (alaw|ulaw|g729)
DTMF mode is 1
Allowed Codecs for ip$192.168.0.10:10208/10745 (ip$192.168.0.9:1720):
Table:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
UserInput/hookflash <5>
UserInput/RFC2833 <6>
Set:
0:
0:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
1:
UserInput/hookflash <5>
2:
UserInput/RFC2833 <6>
=-= In OnAnswerCall for call 10745
- Progress Indicator: 0
- Inserting PI of 8 into ALERTING message
-- Started logical channel: sending G.711-ALaw-64k
-- channelsOpen = 1
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12102
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 13258
-- Started logical channel: receiving G.711-ALaw-64k
-- channelsOpen = 2
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12102
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 13258
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
Answering call ip$192.168.0.10:10208/10745
-- Received Facility message...
31:16.847 H245:2c5a5...5:2c5a5200 transports.cxx(1824) H225 Accept for H245 failed: Interrupted system call
31:16.858 H225 Answe...r:2c41c500 tlibthrd.cxx(877) PWLib Destroyed thread 0x2c5a5200 H245:2c5a5200(id = 0)
Using 192.168.0.9 for outbound H.245 transport
-- Receiving RFC2833 on payload 101
Peer capability is G.711-ALaw-64k <1>
Found peer capability G.711-ALaw-64k <1>, Asterisk code is 8, frame size (in ms) is 10
Peer capability is G.729A <2>
Found peer capability G.729A <2>, Asterisk code is 256, frame size (in ms) is 20
Peer capability is G.729 <3>
Found peer capability G.729 <3>, Asterisk code is 256, frame size (in ms) is 0
Peer capability is UserInput/dtmf <5>
Peer capabilities = 0x108 (alaw|g729), ordered list is (alaw|g729)
=-= In OnConnectionEstablished for call 10745
-- Connection Established with "192.168.0.10"
-- Making call to 2601@192.168.0.10:1720 without gatekeeper.
Using 192.168.0.9 for outbound call
== New H.323 Connection created.
-- asterisk is calling host 2601@192.168.0.10:1720
-- Call token is ip$localhost/8210
-- Call reference is 8210
-- DTMF Payload is 0x2cb7a1ac
Setting capabilities to 0x10c (ulaw|alaw|g729)
Capabilities in preference order is (alaw|ulaw|g729)
DTMF mode is 1
Allowed Codecs for ip$localhost/8210 (ip$192.168.0.9:48661):
Table:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
UserInput/hookflash <5>
UserInput/RFC2833 <6>
Set:
0:
0:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
1:
UserInput/hookflash <5>
2:
UserInput/RFC2833 <6>
-- Sending SETUP message
Q.931 message data is 7 octets {
08 01 81 02 18 01 8a .......
}
Error while decoding Q.931 message
Q.931 message data is 8 octets {
08 01 81 01 1e 02 81 88 ........
}
Error while decoding Q.931 message
-- Started logical channel: receiving G.711-ALaw-64k
-- channelsOpen = 3
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12106
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 28370
-- Started logical channel: sending G.711-ALaw-64k
-- channelsOpen = 4
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12106
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 28370
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
=-= In OnAlerting for call 8210: sessionId=0
-- Ringing phone for "2601"
- Progress Indicator: 8
Q.931 message data is 52 octets {
08 01 81 07 1c 26 91 aa 06 80 01 00 82 01 00 8b .....&..........
01 00 a1 18 02 01 42 06 04 2b 0c 09 02 80 0d c8 ......B..+......
e2 e0 ed ee e2 e0 20 c6 e0 ed ed e0 4c 06 09 80 ...... .....L...
32 31 30 33 2103
}
Error while decoding Q.931 message
31:40.463 H225 Calle...r:2c543ec0 h323ep.cxx(2697) H225 Received connect PDU.
Using 192.168.0.9 for outbound H.245 transport
-- Receiving RFC2833 on payload 101
=-= In OnConnectionEstablished for call 8210
-- Connection Established with "192.168.0.10"
-- Received Facility message...
Peer capability is G.711-ALaw-64k <1>
Found peer capability G.711-ALaw-64k <1>, Asterisk code is 8, frame size (in ms) is 10
Peer capability is G.729A <2>
Found peer capability G.729A <2>, Asterisk code is 256, frame size (in ms) is 10
Peer capability is G.729 <3>
Found peer capability G.729 <3>, Asterisk code is 256, frame size (in ms) is 0
Peer capability is G.711-uLaw-64k <4>
Found peer capability G.711-uLaw-64k <4>, Asterisk code is 4, frame size (in ms) is 10
Peer capability is UserInput/dtmf <6>
Peer capabilities = 0x10c (ulaw|alaw|g729), ordered list is (alaw|g729|ulaw)
Q.931 message data is 8 octets {
08 01 81 45 08 02 81 90 ...E....
}
Error while decoding Q.931 message
-- Received Facility message...
-- Received RELEASE COMPLETE message...
-- ClearCall: Request to clear call with token ip$localhost/8210, cause EndedByRemoteUser
-- Sending RELEASE COMPLETE
-- ClearCall: Request to clear call with token ip$localhost/8210, cause EndedByTransportFail
channelsOpen = 3
ExternalRTPChannel Destroyed
channelsOpen = 2
ExternalRTPChannel Destroyed
31:56.245 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2cde6c00 H245:2cde6c00(id = 0)
31:56.246 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2c543ec0 H225 Caller:2c543ec0(id = 0)
31:56.246 H323 Cleaner h323.cxx(895) H323 Connection ip$localhost/8210 terminated.
-- 192.168.0.10 has cleared the call
== H.323 Connection deleted.
== Spawn extension (voicemenu, t, 1) exited non-zero on 'H323/ip$192.168.0.10:10208/10745'
-- Sending RELEASE COMPLETE
-- ClearCall: Request to clear call with token ip$192.168.0.10:10208/10745, cause EndedByRemoteUser
channelsOpen = 1
channelsOpen = 0
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
31:56.445 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2c93d500 H245:2c93d500(id = 0)
31:56.445 H225 Answe...r:2c41c500 h323pdu.cxx(1420) H225 Read error (4): Interrupted system call
-- ClearCall: Request to clear call with token ip$192.168.0.10:10208/10745, cause EndedByTransportFail
31:56.456 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2c41c500 H225 Answer:2c41c500(id = 0)
31:56.456 H323 Cleaner h323.cxx(895) H323 Connection ip$192.168.0.10:10208/10745 terminated.
-- 192.168.0.10 has cleared the call
== H.323 Connection deleted.
Второй случай:
Код: Выделить всё
== New H.323 Connection created.
Q.931 message data is 74 octets {
08 01 38 05 04 03 90 90 a3 18 01 81 1c 35 91 aa ..8..........5..
06 80 01 00 82 01 00 8b 01 00 a1 27 02 01 d5 06 ...........'....
0b 2b 0c 02 87 7b 01 01 01 01 0a 06 04 15 01 01 .+...{..........
00 05 02 00 80 06 01 80 80 04 40 00 01 00 82 03 ..........@.....
00 00 00 70 05 89 36 31 30 30 ...p..6100
}
Error while decoding Q.931 message
--Received SETUP message
Setting capabilities to 0x10c (ulaw|alaw|g729)
Capabilities in preference order is (alaw|ulaw|g729)
DTMF mode is 1
Allowed Codecs for ip$192.168.0.10:10171/10751 (ip$192.168.0.9:1720):
Table:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
UserInput/hookflash <5>
UserInput/RFC2833 <6>
Set:
0:
0:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
1:
UserInput/hookflash <5>
2:
UserInput/RFC2833 <6>
=-= In OnAnswerCall for call 10751
- Progress Indicator: 0
- Inserting PI of 8 into ALERTING message
-- Started logical channel: sending G.711-ALaw-64k
-- channelsOpen = 1
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12126
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 10736
-- Started logical channel: receiving G.711-ALaw-64k
-- channelsOpen = 2
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12126
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 10736
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
Answering call ip$192.168.0.10:10171/10751
-- Received Facility message...
35:03.444 H245:2c0a2...5:2c0a2f00 transports.cxx(1824) H225 Accept for H245 failed: Interrupted system call
35:03.454 H225 Answe...r:2c41c100 tlibthrd.cxx(877) PWLib Destroyed thread 0x2c0a2f00 H245:2c0a2f00(id = 0)
Using 192.168.0.9 for outbound H.245 transport
-- Receiving RFC2833 on payload 101
Peer capability is G.711-ALaw-64k <1>
Found peer capability G.711-ALaw-64k <1>, Asterisk code is 8, frame size (in ms) is 10
Peer capability is G.729A <2>
Found peer capability G.729A <2>, Asterisk code is 256, frame size (in ms) is 20
Peer capability is G.729 <3>
Found peer capability G.729 <3>, Asterisk code is 256, frame size (in ms) is 0
Peer capability is UserInput/dtmf <5>
Peer capabilities = 0x108 (alaw|g729), ordered list is (alaw|g729)
=-= In OnConnectionEstablished for call 10751
-- Connection Established with "192.168.0.10"
-- Making call to 2601@192.168.0.10:1720 without gatekeeper.
Using 192.168.0.9 for outbound call
== New H.323 Connection created.
-- asterisk is calling host 2601@192.168.0.10:1720
-- Call token is ip$localhost/8212
-- Call reference is 8212
-- DTMF Payload is 0x2d2921ac
Setting capabilities to 0x10c (ulaw|alaw|g729)
Capabilities in preference order is (alaw|ulaw|g729)
DTMF mode is 1
Allowed Codecs for ip$localhost/8212 (ip$192.168.0.9:51065):
Table:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
UserInput/hookflash <5>
UserInput/RFC2833 <6>
Set:
0:
0:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
G.729A <3>
G.729 <4>
1:
UserInput/hookflash <5>
2:
UserInput/RFC2833 <6>
-- Sending SETUP message
Q.931 message data is 7 octets {
08 01 81 02 18 01 8a .......
}
Error while decoding Q.931 message
Q.931 message data is 8 octets {
08 01 81 01 1e 02 81 88 ........
}
Error while decoding Q.931 message
-- Started logical channel: receiving G.711-ALaw-64k
-- channelsOpen = 3
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12130
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 18588
-- Started logical channel: sending G.711-ALaw-64k
-- channelsOpen = 4
External RTP Session Starting
RTP channel id 1 parameters:
-- remoteIpAddress: 192.168.0.11
-- remotePort: 12130
-- ExternalIpAddress: 192.168.0.9
-- ExternalPort: 18588
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
=-= In OnAlerting for call 8212: sessionId=0
-- Ringing phone for "2601"
- Progress Indicator: 8
Q.931 message data is 53 octets {
08 01 81 07 1c 27 91 aa 06 80 01 00 82 01 00 8b .....'..........
01 00 a1 19 02 01 42 06 04 2b 0c 09 02 80 0e c0 ......B..+......
ed e4 f0 e5 e5 e2 e0 20 cc e0 f0 e8 ff 4c 06 09 ....... .....L..
80 32 31 30 35 .2105
}
Error while decoding Q.931 message
35:26.390 H225 Calle...r:2c045b00 h323ep.cxx(2697) H225 Received connect PDU.
Using 192.168.0.9 for outbound H.245 transport
-- Receiving RFC2833 on payload 101
=-= In OnConnectionEstablished for call 8212
-- Connection Established with "192.168.0.10"
-- Received Facility message...
Peer capability is G.711-ALaw-64k <1>
Found peer capability G.711-ALaw-64k <1>, Asterisk code is 8, frame size (in ms) is 10
Peer capability is G.729A <2>
Found peer capability G.729A <2>, Asterisk code is 256, frame size (in ms) is 10
Peer capability is G.729 <3>
Found peer capability G.729 <3>, Asterisk code is 256, frame size (in ms) is 0
Peer capability is G.711-uLaw-64k <4>
Found peer capability G.711-uLaw-64k <4>, Asterisk code is 4, frame size (in ms) is 10
Peer capability is UserInput/dtmf <6>
Peer capabilities = 0x10c (ulaw|alaw|g729), ordered list is (alaw|g729|ulaw)
Q.931 message data is 39 octets {
08 01 81 62 1c 21 91 aa 06 80 01 00 82 01 00 a1 ...b.!..........
16 02 01 61 06 04 2b 0c 09 09 30 0b 12 03 31 38 ...a..+...0...18
36 80 04 33 31 31 36 6..3116
}
Error while decoding Q.931 message
-- Received Facility message...
Q.931 message data is 8 octets {
08 01 81 45 08 02 81 90 ...E....
}
Error while decoding Q.931 message
-- Received Facility message...
-- Received RELEASE COMPLETE message...
-- ClearCall: Request to clear call with token ip$localhost/8212, cause EndedByRemoteUser
-- Sending RELEASE COMPLETE
-- ClearCall: Request to clear call with token ip$localhost/8212, cause EndedByTransportFail
channelsOpen = 3
ExternalRTPChannel Destroyed
channelsOpen = 2
ExternalRTPChannel Destroyed
35:53.443 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2cde4600 H245:2cde4600(id = 0)
35:53.443 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2c045b00 H225 Caller:2c045b00(id = 0)
35:53.443 H323 Cleaner h323.cxx(895) H323 Connection ip$localhost/8212 terminated.
-- 192.168.0.10 has cleared the call
== H.323 Connection deleted.
== Spawn extension (voicemenu, t, 1) exited non-zero on 'H323/ip$192.168.0.10:10171/10751'
-- Sending RELEASE COMPLETE
-- ClearCall: Request to clear call with token ip$192.168.0.10:10171/10751, cause EndedByRemoteUser
channelsOpen = 1
channelsOpen = 0
ExternalRTPChannel Destroyed
ExternalRTPChannel Destroyed
35:53.642 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2c93df00 H245:2c93df00(id = 0)
35:53.643 H225 Answe...r:2c41c100 h323pdu.cxx(1420) H225 Read error (4): Interrupted system call
-- ClearCall: Request to clear call with token ip$192.168.0.10:10171/10751, cause EndedByTransportFail
35:53.653 H323 Cleaner tlibthrd.cxx(877) PWLib Destroyed thread 0x2c41c100 H225 Answer:2c41c100(id = 0)
35:53.654 H323 Cleaner h323.cxx(895) H323 Connection ip$192.168.0.10:10171/10751 terminated.
-- 192.168.0.10 has cleared the call
== H.323 Connection deleted.
Я не совсем понимаю такое поведение - почему во втором случае панас по q.931 сообщил о номере, на который был переведен звонок? Значит ли это, что 2ая АТСка хотела чтобы астериск сам перевел звонок на 3116, а астериск этого не понял? Вот кусок extensions.conf астериска, отвечающий за IVR:
Код: Выделить всё
[voicemenu]
exten => s,1,Answer()
exten => s,2,Set(VOLUME(TX)=3)
exten => s,3,Background(welcome)
exten => s,4,WaitExten(5)
exten => _1XXX,1,Dial(H323/persp1a/${EXTEN},60,tTr)
exten => _2XXX,1,Dial(H323/persp1adm/${EXTEN},60,tTr)
exten => _3XXX,1,Dial(H323/persp1torg/${EXTEN},60,tTr)
exten => 5,1,Dial(H323/persp1adm/2131,60,tTr)
exten => t,1,Dial(H323/persp1adm/2601,60,tTr)
;exten => i,1,Dial(H323/persp1adm/2601,60,tTr)
;exten => e,1,Dial(H323/persp1adm/2601,60,tTr)
exten => s,n,Hangup
Код: Выделить всё
[general]
port = 1720
bindaddr = 192.168.0.9
disallow=all
allow=alaw
allow=ulaw
allow=g729
dtmfmode=rfc2833
gatekeeper = DISABLE
context=panas
progress_setup = 8
progress_alert = 8
h245tunneling=no
faststart=yes
[persp1a]
type=friend
host=192.168.0.18
port=1720
context=panas
h245tunneling=no
faststart=yes
[persp1adm]
type=friend
host=192.168.0.10
port=1720
context=panas
h245tunneling=no
faststart=yes
[persp1torg]
type=friend
host=192.168.0.12
port=1720
context=panas
h245tunneling=no
faststart=yes