Код: Выделить всё
MSK-SOK-ASTER-01*CLI> iax2 show registry
Host dnsmgr Username Perceived Refresh State
10.101.10.252:4569 N sokol 10.101.10.251:4569 60 Registered
1 IAX2 registrations.
Код: Выделить всё
MSK-SEM-ASTER-01*CLI> iax2 show registry
Host dnsmgr Username Perceived Refresh State
10.101.10.251:4569 N semen 10.101.10.252:4569 60 Registered
1 IAX2 registrations.
Код: Выделить всё
[general]
autokill=5000
register => sokol:123456@10.101.10.252
[semen]
type=friend
host=dynamic
trunk=yes
secret=123456
context=incoming_semen
deny=0.0.0.0/0.0.0.0
permit=10.101.10.252/255.255.255.255
[49999]
context=phones
type=friend
username=49999
secret=123456
host=dynamic
nat=yes
Код: Выделить всё
[globals]
[general]
priorityjumping=yes
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=yes
[default]
[incoming_calls]
[phones]
include => internal
include => remote
[internal]
exten => _4XXXX,1,NoOp()
exten => _4XXXX,n,Dial(SIP/${EXTEN},30)
exten => _4XXXX,n,Playback(the-party-you-are-calling&is-curntly-unavail)
exten => _4XXXX,n,Hangup()
[remote]
exten => _5XXXX,1,NoOp()
exten => _5XXXX,n,Dial(IAX2/semen/${EXTEN})
exten => _5XXXX,n,Hangup()
[incoming_semen]
include => internal
Код: Выделить всё
[general]
autokill=5000
register => semen:123456@10.101.10.251
[sokol]
type=friend
host=dynamic
trunk=yes
secret=123456
context=incoming_sokol
deny=0.0.0.0/0.0.0.0
permit=10.101.10.251/255.255.255.255
[59999]
context=phones
type=friend
username=59999
secret=123456
host=dynamic
nat=yes
Код: Выделить всё
[globals]
[general]
priorityjumping=yes
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=yes
[default]
[incoming_calls]
[phones]
include => internal
include => remote
[internal]
exten => _5XXXX,1,NoOp()
exten => _5XXXX,n,Dial(SIP/${EXTEN},30)
exten => _5XXXX,n,Playback(the-party-you-are-calling&is-curntly-unavail)
exten => _5XXXX,n,Hangup()
[remote]
exten => _4XXXX,1,NoOp()
exten => _4XXXX,n,Dial(IAX2/sokol/${EXTEN})
exten => _4XXXX,n,Hangup()
[incoming_sokol]
include => internal
Код: Выделить всё
MSK-SOK-ASTER-01*CLI> iax2 show peers
Name/Username Host Mask Port Status Description
semen 10.101.10.252 (D) 255.255.255.255 4569 (T) Unmonitored
49999/49999 (null) (D) 255.255.255.255 0 Unmonitored
2 iax2 peers [0 online, 0 offline, 2 unmonitored]
Код: Выделить всё
MSK-SEM-ASTER-01*CLI> iax2 show peers
Name/Username Host Mask Port Status Description
59999/59999 (null) (D) 255.255.255.255 0 Unmonitored
sokol 10.101.10.251 (D) 255.255.255.255 4569 (T) Unmonitored
2 iax2 peers [0 online, 0 offline, 2 unmonitored]
Код: Выделить всё
[incoming_sokol]
include => internal
Простите за мою некомпетентность, в общем образ качал отсюда http://asterisk.org/downloads. Как я понял, это порезаный в хлам CentOS, с необходимыми модулями Астериска.starley440 писал(а):Если у тебя именно FreePBX с веб-мордой, то основные файлы трогать не стоит.
Надо править addition или custom_addition. Не знаю, с чем связано (ибо в основных conf практически ничего нет), но править их чревато.
И посмотри внимательно. Может тебе не нужна строка trunk=yes и ната нет?
У меня один раз было подобное, но решилось, когда вписал в конфиги серверов insecure
Эм, я так понимаю Вам нужно это?april22 писал(а):Это все хорошо , а выхлоп консоли то где ?!
что там вообще происходит ?! куда он звонит ?!
Код: Выделить всё
MSK-SOK-ASTER-01*CLI>
<--- SIP read from UDP:10.101.10.15:5060 --->
INVITE sip:50000@10.101.10.251 SIP/2.0
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;rport
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 INVITE
Contact: "Sergey Chenchikov" <sip:40000@10.101.10.15:5060>
Max-Forwards: 70
User-Agent: Grandstream GXP1405 1.0.3.30
Privacy: none
P-Preferred-Identity: "Sergey Chenchikov" <sip:40000@10.101.10.251>
Supported: replaces, path, timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 379
v=0
o=40000 8000 8000 IN IP4 10.101.10.15
s=SIP Call
c=IN IP4 10.101.10.15
t=0 0
m=audio 5004 RTP/AVP 18 8 4 9 97 2 101
a=sendrecv
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:9 G722/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (16 headers 18 lines) ---
Sending to 10.101.10.15:5060 (no NAT)
Sending to 10.101.10.15:5060 (no NAT)
Using INVITE request as basis request - 494005238-5060-35@BA.BAB.BA.BF
Found peer '40000' for '40000' from 10.101.10.15:5060
Found RTP audio format 18
Found RTP audio format 8
Found RTP audio format 4
Found RTP audio format 9
Found RTP audio format 97
Found RTP audio format 2
Found RTP audio format 101
Found audio description format G729 for ID 18
Found audio description format PCMA for ID 8
Found audio description format G723 for ID 4
Found audio description format G722 for ID 9
Found audio description format iLBC for ID 97
Found audio description format G726-32 for ID 2
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw), peer - audio=(g723|alaw|g726|g729|ilbc|g722)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.101.10.15:5004
Looking for 50000 in from-internal (domain 10.101.10.251)
list_route: hop: <sip:40000@10.101.10.15:5060>
<--- Transmitting (no NAT) to 10.101.10.15:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;received=10.101.10.15;rport=5060
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:50000@10.101.10.251:5060>
Content-Length: 0
<------------>
Audio is at 13746
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Transmitting (no NAT) to 10.101.10.15:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;received=10.101.10.15;rport=5060
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>;tag=as17c9a2c8
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:50000@10.101.10.251:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 237
v=0
o=root 1593559795 1593559795 IN IP4 10.101.10.251
s=Asterisk PBX 11.9.0
c=IN IP4 10.101.10.251
t=0 0
m=audio 13746 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------>
<--- SIP read from UDP:10.101.10.15:5060 --->
CANCEL sip:50000@10.101.10.251 SIP/2.0
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;rport
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 CANCEL
Max-Forwards: 70
User-Agent: Grandstream GXP1405 1.0.3.30
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Sending to 10.101.10.15:5060 (no NAT)
<--- Reliably Transmitting (no NAT) to 10.101.10.15:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;received=10.101.10.15;rport=5060
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>;tag=as17c9a2c8
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
<--- Transmitting (no NAT) to 10.101.10.15:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;received=10.101.10.15;rport=5060
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>;tag=as17c9a2c8
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 CANCEL
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
<--- SIP read from UDP:10.101.10.15:5060 --->
ACK sip:50000@10.101.10.251 SIP/2.0
Via: SIP/2.0/UDP 10.101.10.15:5060;branch=z9hG4bK1201722838;rport
From: "Sergey Chenchikov" <sip:40000@10.101.10.251>;tag=1507904733
To: <sip:50000@10.101.10.251>;tag=as17c9a2c8
Call-ID: 494005238-5060-35@BA.BAB.BA.BF
CSeq: 340 ACK
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '494005238-5060-35@BA.BAB.BA.BF' Method: ACK
Код: Выделить всё
<------------->
Reliably Transmitting (no NAT) to 10.101.10.25:5063:
OPTIONS sip:50000@10.101.10.25:5063 SIP/2.0
Via: SIP/2.0/UDP 10.101.10.252:5060;branch=z9hG4bK19881a4e
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.101.10.252>;tag=as4cb89ad3
To: <sip:50000@10.101.10.25:5063>
Contact: <sip:Unknown@10.101.10.252:5060>
Call-ID: 3400de917b8e850e36fd0f3345117c8d@10.101.10.252:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.11.0(11.9.0)
Date: Wed, 21 May 2014 13:54:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:10.101.10.25:5063 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.101.10.252:5060;branch=z9hG4bK19881a4e
From: "Unknown" <sip:Unknown@10.101.10.252>;tag=as4cb89ad3
To: <sip:50000@10.101.10.25:5063>;tag=678336553
Call-ID: 3400de917b8e850e36fd0f3345117c8d@10.101.10.252:5060
CSeq: 102 OPTIONS
User-Agent: Yealink SIP-T12P 5.60.14.4
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '3400de917b8e850e36fd0f3345117c8d@10.101.10.252:5060' Method: OPTIONS
Код: Выделить всё
Reliably Transmitting (no NAT) to 10.101.10.25:5063:
OPTIONS sip:50000@10.101.10.25:5063 SIP/2.0
Via: SIP/2.0/UDP 10.101.10.252:5060;branch=z9hG4bK6b7df0e8
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.101.10.252>;tag=as5f7deb9d
To: <sip:50000@10.101.10.25:5063>
Contact: <sip:Unknown@10.101.10.252:5060>
Call-ID: 2969cd8e23dfe0df0724e197351fb5b5@10.101.10.252:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.11.0(11.9.0)
Date: Wed, 21 May 2014 13:55:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:10.101.10.25:5063 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.101.10.252:5060;branch=z9hG4bK6b7df0e8
From: "Unknown" <sip:Unknown@10.101.10.252>;tag=as5f7deb9d
To: <sip:50000@10.101.10.25:5063>;tag=138544125
Call-ID: 2969cd8e23dfe0df0724e197351fb5b5@10.101.10.252:5060
CSeq: 102 OPTIONS
User-Agent: Yealink SIP-T12P 5.60.14.4
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '2969cd8e23dfe0df0724e197351fb5b5@10.101.10.252:5060' Method: OPTIONS
<--- Reliably Transmitting (no NAT) to 10.101.10.25:5063 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.101.10.25:5063;branch=z9hG4bK1595238395;received=10.101.10.25
From: <sip:50000@10.101.10.252>;tag=1599401414
To: <sip:40000@10.101.10.252>;tag=as3bf72332
Call-ID: 473865052@10.101.10.25
CSeq: 1 INVITE
Server: FPBX-2.11.0(11.9.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
[2014-05-21 17:55:28] WARNING[12841][C-00000005]: channel.c:4840 ast_prod: Prodding channel 'SIP/50000-00000005' failed
<--- SIP read from UDP:10.101.10.25:5063 --->
ACK sip:40000@10.101.10.252 SIP/2.0
Via: SIP/2.0/UDP 10.101.10.25:5063;branch=z9hG4bK1595238395
From: <sip:50000@10.101.10.252>;tag=1599401414
To: <sip:40000@10.101.10.252>;tag=as3bf72332
Call-ID: 473865052@10.101.10.25
CSeq: 1 ACK
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '473865052@10.101.10.25' Method: ACK
Код: Выделить всё
MSK-SOK-ASTER-01*CLI> sip reload
[2014-05-22 10:05:17] ERROR[1753]: phone_message.c:1645 build_dialplan_routing: Unable to build dialplan routing - invalid license
[2014-05-22 10:05:17] ERROR[1753]: phone_users.c:4051 process_message_config: accept_outofcall_message must be enabled in sip.conf for res_digium_phone to function properly
[2014-05-22 10:05:17] ERROR[1753]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("MSK-SOK-ASTER-01", "(null)", ...): Name or service not known
[2014-05-22 10:05:17] WARNING[1753]: acl.c:833 resolve_first: Unable to lookup 'MSK-SOK-ASTER-01'
Код: Выделить всё
MSK-SOK-ASTER-01*CLI> iax2 reload
[2014-05-22 10:06:50] WARNING[32518]: chan_iax2.c:3385 reload_firmware: Error opening firmware directory '/var/lib/asterisk/firmware/iax': No such file or directory
[2014-05-22 10:06:50] NOTICE[32518]: iax2-provision.c:558 iax_provision_reload: No IAX provisioning configuration found, IAX provisioning disabled.