Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

Обрывается связь

0

Здравствуйте, друзья!

В общем есть 3 территориально распределенных офиса в 2ух из них стоят аналоговые АТС, в 3ем Астериск. Аналоговые АТС соеденены с Астериском через VoIP шлюзы. В общем схема такая:

<Абонент 1> <----> <Аналоговая АТС1> <----> <D-Link dvg-6008s 1й> <----> <Asterisk> <----> <D-Link dvg-6008s 2й> <----> <Аналоговая АТС2> <----> <Абонент 2>

Абонент1 дозванивается до Абонента2, но через некоторое время разговор разрывается, причем время всегда различное, обычно меньше минуты. В логах:

== Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [06012@from-pstn:1] Set("SIP/6012-0000016b", "__FROM_DID=06012") in new stack
    -- Executing [06012@from-pstn:2] Gosub("SIP/6012-0000016b", "app-blacklist-check,s,1") in new stack
    -- Executing [s@app-blacklist-check:1] GotoIf("SIP/6012-0000016b", "0?blacklisted") in new stack
    -- Executing [s@app-blacklist-check:2] Set("SIP/6012-0000016b", "CALLED_BLACKLIST=1") in new stack
    -- Executing [s@app-blacklist-check:3] Return("SIP/6012-0000016b", "") in new stack
    -- Executing [06012@from-pstn:3] ExecIf("SIP/6012-0000016b", "0 ?Set(CALLERID(name)=6012)") in new stack
    -- Executing [06012@from-pstn:4] Set("SIP/6012-0000016b", "__CALLINGPRES_SV=allowed_not_screened") in new stack
    -- Executing [06012@from-pstn:5] Set("SIP/6012-0000016b", "CALLERPRES()=allowed_not_screened") in new stack
    -- Executing [06012@from-pstn:6] Goto("SIP/6012-0000016b", "disa,1,1") in new stack
    -- Goto (disa,1,1)
    -- Executing [1@disa:1] Answer("SIP/6012-0000016b", "") in new stack
       > 0x2b0734530190 -- Probation passed - setting RTP source address to 192.168.7.207:9002
    -- Executing [1@disa:2] Set("SIP/6012-0000016b", "_DISA=disa^1^newcall") in new stack
    -- Executing [1@disa:3] Set("SIP/6012-0000016b", "_DISACONTEXT=from-internal") in new stack
    -- Executing [1@disa:4] Set("SIP/6012-0000016b", "_KEEPCID=TRUE") in new stack
    -- Executing [1@disa:5] Set("SIP/6012-0000016b", "_HANGUP=") in new stack
    -- Executing [1@disa:6] Set("SIP/6012-0000016b", "TIMEOUT(digit)=2") in new stack
    -- Digit timeout set to 2.000
    -- Executing [1@disa:7] Set("SIP/6012-0000016b", "TIMEOUT(response)=10") in new stack
    -- Response timeout set to 10.000
    -- Executing [1@disa:8] DISA("SIP/6012-0000016b", "no-password,disa-dial") in new stack
    -- Executing [2151@disa-dial:1] NoOp("SIP/6012-0000016b", "called 2151 in from-internal by ID: 1") in new stack
    -- Executing [2151@disa-dial:2] Dial("SIP/6012-0000016b", "Local/2151@from-internal,300,") in new stack
    -- Called Local/2151@from-internal
    -- Executing [2151@from-internal:1] Macro("Local/2151@from-internal-00000077;2", "user-callerid,SKIPTTL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("Local/2151@from-internal-00000077;2", "AMPUSER=6012") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("Local/2151@from-internal-00000077;2", "1?report") in new stack
    -- Goto (macro-user-callerid,s,10)
    -- Executing [s@macro-user-callerid:10] GotoIf("Local/2151@from-internal-00000077;2", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] Set("Local/2151@from-internal-00000077;2", "CALLERID(number)=6012") in new stack
    -- Executing [s@macro-user-callerid:20] Set("Local/2151@from-internal-00000077;2", "CALLERID(name)=6012") in new stack
    -- Executing [s@macro-user-callerid:21] NoOp("Local/2151@from-internal-00000077;2", "Using CallerID "6012" <6012>") in new stack
    -- Executing [2151@from-internal:2] NoOp("Local/2151@from-internal-00000077;2", "Calling Out Route: to_megion") in new stack
    -- Executing [2151@from-internal:3] Set("Local/2151@from-internal-00000077;2", "MOHCLASS=default") in new stack
    -- Executing [2151@from-internal:4] Set("Local/2151@from-internal-00000077;2", "_NODEST=") in new stack
    -- Executing [2151@from-internal:5] Macro("Local/2151@from-internal-00000077;2", "record-enable,6012,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("Local/2151@from-internal-00000077;2", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("Local/2151@from-internal-00000077;2", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("Local/2151@from-internal-00000077;2", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,15)
    -- Executing [s@macro-record-enable:15] GotoIf("Local/2151@from-internal-00000077;2", "0?IN") in new stack
    -- Executing [s@macro-record-enable:16] ExecIf("Local/2151@from-internal-00000077;2", "1?MacroExit()") in new stack
    -- Executing [2151@from-internal:6] Macro("Local/2151@from-internal-00000077;2", "dialout-trunk,17,2151,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("Local/2151@from-internal-00000077;2", "DIAL_TRUNK=17") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("Local/2151@from-internal-00000077;2", "0?sub-pincheck,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("Local/2151@from-internal-00000077;2", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("Local/2151@from-internal-00000077;2", "DIAL_NUMBER=2151") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("Local/2151@from-internal-00000077;2", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("Local/2151@from-internal-00000077;2", "OUTBOUND_GROUP=OUT_17") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("Local/2151@from-internal-00000077;2", "0?nomax") in new stack
    -- Executing [s@macro-dialout-trunk:8] GotoIf("Local/2151@from-internal-00000077;2", "0?chanfull") in new stack
    -- Executing [s@macro-dialout-trunk:9] GotoIf("Local/2151@from-internal-00000077;2", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("Local/2151@from-internal-00000077;2", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("Local/2151@from-internal-00000077;2", "outbound-callerid,17") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("Local/2151@from-internal-00000077;2", "1?Set(CALLERPRES()=allowed_not_screened)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("Local/2151@from-internal-00000077;2", "1?Set(REALCALLERIDNUM=6012)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("Local/2151@from-internal-00000077;2", "0?normcid") in new stack
    -- Executing [s@macro-outbound-callerid:4] Set("Local/2151@from-internal-00000077;2", "USEROUTCID=6012") in new stack
    -- Executing [s@macro-outbound-callerid:5] GotoIf("Local/2151@from-internal-00000077;2", "1?bypass") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("Local/2151@from-internal-00000077;2", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("Local/2151@from-internal-00000077;2", "TRUNKOUTCID=6018") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("Local/2151@from-internal-00000077;2", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("Local/2151@from-internal-00000077;2", "1?Set(CALLERID(all)=6018)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("Local/2151@from-internal-00000077;2", "1?Set(CALLERID(all)=6012)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("Local/2151@from-internal-00000077;2", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("Local/2151@from-internal-00000077;2", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("Local/2151@from-internal-00000077;2", "0?sub-flp-17,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("Local/2151@from-internal-00000077;2", "OUTNUM=2151") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("Local/2151@from-internal-00000077;2", "custom=SIP/6018") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("Local/2151@from-internal-00000077;2", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("Local/2151@from-internal-00000077;2", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("Local/2151@from-internal-00000077;2", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("Local/2151@from-internal-00000077;2", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("Local/2151@from-internal-00000077;2", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:19] Dial("Local/2151@from-internal-00000077;2", "SIP/6018/2151,300,") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/6018/2151
    -- SIP/6018-0000016c answered Local/2151@from-internal-00000077;2
    -- Local/2151@from-internal-00000077;1 answered SIP/6012-0000016b
       > 0x1ef03f50 -- Probation passed - setting RTP source address to 192.168.7.207:9000
    -- Executing [h@macro-dialout-trunk:1] Macro("Local/2151@from-internal-00000077;2", "hangupcall,") in new stack
    -- Locally bridging SIP/6012-0000016b and SIP/6018-0000016c
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/2151@from-internal-00000077;2", "1?endmixmoncheck") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] NoOp("Local/2151@from-internal-00000077;2", "End of MIXMON check") in new stack
    -- Executing [s@macro-hangupcall:10] GotoIf("Local/2151@from-internal-00000077;2", "1?nomeetmemon") in new stack
    -- Goto (macro-hangupcall,s,28)
    -- Executing [s@macro-hangupcall:28] NoOp("Local/2151@from-internal-00000077;2", "End of MEETME check") in new stack
    -- Executing [s@macro-hangupcall:29] GotoIf("Local/2151@from-internal-00000077;2", "1?noautomon") in new stack
    -- Goto (macro-hangupcall,s,34)
    -- Executing [s@macro-hangupcall:34] NoOp("Local/2151@from-internal-00000077;2", "TOUCH_MONITOR_OUTPUT=") in new stack
    -- Executing [s@macro-hangupcall:35] GotoIf("Local/2151@from-internal-00000077;2", "1?noautomon2") in new stack
    -- Goto (macro-hangupcall,s,41)
    -- Executing [s@macro-hangupcall:41] NoOp("Local/2151@from-internal-00000077;2", "MONITOR_FILENAME=") in new stack
    -- Executing [s@macro-hangupcall:42] GotoIf("Local/2151@from-internal-00000077;2", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,45)
    -- Executing [s@macro-hangupcall:45] GotoIf("Local/2151@from-internal-00000077;2", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,48)
    -- Executing [s@macro-hangupcall:48] GotoIf("Local/2151@from-internal-00000077;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,50)
    -- Executing [s@macro-hangupcall:50] AGI("Local/2151@from-internal-00000077;2", "hangup.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
    -- <Local/2151@from-internal-00000077;2>AGI Script hangup.agi completed, returning 0
    -- Executing [s@macro-hangupcall:51] Hangup("Local/2151@from-internal-00000077;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 51) exited non-zero on 'Local/2151@from-internal-00000077;2' in macro 'hangupcall'
  == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'Local/2151@from-internal-00000077;2'
  == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'Local/2151@from-internal-00000077;2' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 2151, 6) exited non-zero on 'Local/2151@from-internal-00000077;2'

В этом месте 2 абонента соеденяются и начинают разговаривать. И в какой то момент происходит разрыв, сопровождающийся:

 == Spawn extension (disa-dial, 2151, 2) exited non-zero on 'SIP/6012-0000016b'

Это мой первый опыт работы с астериском, подскажите хоть в какую сторону рыть.

Вот что показывает SIP дебаг:

<--- SIP read from UDP:192.168.7.207:5060 --->
BYE sip:06012@192.168.211.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.7.207:5060;branch=z9hG4bK12f571d9856db903
From: "6012" <sip:6012@192.168.211.1>;tag=bf8a377d-124635
To: <sip:06012@192.168.211.1;user=phone>;tag=as3ab747b1
Call-ID: D1B9-18E0-47124635CCA4C59CEE54-111@SipHost
CSeq:2017 BYE
Max-Forwards:70
User-Agent:dlink 12-38-43929367-0.9.5.1.1928-SA7O8
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Sending to 192.168.7.207:5060 (no NAT)
Scheduling destruction of SIP dialog 'D1B9-18E0-47124635CCA4C59CEE54-111@SipHost' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 192.168.7.207:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.7.207:5060;branch=z9hG4bK12f571d9856db903;received=192.168.7.207
From: "6012" <sip:6012@192.168.211.1>;tag=bf8a377d-124635
To: <sip:06012@192.168.211.1;user=phone>;tag=as3ab747b1
Call-ID: D1B9-18E0-47124635CCA4C59CEE54-111@SipHost
CSeq: 2017 BYE
Server: FPBX-2.8.1(11.7.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '57b321e6286d2ac66ed28d7d18bff381@192.168.211.1:5060' in 6400 ms (Method: INVITE)
set_destination: Parsing <sip:FXO@192.168.7.207:5060> for address/port to send to
set_destination: set destination to 192.168.7.207:5060
Reliably Transmitting (no NAT) to 192.168.7.207:5060:
BYE sip:FXO@192.168.7.207:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.211.1:5060;branch=z9hG4bK6ab5ca67
Max-Forwards: 70
From: <sip:6012@192.168.211.1>;tag=as10e2caca
To: <sip:2007@192.168.7.207:5060>;tag=18928f34-124643
Call-ID: 57b321e6286d2ac66ed28d7d18bff381@192.168.211.1:5060
CSeq: 103 BYE
User-Agent: FPBX-2.8.1(11.7.0)
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---
  == Spawn extension (disa-dial, 2007, 2) exited non-zero on 'SIP/6012-0000018d'
Retransmitting #1 (no NAT) to 192.168.7.207:5060:
BYE sip:FXO@192.168.7.207:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.211.1:5060;branch=z9hG4bK6ab5ca67
Max-Forwards: 70
From: <sip:6012@192.168.211.1>;tag=as10e2caca
To: <sip:2007@192.168.7.207:5060>;tag=18928f34-124643
Call-ID: 57b321e6286d2ac66ed28d7d18bff381@192.168.211.1:5060
CSeq: 103 BYE
User-Agent: FPBX-2.8.1(11.7.0)
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---

<--- SIP read from UDP:192.168.7.207:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.211.1:5060;branch=z9hG4bK6ab5ca67
From: <sip:6012@192.168.211.1>;tag=as10e2caca
To: <sip:2007@192.168.7.207:5060>;tag=18928f34-124643
Call-ID: 57b321e6286d2ac66ed28d7d18bff381@192.168.211.1:5060
CSeq:103 BYE
User-Agent:dlink 12-38-43929367-0.9.5.1.1928-SA7O8
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '57b321e6286d2ac66ed28d7d18bff381@192.168.211.1:5060' Method: INVITE

<--- SIP read from UDP:192.168.7.207:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.211.1:5060;branch=z9hG4bK6ab5ca67
From: <sip:6012@192.168.211.1>;tag=as10e2caca
To: <sip:2007@192.168.7.207:5060>;tag=18928f34-124643
Call-ID: 57b321e6286d2ac66ed28d7d18bff381@192.168.211.1:5060
CSeq:103 BYE
User-Agent:dlink 12-38-43929367-0.9.5.1.1928-SA7O8
Content-Length: 0

<------------->
удалить закрыть убрать флаг спам (1) изменить тег редактировать

спросил 2014-03-11 16:42:24 +0400

Tottoro Gravatar Tottoro
34 2 5

обновил 2014-03-11 18:17:55 +0400

Comments

1) С интернетом порядок. Целый день в удаленной консоле астериска - ни каких ощутимых проблем со связью.

2) Добавил логи по сип

Tottoro ( 2014-03-11 18:16:18 +0400 )редактировать

проблема с NAT . нужно починить.

zzuz ( 2014-03-11 22:40:15 +0400 )редактировать

Уважаемый zuzz, поделитесь опытом, почему вы грешите на NAT. Дело в том что все этоо добро работает через IPSEC VPN каналы установленные между шлюзами. То есть астериск и шлюзы находятся "как бы" просто в разных подсетях. 192.168.7.0\24, 192.168.130.0\24, 192.168.211.0\24. Может быть проблема в другом?

Tottoro ( 2014-03-12 17:14:38 +0400 )редактировать

Начал смотреть логи на VoIP шлюзе dvg-6008s На нем обрыв сопровождается сообщением

no rtp media for a while Bye at Tolking

Tottoro ( 2014-03-12 17:36:03 +0400 )редактировать

1 Ответ

0

1) проверить интернет между шлюзами

2) включить сип дебаг и посмотреть

http://asterisk-support.ru/question/38386/kak-poniat-chto-proiskhodit-na-asteriske/

ссылка удалить спам редактировать

ответил 2014-03-11 17:45:02 +0400

meral Gravatar meral flag of Ukraine
21228 23 18 169
http://pro-sip.net/

Ваш ответ

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[скрыть предварительный просмотр]

Закладки и информация

Добавить закладку

подписаться на rss ленту новостей

Статистика

Задан: 2014-03-11 16:42:24 +0400

Просмотрен: 719 раз

Обновлен: Mar 11 '14

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.