нет, не это. нет, ты даже не новичОк, т.к.:zeone писал(а):Так как новичек не уверен что такое диал план думаю это:
Включай sip debug на 193.138.185.238 или запускай tcpdump, делай sip reload в консоли астера и смотри почему у тебя отсутствует регистрация.forum.asterisk.ru писал(а):Новичком считается только что прочитавший «Астериск - будущее телефонии»
http://asterisk.ru/knowledgebase/books
и пытающийся сделать большее
Код: Выделить всё
localhost*CLI> sip reload
Reloading SIP
== Parsing '/etc/asterisk/sip.conf': == Found
== Parsing '/etc/asterisk/sip_general_additional.conf': == Found
== Parsing '/etc/asterisk/sip_general_custom.conf': == Found
== Parsing '/etc/asterisk/sip_nat.conf': == Found
== Parsing '/etc/asterisk/sip_registrations_custom.conf': == Found
== Parsing '/etc/asterisk/sip_registrations.conf': == Found
== Parsing '/etc/asterisk/sip_custom.conf': == Found
== Parsing '/etc/asterisk/sip_additional.conf': == Found
== Parsing '/etc/asterisk/sip_custom_post.conf': == Found
== Parsing '/etc/asterisk/additional_a2billing_sip.conf': == Found
== Parsing '/etc/asterisk/users.conf': == Found
== Using SIP TOS bits 96
== Using SIP CoS mark 4
== Parsing '/etc/asterisk/sip_notify.conf': == Found
== Parsing '/etc/asterisk/sip_notify_custom.conf': == Found
== Parsing '/etc/asterisk/sip_notify_custom_elastix.conf': == Found
== Parsing '/etc/asterisk/sip_notify_additional.conf': == Found
Reliably Transmitting (NAT) to ИП_ПРОВАЙДЕРА:5060:
OPTIONS sip:ИП_ПРОВАЙДЕРА SIP/2.0
Via: SIP/2.0/UDP МОЙ_ИП:5060;branch=z9hG4bK73ec63ee;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@МОЙ_ИП>;tag=as0437d7e5
To: <sip:ИП_ПРОВАЙДЕРА>
Contact: <sip:Unknown@МОЙ_ИП:5060>
Call-ID: 5b36b92355c1bb387d92734f1a787247@МОЙ_ИП:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.20.0)
Date: Thu, 10 Oct 2013 12:11:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
---
Retransmitting #1 (NAT) to ИП_ПРОВАЙДЕРА:5060:
OPTIONS sip:ИП_ПРОВАЙДЕРА SIP/2.0
Via: SIP/2.0/UDP МОЙ_ИП:5060;branch=z9hG4bK73ec63ee;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@МОЙ_ИП>;tag=as0437d7e5
To: <sip:ИП_ПРОВАЙДЕРА>
Contact: <sip:Unknown@МОЙ_ИП:5060>
Call-ID: 5b36b92355c1bb387d92734f1a787247@МОЙ_ИП:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.20.0)
Date: Thu, 10 Oct 2013 12:11:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
---
Retransmitting #2 (NAT) to ИП_ПРОВАЙДЕРА:5060:
OPTIONS sip:ИП_ПРОВАЙДЕРА SIP/2.0
Via: SIP/2.0/UDP МОЙ_ИП:5060;branch=z9hG4bK73ec63ee;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@МОЙ_ИП>;tag=as0437d7e5
To: <sip:ИП_ПРОВАЙДЕРА>
Contact: <sip:Unknown@МОЙ_ИП:5060>
Call-ID: 5b36b92355c1bb387d92734f1a787247@МОЙ_ИП:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.20.0)
Date: Thu, 10 Oct 2013 12:11:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
---
Really destroying SIP dialog '5b36b92355c1bb387d92734f1a787247@МОЙ_ИП:5060' Method: OPTIONS
простите не хочу умничать но думаю идет по другому: внешний номер -> провайдер -> фаервол с пробросом порта через нат на сервер-> сервер -> внутренние номераawsswa писал(а):Вы за NAT
Провайдер не за NAT
Телефоны из локально сети не за NAT
Телефоны из интернет за NAT
Распечатать
Код: Выделить всё
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [9Мобильный@from-internal:1] Macro("SIP/300-0000001a", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/300-0000001a", "AMPUSER=300") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/300-0000001a", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/300-0000001a", "1?Set(REALCALLERIDNUM=300)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/300-0000001a", "AMPUSER=300") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/300-0000001a", "AMPUSERCIDNAME=Igor") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/300-0000001a", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/300-0000001a", "AMPUSERCID=300") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/300-0000001a", "CALLERID(all)="Igor" <300>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/300-0000001a", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/300-0000001a", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] Set("SIP/300-0000001a", "CALLERID(number)=300") in new stack
-- Executing [s@macro-user-callerid:20] Set("SIP/300-0000001a", "CALLERID(name)=Igor") in new stack
-- Executing [s@macro-user-callerid:21] NoOp("SIP/300-0000001a", "Using CallerID "Igor" <300>") in new stack
-- Executing [9Мобильный@from-internal:2] NoOp("SIP/300-0000001a", "Calling Out Route: 9_outside") in new stack
-- Executing [9Мобильный@from-internal:3] Set("SIP/300-0000001a", "MOHCLASS=default") in new stack
-- Executing [9Мобильный@from-internal:4] Set("SIP/300-0000001a", "_NODEST=") in new stack
-- Executing [9Мобильный@from-internal:5] Macro("SIP/300-0000001a", "record-enable,300,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/300-0000001a", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("SIP/300-0000001a", "0?MacroExit()") in new stack
-- Executing [s@macro-record-enable:5] GotoIf("SIP/300-0000001a", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
-- Executing [s@macro-record-enable:15] GotoIf("SIP/300-0000001a", "0?IN") in new stack
-- Executing [s@macro-record-enable:16] ExecIf("SIP/300-0000001a", "1?MacroExit()") in new stack
-- Executing [9Мобильный@from-internal:6] Macro("SIP/300-0000001a", "dialout-trunk,2,Мобильный,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/300-0000001a", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/300-0000001a", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/300-0000001a", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/300-0000001a", "DIAL_NUMBER=Мобильный") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/300-0000001a", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/300-0000001a", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/300-0000001a", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/300-0000001a", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/300-0000001a", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/300-0000001a", "outbound-callerid,2") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/300-0000001a", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/300-0000001a", "0?Set(REALCALLERIDNUM=300)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/300-0000001a", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/300-0000001a", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/300-0000001a", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/300-0000001a", "TRUNKOUTCID=Номер_выданый_провайдером") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/300-0000001a", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/300-0000001a", "1?Set(CALLERID(all)=Номер_выданый_провайдером)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/300-0000001a", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/300-0000001a", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/300-0000001a", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/300-0000001a", "0?sub-flp-2,s,1") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/300-0000001a", "OUTNUM=Мобильный") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/300-0000001a", "custom=SIP/Номер_выданый_провайдером") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/300-0000001a", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/300-0000001a", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/300-0000001a", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/300-0000001a", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/300-0000001a", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/300-0000001a", "SIP/Номер_выданый_провайдером/Мобильный,300,") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Audio is at 11550
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to ИП_ПРОВАЙДЕРА:5060:
INVITE sip:Мобильный@ИП_ПРОВАЙДЕРА:5060 SIP/2.0
Via: SIP/2.0/UDP МОЙ_ИП:5060;branch=z9hG4bK71689ab5;rport
Max-Forwards: 70
From: "Номер_выданый_провайдером" <sip:Номер_выданый_провайдером@ИП_ПРОВАЙДЕРА>;tag=as3575d5f4
To: <sip:Мобильный@ИП_ПРОВАЙДЕРА:5060>
Contact: <sip:Номер_выданый_провайдером@МОЙ_ИП:5060>
Call-ID: 0c7d3618399bbe487f78dbf06eb4f30b@ИП_ПРОВАЙДЕРА
CSeq: 102 INVITE
User-Agent: FPBX-2.8.1(1.8.20.0)
Date: Fri, 11 Oct 2013 09:51:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 282
v=0
o=root 1099004676 1099004676 IN IP4 МОЙ_ИП
s=Asterisk PBX 1.8.20.0
c=IN IP4 МОЙ_ИП
t=0 0
m=audio 11550 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
---
-- Called SIP/Номер_выданый_провайдером/Мобильный
<--- SIP read from UDP:ИП_ПРОВАЙДЕРА:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.2.107:5060;branch=z9hG4bK71689ab5;received=192.168.2.107;rport=5060
From: "Номер_выданый_провайдером" <sip:Номер_выданый_провайдером@ИП_ПРОВАЙДЕРА>;tag=as3575d5f4
To: <sip:Мобильный@ИП_ПРОВАЙДЕРА:5060>;tag=as77bf026f
Call-ID: 0c7d3618399bbe487f78dbf06eb4f30b@ИП_ПРОВАЙДЕРА
CSeq: 102 INVITE
Server: FPBX-2.11.0(10.12.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
Transmitting (NAT) to ИП_ПРОВАЙДЕРА:5060:
ACK sip:Мобильный@ИП_ПРОВАЙДЕРА:5060 SIP/2.0
Via: SIP/2.0/UDP МОЙ_ИП:5060;branch=z9hG4bK71689ab5;rport
Max-Forwards: 70
From: "Номер_выданый_провайдером" <sip:Номер_выданый_провайдером@ИП_ПРОВАЙДЕРА>;tag=as3575d5f4
To: <sip:Мобильный@ИП_ПРОВАЙДЕРА:5060>;tag=as77bf026f
Contact: <sip:Номер_выданый_провайдером@МОЙ_ИП:5060>
Call-ID: 0c7d3618399bbe487f78dbf06eb4f30b@ИП_ПРОВАЙДЕРА
CSeq: 102 ACK
User-Agent: FPBX-2.8.1(1.8.20.0)
Content-Length: 0
---
Scheduling destruction of SIP dialog '0c7d3618399bbe487f78dbf06eb4f30b@ИП_ПРОВАЙДЕРА' in 6400 ms (Method: INVITE)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s@macro-dialout-trunk:20] NoOp("SIP/300-0000001a", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack
-- Executing [s@macro-dialout-trunk:21] Goto("SIP/300-0000001a", "s-CHANUNAVAIL,1") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
-- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/300-0000001a", "RC=21") in new stack
-- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/300-0000001a", "21,1") in new stack
-- Goto (macro-dialout-trunk,21,1)
-- Executing [21@macro-dialout-trunk:1] Goto("SIP/300-0000001a", "continue,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/300-0000001a", "1?noreport") in new stack
-- Goto (macro-dialout-trunk,continue,3)
-- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/300-0000001a", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks") in new stack
-- Executing [continue@macro-dialout-trunk:4] Set("SIP/300-0000001a", "CALLERID(number)=300") in new stack
-- Executing [9Мобильный@from-internal:7] Macro("SIP/300-0000001a", "outisbusy,") in new stack
-- Executing [s@macro-outisbusy:1] Progress("SIP/300-0000001a", "") in new stack
-- Executing [s@macro-outisbusy:2] GotoIf("SIP/300-0000001a", "0?emergency,1") in new stack
-- Executing [s@macro-outisbusy:3] GotoIf("SIP/300-0000001a", "0?intracompany,1") in new stack
-- Executing [s@macro-outisbusy:4] Playback("SIP/300-0000001a", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
-- <SIP/300-0000001a> Playing 'all-circuits-busy-now.gsm' (language 'en')
-- <SIP/300-0000001a> Playing 'pls-try-call-later.gsm' (language 'en')
-- Executing [s@macro-outisbusy:5] Congestion("SIP/300-0000001a", "20") in new stack
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'SIP/300-0000001a' in macro 'outisbusy'
== Spawn extension (from-internal, 9Мобильный, 7) exited non-zero on 'SIP/300-0000001a'
-- Executing [h@from-internal:1] Macro("SIP/300-0000001a", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/300-0000001a", "1?endmixmoncheck") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] NoOp("SIP/300-0000001a", "End of MIXMON check") in new stack
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/300-0000001a", "1?nomeetmemon") in new stack
-- Goto (macro-hangupcall,s,28)
-- Executing [s@macro-hangupcall:28] NoOp("SIP/300-0000001a", "End of MEETME check") in new stack
-- Executing [s@macro-hangupcall:29] GotoIf("SIP/300-0000001a", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,34)
-- Executing [s@macro-hangupcall:34] NoOp("SIP/300-0000001a", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:35] GotoIf("SIP/300-0000001a", "1?noautomon2") in new stack
-- Goto (macro-hangupcall,s,41)
-- Executing [s@macro-hangupcall:41] NoOp("SIP/300-0000001a", "MONITOR_FILENAME=") in new stack
-- Executing [s@macro-hangupcall:42] GotoIf("SIP/300-0000001a", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,45)
-- Executing [s@macro-hangupcall:45] GotoIf("SIP/300-0000001a", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,48)
-- Executing [s@macro-hangupcall:48] GotoIf("SIP/300-0000001a", "1?theend") in new stack
-- Goto (macro-hangupcall,s,50)
-- Executing [s@macro-hangupcall:50] AGI("SIP/300-0000001a", "hangup.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
-- <SIP/300-0000001a>AGI Script hangup.agi completed, returning 0
-- Executing [s@macro-hangupcall:51] Hangup("SIP/300-0000001a", "") in new stack
== Spawn extension (macro-hangupcall, s, 51) exited non-zero on 'SIP/300-0000001a' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/300-0000001a'
Really destroying SIP dialog '0c7d3618399bbe487f78dbf06eb4f30b@ИП_ПРОВАЙДЕРА' Method: INVITE
абсолютно корректна.Вы за NAT
Провайдер не за NAT
Телефоны из локально сети не за NAT
некорректна, в ней не совмсем понятно где интернет, а где локальная сеть. Лучше таквнешний номер -> провайдер -> фаервол с пробросом порта через нат на сервер-> сервер -> внутренние номера
Код: Выделить всё
Elastix*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
193.138.185.238:5060 N 3511977 30 No Authentication
1 SIP registrations.
host=ип_провайдера
port=5060
username=3_____7
secret=пароль
type=friend
qualify=yes
nat=yes
fromuser=3______7
fromdomain=ип_провайдера
allow=alaw&ulaw