VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Странно работает дозвон из одного Asteriska в другой (IAX2)

Новичком считается только что прочитавший «Астериск - будущее телефонии»
http://asterisk.ru/knowledgebase/books
и пытающийся сделать большее

Модераторы: april22, Zavr2008

Ответить
koval
Сообщения: 11
Зарегистрирован: 03 янв 2016, 21:41

Странно работает дозвон из одного Asteriska в другой (IAX2)

Сообщение koval »

Есть два сервера Asterisk Elastix.

Asterisk 1 (две сетевые карты, eth0, eth1). Первая сетевая карта смотрит в локалку, другая в интернет. Нумерация 1XXX.
Asterisk 2 (одна сетевая карта). Стоит за NAT'ом. Прокинути порты 5060 sip, 10000-20000 rtp, 4569 IAX. Нумерация 2XXX.

Asterisk 1 соединен по транку IAX2 c Asterisk 2.

Сценарий 1.
Клиент с интернета подключен к Asterisk 2. Набирает номер, скажем, 1001. Дозвон идет, голос работает, все ок.

Сценарий 2.
Клиент с локальной сети подключен к Asterisk 2. Набирает номер, скажем, 1001. Дозвон идет, голос работает, все ок.

Сценарий 3.
Клиент с интернета подключен к Asterisk 1.Набирает номер, скажем, 2001. Работает, если клиент 2001 подключен к Asterisk 2 через интернет. Не работает дозвон (Service unavaible 503), когда клиент 2001 подключен с локальной сети.
Кто может подсказать, почему ?
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
Лог дозвона с Asterisk 1 до пользователя Asterisk 2 который зарегистрирован в локальной сети.

Connected to Asterisk 11.17.1 currently running on sip (pid = 3025)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [2002@from-internal:1] Set("SIP/1056-00000032", "__RINGTIMER=15") in new stack
-- Executing [2002@from-internal:2] Macro("SIP/1056-00000032", "exten-vm,novm,2002,0,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SIP/1056-00000032", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/1056-00000032", "TOUCH_MONITOR=1453585071.72") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/1056-00000032", "AMPUSER=1056") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/1056-00000032", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/1056-00000032", "1?Set(REALCALLERIDNUM=1056)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/1056-00000032", "AMPUSER=1056") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/1056-00000032", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/1056-00000032", "AMPUSERCIDNAME=1056") in new stack
-- Executing [s@macro-user-callerid:8] GotoIf("SIP/1056-00000032", "0?report") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/1056-00000032", "AMPUSERCID=1056") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/1056-00000032", "__DIAL_OPTIONS=tr") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/1056-00000032", "CALLERID(all)="1056" <1056>") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/1056-00000032", "0?limit") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("SIP/1056-00000032", "0?Set(GROUP(concurrency_limit)=1056)") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("SIP/1056-00000032", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:15] GotoIf("SIP/1056-00000032", "0?continue") in new stack
-- Executing [s@macro-user-callerid:16] Set("SIP/1056-00000032", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("SIP/1056-00000032", "1?continue") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] Set("SIP/1056-00000032", "CALLERID(number)=1056") in new stack
-- Executing [s@macro-user-callerid:29] Set("SIP/1056-00000032", "CALLERID(name)=1056") in new stack
-- Executing [s@macro-user-callerid:30] Set("SIP/1056-00000032", "CDR(cnum)=1056") in new stack
-- Executing [s@macro-user-callerid:31] Set("SIP/1056-00000032", "CDR(cnam)=1056") in new stack
-- Executing [s@macro-user-callerid:32] Set("SIP/1056-00000032", "CHANNEL(language)=en") in new stack
-- Executing [s@macro-exten-vm:2] Set("SIP/1056-00000032", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("SIP/1056-00000032", "__EXTTOCALL=2002") in new stack
-- Executing [s@macro-exten-vm:4] Set("SIP/1056-00000032", "__PICKUPMARK=2002") in new stack
-- Executing [s@macro-exten-vm:5] Set("SIP/1056-00000032", "RT=") in new stack
-- Executing [s@macro-exten-vm:6] Gosub("SIP/1056-00000032", "sub-record-check,s,1(exten,2002,)") in new stack
-- Executing [s@sub-record-check:1] Set("SIP/1056-00000032", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:2] GotoIf("SIP/1056-00000032", "1?check") in new stack
-- Goto (sub-record-check,s,7)
-- Executing [s@sub-record-check:7] Set("SIP/1056-00000032", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:8] GotoIf("SIP/1056-00000032", "1?next") in new stack
-- Goto (sub-record-check,s,11)
-- Executing [s@sub-record-check:11] ExecIf("SIP/1056-00000032", "0?Return()") in new stack
-- Executing [s@sub-record-check:12] ExecIf("SIP/1056-00000032", "0?Set(__REC_POLICY_MODE=)") in new stack
-- Executing [s@sub-record-check:13] GotoIf("SIP/1056-00000032", "0?exten,1") in new stack
-- Executing [s@sub-record-check:14] Set("SIP/1056-00000032", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:15] Set("SIP/1056-00000032", "NOW=1453585071") in new stack
-- Executing [s@sub-record-check:16] Set("SIP/1056-00000032", "__DAY=23") in new stack
-- Executing [s@sub-record-check:17] Set("SIP/1056-00000032", "__MONTH=01") in new stack
-- Executing [s@sub-record-check:18] Set("SIP/1056-00000032", "__YEAR=2016") in new stack
-- Executing [s@sub-record-check:19] Set("SIP/1056-00000032", "__TIMESTR=20160123-223751") in new stack
-- Executing [s@sub-record-check:20] Set("SIP/1056-00000032", "__FROMEXTEN=1056") in new stack
-- Executing [s@sub-record-check:21] Set("SIP/1056-00000032", "__CALLFILENAME=exten-2002-1056-20160123-223751-1453585071.72") in new stack
-- Executing [s@sub-record-check:22] Goto("SIP/1056-00000032", "exten,1") in new stack
-- Goto (sub-record-check,exten,1)
-- Executing [exten@sub-record-check:1] GotoIf("SIP/1056-00000032", "0?callee") in new stack
-- Executing [exten@sub-record-check:2] Set("SIP/1056-00000032", "__REC_POLICY_MODE=dontcare") in new stack
-- Executing [exten@sub-record-check:3] GotoIf("SIP/1056-00000032", "1?caller") in new stack
-- Goto (sub-record-check,exten,10)
-- Executing [exten@sub-record-check:10] Set("SIP/1056-00000032", "__REC_POLICY_MODE=dontcare") in new stack
-- Executing [exten@sub-record-check:11] GosubIf("SIP/1056-00000032", "0?record,1(exten,2002,1056)") in new stack
-- Executing [exten@sub-record-check:12] Return("SIP/1056-00000032", "") in new stack
-- Executing [s@macro-exten-vm:7] Macro("SIP/1056-00000032", "dial-one,,tr,2002") in new stack
-- Executing [s@macro-dial-one:1] Set("SIP/1056-00000032", "DEXTEN=2002") in new stack
-- Executing [s@macro-dial-one:2] Set("SIP/1056-00000032", "DIALSTATUS_CW=") in new stack
-- Executing [s@macro-dial-one:3] GosubIf("SIP/1056-00000032", "0?screen,1()") in new stack
-- Executing [s@macro-dial-one:4] GosubIf("SIP/1056-00000032", "0?cf,1()") in new stack
-- Executing [s@macro-dial-one:5] GotoIf("SIP/1056-00000032", "1?skip1") in new stack
-- Goto (macro-dial-one,s,8)
-- Executing [s@macro-dial-one:8] GotoIf("SIP/1056-00000032", "0?nodial") in new stack
-- Executing [s@macro-dial-one:9] GotoIf("SIP/1056-00000032", "0?continue") in new stack
-- Executing [s@macro-dial-one:10] Set("SIP/1056-00000032", "EXTHASCW=") in new stack
-- Executing [s@macro-dial-one:11] GotoIf("SIP/1056-00000032", "1?next1:cwinusebusy") in new stack
-- Goto (macro-dial-one,s,12)
-- Executing [s@macro-dial-one:12] GotoIf("SIP/1056-00000032", "0?docfu:skip3") in new stack
-- Goto (macro-dial-one,s,16)
-- Executing [s@macro-dial-one:16] GotoIf("SIP/1056-00000032", "1?next2:continue") in new stack
-- Goto (macro-dial-one,s,17)
-- Executing [s@macro-dial-one:17] GotoIf("SIP/1056-00000032", "1?continue") in new stack
-- Goto (macro-dial-one,s,25)
-- Executing [s@macro-dial-one:25] GotoIf("SIP/1056-00000032", "0?nodial") in new stack
-- Executing [s@macro-dial-one:26] GosubIf("SIP/1056-00000032", "1?dstring,1():dlocal,1()") in new stack
-- Executing [dstring@macro-dial-one:1] Set("SIP/1056-00000032", "DSTRING=") in new stack
-- Executing [dstring@macro-dial-one:2] Set("SIP/1056-00000032", "DEVICES=2002") in new stack
-- Executing [dstring@macro-dial-one:3] ExecIf("SIP/1056-00000032", "0?Return()") in new stack
-- Executing [dstring@macro-dial-one:4] ExecIf("SIP/1056-00000032", "0?Set(DEVICES=002)") in new stack
-- Executing [dstring@macro-dial-one:5] Set("SIP/1056-00000032", "LOOPCNT=1") in new stack
-- Executing [dstring@macro-dial-one:6] Set("SIP/1056-00000032", "ITER=1") in new stack
-- Executing [dstring@macro-dial-one:7] Set("SIP/1056-00000032", "THISDIAL=SIP/2002") in new stack
-- Executing [dstring@macro-dial-one:8] GosubIf("SIP/1056-00000032", "1?zap2dahdi,1()") in new stack
-- Executing [zap2dahdi@macro-dial-one:1] ExecIf("SIP/1056-00000032", "0?Return()") in new stack
-- Executing [zap2dahdi@macro-dial-one:2] Set("SIP/1056-00000032", "NEWDIAL=") in new stack
-- Executing [zap2dahdi@macro-dial-one:3] Set("SIP/1056-00000032", "LOOPCNT2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:4] Set("SIP/1056-00000032", "ITER2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:5] Set("SIP/1056-00000032", "THISPART2=SIP/2002") in new stack
-- Executing [zap2dahdi@macro-dial-one:6] ExecIf("SIP/1056-00000032", "0?Set(THISPART2=DAHDI/2002)") in new stack
-- Executing [zap2dahdi@macro-dial-one:7] Set("SIP/1056-00000032", "NEWDIAL=SIP/2002&") in new stack
-- Executing [zap2dahdi@macro-dial-one:8] Set("SIP/1056-00000032", "ITER2=2") in new stack
-- Executing [zap2dahdi@macro-dial-one:9] GotoIf("SIP/1056-00000032", "0?begin2") in new stack
-- Executing [zap2dahdi@macro-dial-one:10] Set("SIP/1056-00000032", "THISDIAL=SIP/2002") in new stack
-- Executing [zap2dahdi@macro-dial-one:11] Return("SIP/1056-00000032", "") in new stack
-- Executing [dstring@macro-dial-one:9] Set("SIP/1056-00000032", "DSTRING=SIP/2002&") in new stack
-- Executing [dstring@macro-dial-one:10] Set("SIP/1056-00000032", "ITER=2") in new stack
-- Executing [dstring@macro-dial-one:11] GotoIf("SIP/1056-00000032", "0?begin") in new stack
-- Executing [dstring@macro-dial-one:12] Set("SIP/1056-00000032", "DSTRING=SIP/2002") in new stack
-- Executing [dstring@macro-dial-one:13] Return("SIP/1056-00000032", "") in new stack
-- Executing [s@macro-dial-one:27] GotoIf("SIP/1056-00000032", "0?nodial") in new stack
-- Executing [s@macro-dial-one:28] GotoIf("SIP/1056-00000032", "0?skiptrace") in new stack
-- Executing [s@macro-dial-one:29] GosubIf("SIP/1056-00000032", "1?ctset,1():ctclear,1()") in new stack
-- Executing [ctset@macro-dial-one:1] Set("SIP/1056-00000032", "DB(CALLTRACE/2002)=1056") in new stack
-- Executing [ctset@macro-dial-one:2] Return("SIP/1056-00000032", "") in new stack
-- Executing [s@macro-dial-one:30] Set("SIP/1056-00000032", "D_OPTIONS=tr") in new stack
-- Executing [s@macro-dial-one:31] ExecIf("SIP/1056-00000032", "0?SIPAddHeader(Alert-Info: )") in new stack
-- Executing [s@macro-dial-one:32] ExecIf("SIP/1056-00000032", "0?SIPAddHeader()") in new stack
-- Executing [s@macro-dial-one:33] ExecIf("SIP/1056-00000032", "0?Set(CHANNEL(musicclass)=)") in new stack
-- Executing [s@macro-dial-one:34] GosubIf("SIP/1056-00000032", "0?qwait,1()") in new stack
-- Executing [s@macro-dial-one:35] Set("SIP/1056-00000032", "__CWIGNORE=") in new stack
-- Executing [s@macro-dial-one:36] Set("SIP/1056-00000032", "__KEEPCID=TRUE") in new stack
-- Executing [s@macro-dial-one:37] GotoIf("SIP/1056-00000032", "0?usegoto,1") in new stack
-- Executing [s@macro-dial-one:38] GotoIf("SIP/1056-00000032", "0?godial") in new stack
-- Executing [s@macro-dial-one:39] Gosub("SIP/1056-00000032", "sub-presencestate-display,s,1(2002)") in new stack
[2016-01-23 22:37:51] WARNING[9840][C-00000484]: func_presencestate.c:132 presence_read: PRESENCE_STATE unknown
-- Executing [s@sub-presencestate-display:1] Goto("SIP/1056-00000032", "state-,1") in new stack
-- Goto (sub-presencestate-display,state-,1)
-- Executing [state-@sub-presencestate-display:1] Set("SIP/1056-00000032", "PRESENCESTATE_DISPLAY=") in new stack
-- Executing [state-@sub-presencestate-display:2] Return("SIP/1056-00000032", "") in new stack
-- Executing [s@macro-dial-one:40] Set("SIP/1056-00000032", "CONNECTEDLINE(name,i)=Julia Girko") in new stack
-- Executing [s@macro-dial-one:41] Set("SIP/1056-00000032", "CONNECTEDLINE(num)=2002") in new stack
-- Executing [s@macro-dial-one:42] Set("SIP/1056-00000032", "D_OPTIONS=trI") in new stack
-- Executing [s@macro-dial-one:43] Dial("SIP/1056-00000032", "SIP/2002,,trI") in new stack
[2016-01-23 22:37:51] WARNING[9840][C-00000484]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s@macro-dial-one:44] ExecIf("SIP/1056-00000032", "0?MacroExit()") in new stack
-- Executing [s@macro-dial-one:45] ExecIf("SIP/1056-00000032", "0?Set(DIALSTATUS=)") in new stack
-- Executing [s@macro-dial-one:46] GosubIf("SIP/1056-00000032", "0?s-CHANUNAVAIL,1()") in new stack
-- Executing [s@macro-dial-one:47] MacroExit("SIP/1056-00000032", "") in new stack
-- Executing [s@macro-exten-vm:8] Set("SIP/1056-00000032", "SV_DIALSTATUS=CHANUNAVAIL") in new stack
-- Executing [s@macro-exten-vm:9] GosubIf("SIP/1056-00000032", "0?docfu,1()") in new stack
-- Executing [s@macro-exten-vm:10] GosubIf("SIP/1056-00000032", "0?docfb,1()") in new stack
-- Executing [s@macro-exten-vm:11] Set("SIP/1056-00000032", "DIALSTATUS=CHANUNAVAIL") in new stack
-- Executing [s@macro-exten-vm:12] ExecIf("SIP/1056-00000032", "0?MacroExit()") in new stack
-- Executing [s@macro-exten-vm:13] GotoIf("SIP/1056-00000032", "1?s-CHANUNAVAIL,1") in new stack
-- Goto (macro-exten-vm,s-CHANUNAVAIL,1)
-- Executing [s-CHANUNAVAIL@macro-exten-vm:1] GotoIf("SIP/1056-00000032", "0?exit,1") in new stack
-- Executing [s-CHANUNAVAIL@macro-exten-vm:2] PlayTones("SIP/1056-00000032", "congestion") in new stack
-- Executing [s-CHANUNAVAIL@macro-exten-vm:3] Congestion("SIP/1056-00000032", "10") in new stack
== Spawn extension (macro-exten-vm, s-CHANUNAVAIL, 3) exited non-zero on 'SIP/1056-00000032' in macro 'exten-vm'
== Spawn extension (from-internal, 2002, 2) exited non-zero on 'SIP/1056-00000032'
-- Executing [h@from-internal:1] Hangup("SIP/1056-00000032", "") in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1056-00000032'
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
Лог дозвона с Asterisk 1 до пользователя Asterisk 2 который зарегистрирован через интернет.

Connected to Asterisk 11.17.1 currently running on sip (pid = 3025)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [2004@from-internal:1] Macro("SIP/1056-00000033", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/1056-00000033", "TOUCH_MONITOR=1453585186.73") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/1056-00000033", "AMPUSER=1056") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/1056-00000033", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/1056-00000033", "1?Set(REALCALLERIDNUM=1056)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/1056-00000033", "AMPUSER=1056") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/1056-00000033", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/1056-00000033", "AMPUSERCIDNAME=1056") in new stack
-- Executing [s@macro-user-callerid:8] GotoIf("SIP/1056-00000033", "0?report") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/1056-00000033", "AMPUSERCID=1056") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/1056-00000033", "__DIAL_OPTIONS=tr") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/1056-00000033", "CALLERID(all)="1056" <1056>") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/1056-00000033", "0?limit") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("SIP/1056-00000033", "1?Set(GROUP(concurrency_limit)=1056)") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("SIP/1056-00000033", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:15] GotoIf("SIP/1056-00000033", "1?continue") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] Set("SIP/1056-00000033", "CALLERID(number)=1056") in new stack
-- Executing [s@macro-user-callerid:29] Set("SIP/1056-00000033", "CALLERID(name)=1056") in new stack
-- Executing [s@macro-user-callerid:30] Set("SIP/1056-00000033", "CDR(cnum)=1056") in new stack
-- Executing [s@macro-user-callerid:31] Set("SIP/1056-00000033", "CDR(cnam)=1056") in new stack
-- Executing [s@macro-user-callerid:32] Set("SIP/1056-00000033", "CHANNEL(language)=en") in new stack
-- Executing [2004@from-internal:2] Set("SIP/1056-00000033", "INTRACOMPANYROUTE=YES") in new stack
-- Executing [2004@from-internal:3] Set("SIP/1056-00000033", "MOHCLASS=default") in new stack
-- Executing [2004@from-internal:4] Set("SIP/1056-00000033", "_NODEST=") in new stack
-- Executing [2004@from-internal:5] Gosub("SIP/1056-00000033", "sub-record-check,s,1(out,2004,)") in new stack
-- Executing [s@sub-record-check:1] Set("SIP/1056-00000033", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:2] GotoIf("SIP/1056-00000033", "1?check") in new stack
-- Goto (sub-record-check,s,7)
-- Executing [s@sub-record-check:7] Set("SIP/1056-00000033", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:8] GotoIf("SIP/1056-00000033", "1?next") in new stack
-- Goto (sub-record-check,s,11)
-- Executing [s@sub-record-check:11] ExecIf("SIP/1056-00000033", "0?Return()") in new stack
-- Executing [s@sub-record-check:12] ExecIf("SIP/1056-00000033", "0?Set(__REC_POLICY_MODE=)") in new stack
-- Executing [s@sub-record-check:13] GotoIf("SIP/1056-00000033", "0?out,1") in new stack
-- Executing [s@sub-record-check:14] Set("SIP/1056-00000033", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:15] Set("SIP/1056-00000033", "NOW=1453585186") in new stack
-- Executing [s@sub-record-check:16] Set("SIP/1056-00000033", "__DAY=23") in new stack
-- Executing [s@sub-record-check:17] Set("SIP/1056-00000033", "__MONTH=01") in new stack
-- Executing [s@sub-record-check:18] Set("SIP/1056-00000033", "__YEAR=2016") in new stack
-- Executing [s@sub-record-check:19] Set("SIP/1056-00000033", "__TIMESTR=20160123-223946") in new stack
-- Executing [s@sub-record-check:20] Set("SIP/1056-00000033", "__FROMEXTEN=1056") in new stack
-- Executing [s@sub-record-check:21] Set("SIP/1056-00000033", "__CALLFILENAME=out-2004-1056-20160123-223946-1453585186.73") in new stack
-- Executing [s@sub-record-check:22] Goto("SIP/1056-00000033", "out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] ExecIf("SIP/1056-00000033", "1?Set(__REC_POLICY_MODE=dontcare)") in new stack
-- Executing [out@sub-record-check:2] GosubIf("SIP/1056-00000033", "0?record,1(exten,2004,1056)") in new stack
-- Executing [out@sub-record-check:3] Return("SIP/1056-00000033", "") in new stack
-- Executing [2004@from-internal:6] Macro("SIP/1056-00000033", "dialout-trunk,2,2004,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/1056-00000033", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1056-00000033", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1056-00000033", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/1056-00000033", "DIAL_NUMBER=2004") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/1056-00000033", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/1056-00000033", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1056-00000033", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1056-00000033", "1?skipoutcid") in new stack
-- Goto (macro-dialout-trunk,s,12)
-- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/1056-00000033", "0?sub-flp-2,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/1056-00000033", "OUTNUM=2004") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/1056-00000033", "custom=IAX2/lviv") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1056-00000033", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)tr)") in new stack
-- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/1056-00000033", "0?Set(DIAL_TRUNK_OPTIONS=trM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:17] Macro("SIP/1056-00000033", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1056-00000033", "") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1056-00000033", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/1056-00000033", "1?Set(CONNECTEDLINE(num,i)=2004)") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/1056-00000033", "1?Set(CONNECTEDLINE(name,i)=CID:1056)") in new stack
-- Executing [s@macro-dialout-trunk:21] GotoIf("SIP/1056-00000033", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:22] Dial("SIP/1056-00000033", "IAX2/lviv/2004,300,tr") in new stack
-- Called IAX2/lviv/2004
-- Call accepted by external.ip.adress (format speex)
-- Format for call is (speex)
-- IAX2/lviv-21469 is ringing
-- IAX2/lviv-21469 is ringing
-- Hungup 'IAX2/lviv-21469'
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'SIP/1056-00000033' in macro 'dialout-trunk'
== Spawn extension (from-internal, 2004, 6) exited non-zero on 'SIP/1056-00000033'
-- Executing [h@from-internal:1] Hangup("SIP/1056-00000033", "") in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1056-00000033'
[2016-01-23 22:39:55] WARNING[3140]: chan_sip.c:4086 retrans_pkt: Timeout on e9bf351e2b2bca38cc4f2c6b6707ac6e on non-critical invite transaction.
-- Remote UNIX connection
-- Remote UNIX connection disconnected
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
Статус клиентов из Asterisk 2
localhost*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
2001/2001 (Unspecified) D Yes Yes A 0 UNKNOWN
2002/2002 192.168.17.39 D Yes Yes A 5060 OK (11 ms)
2003/2003 192.168.17.39 D Yes Yes A 5062 OK (12 ms)
2004/2004 external.ip.adress D Yes Yes A 50057 OK (41 ms)

Диалплан Asterisk 1
dialplan-to-lviv.JPG
dialplan-to-lviv.JPG (36.4 КБ) 6679 просмотров
Из лога ясно, что пользователи, которые зарегистрированы в Asterisk 2 через локальную сеть, для Asterisk 1 имеют статус "absent". Пользователи которые зарегистрированы в Asterisk 2 с интернету для Asterisk 1 присутствуют.
Хотя как видно из sip show peers пользователи зарегистрированы на сервере.


Еще не могу понять. В первом логе, опрашивает ли Asterisk 1 о пользователях через IAX2 транк Asterisk 2 ?

Что делать? Куда копать?
virus_net
Сообщения: 2337
Зарегистрирован: 05 июн 2013, 08:12
Откуда: Москва

Re: Странно работает дозвон из одного Asteriska в другой (IA

Сообщение virus_net »

Извечный вопрос "кто виноват и что делать ?" :)
Как это что ? Разбираться в причинах:
koval писал(а):[2016-01-23 22:37:51] WARNING[9840][C-00000484]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
koval писал(а):2001/2001 (Unspecified) D Yes Yes A 0 UNKNOWN
После чего:
koval писал(а):Не работает дозвон (Service unavaible 503), когда клиент 2001 подключен с локальной сети.
Выглядит сомнительным заявлением, т.к. исходя их вышеприведенного пир 2001 НЕ зарегистирован. Включайте sip debug пира и смотрите что там с ним происходит.
мой SIP URI sip:virus_net@asterisk.ru
bitname.ru - Домены .bit (namecoin) .emc .coin .lib .bazar (emercoin)

ENUMER - звони бесплатно и напрямую.
Аватара пользователя
Aven
Сообщения: 798
Зарегистрирован: 28 янв 2011, 16:20

Re: Странно работает дозвон из одного Asteriska в другой (IA

Сообщение Aven »

IAX не нужен
Решения телефонии на базе Asterisk || http://it-need.ru
koval
Сообщения: 11
Зарегистрирован: 03 янв 2016, 21:41

Re: Странно работает дозвон из одного Asteriska в другой (IA

Сообщение koval »

2virus_net

Согласно первому логу я дзвоню на номер 2002
-- Executing [s@macro-exten-vm:3] Set("SIP/1056-00000032", "__EXTTOCALL=2002") in new stack

Согласно третьему логу 2002 зарегистрирован
2002/2002 192.168.17.39 D Yes Yes A 5060 OK (11 ms)

И спасибо за замечания. Поправлюсь.

Не работает дозвон (Service unavaible 503), когда клиент 2002 подключен с локальной сети.


Еще один интересный момент.
После установки Elastix били созданы пользователи 2001,2002,2003,2004. Потом был подключен транк. Потом обнаруживается проблема.

После был создан пользователь 2005. И вот что странно. С 2005 таких проблем не возникает. Он может быть зарегистрирован как в локалке, так и через интернет. Дозвон через транк отлично работает. Попробовал создать пользователя 2006. То же самое. Все работает отлично.

То есть. Проблема возникает с пользователями, которые созданы в системе до регистрации транка. А это пользователи 2001,2002,2003,2004.

Может Asterisk имеет какой то кеш с номерами пользователей и он его не обновил?
Vlad1983
Сообщения: 4251
Зарегистрирован: 09 авг 2011, 11:51

Re: Странно работает дозвон из одного Asteriska в другой (IA

Сообщение Vlad1983 »

согласно логу вы пытаетесь звонить на 2002 через SIP
-- Executing [s@macro-dial-one:43] Dial("SIP/1056-00000032", "SIP/2002,,trI") in new stack
[2016-01-23 22:37:51] WARNING[9840][C-00000484]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
ЛС: @rostel
koval
Сообщения: 11
Зарегистрирован: 03 янв 2016, 21:41

Re: Странно работает дозвон из одного Asteriska в другой (IA

Сообщение koval »

Всем большое спасибо за помощь.

Vlad1983 был прав. Проблема была в том, что несколько номеров присутствовали на двух серверах. Поэтому Asterisk 1 не искал номера на Asterisk 2, так как они были прописаны у него самого. После удаление все заработало.

Еще раз большое спасибо!

Тему можно закрывать.
Ответить
© 2008 — 2025 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH