IpLDK300-----E1-----AddPac-----SIP-----Asterisk-----IP-телефон
На LG 2ХХ номера на Asterisk 1ХХ номера
sip.conf
Код: Выделить всё
[general]
context=default
allowguest=no
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
language=ru
callevents=yes
[addpac]
type=peer
defaultuser=addpac
password=123321
host=192.168.1.1
context=potok
insecure=invite,port
disallow=all
allow=ulaw
allow=alaw
canreinvite=no
qualify=yes
[office]
type=peer
host=dynamic
canreinvite=no
context=telephone
callcounter=yes
secret=2332
disallow=all
allow=ulaw
allow=alaw
allow=g729
qualify=yes
[100](office)
[101](office)
[102](office)
[103](office)
[104](office)
[105](office)
[106](office)
[107](office)
[108](office)
[109](office)
Код: Выделить всё
[globals]
[potok]
include => telephone
[telephone]
exten => _2XX,1,Dial(SIP/addpac/${EXTEN})
exten => 111,1,Playback(demo-echotest)
same => n,Wait(1)
same => n,Echo()
same => n,Playback(demo-echodone)
same => n,Hangup
exten => _1XX,1,Dial(SIP/${EXTEN},90,t)
exten => _1XX,hint,SIP/${EXTEN}
При звонке с LG-телефона на ip-телефон голоса нет в обе стороны, но при этом если звонить с LG на номер 111 (эхо тест), я слышу говорилку и себя.
Согласно sip debug промахулся в НАТе между телефоном и Asterisk.
Но где именно не могу поймать.
sip debug
Код: Выделить всё
<------------>
-- Executing [101@potok:1] Dial("SIP/addpac-0000002c", "SIP/101,90,t") in new stack
== Using SIP RTP CoS mark 5
Audio is at 18778
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 192.168.9.101:5060:
INVITE sip:101@192.168.9.101:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK016bf1f2;rport
Max-Forwards: 70
From: "201" <sip:201@192.168.5.254>;tag=as7083d61b
To: <sip:101@192.168.9.101:5060>
Contact: <sip:201@192.168.5.254:5060>
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.22.0
Date: Mon, 03 Jun 2013 10:44:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 261
v=0
o=root 1612875315 1612875315 IN IP4 192.168.5.254
s=Asterisk PBX 1.8.22.0
c=IN IP4 192.168.5.254
t=0 0
m=audio 18778 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
---
-- Called SIP/101
<--- SIP read from UDP:192.168.9.101:5060 --->
SIP/2.0 100 Trying
To: <sip:101@192.168.9.101:5060>
From: "201" <sip:201@192.168.5.254>;tag=as7083d61b
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK016bf1f2
Server: Linksys/SPA921-5.1.8
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:192.168.9.101:5060 --->
SIP/2.0 180 Ringing
To: <sip:101@192.168.9.101:5060>;tag=c4387c58bd4708c3i0
From: "201" <sip:201@192.168.5.254>;tag=as7083d61b
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK016bf1f2
Server: Linksys/SPA921-5.1.8
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
list_route: no route
-- SIP/101-0000002d is ringing
<--- Transmitting (NAT) to 192.168.1.1:51045 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK3C68F8;received=192.168.1.1;rport=51045
From: <sip:201@192.168.1.1>;tag=37D2B51C-570
To: <sip:101@192.168.5.254>;tag=as671bc917
Call-ID: 4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1
CSeq: 101 INVITE
Server: Asterisk PBX 1.8.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:101@192.168.5.254:5060>
Content-Length: 0
<------------>
<--- SIP read from UDP:192.168.9.101:5060 --->
SIP/2.0 200 OK
To: <sip:101@192.168.9.101:5060>;tag=c4387c58bd4708c3i0
From: "201" <sip:201@192.168.5.254>;tag=as7083d61b
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 102 INVITE
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK016bf1f2
Contact: "Test-SPB" <sip:101@192.168.9.101:5060>
Server: Linksys/SPA921-5.1.8
Content-Length: 208
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
v=0
o=- 255676 255676 IN IP4 192.168.9.101
s=-
c=IN IP4 192.168.9.101
t=0 0
m=audio 16386 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
<------------->
--- (12 headers 11 lines) ---
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x4 (ulaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.9.101:16386
list_route: hop: <sip:101@192.168.9.101:5060>
set_destination: Parsing <sip:101@192.168.9.101:5060> for address/port to send to
set_destination: set destination to 192.168.9.101:5060
Transmitting (NAT) to 192.168.9.101:5060:
ACK sip:101@192.168.9.101:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK4dba2e97;rport
Max-Forwards: 70
From: "201" <sip:201@192.168.5.254>;tag=as7083d61b
To: <sip:101@192.168.9.101:5060>;tag=c4387c58bd4708c3i0
Contact: <sip:201@192.168.5.254:5060>
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.22.0
Content-Length: 0
---
-- SIP/101-0000002d answered SIP/addpac-0000002c
Audio is at 19558
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (NAT) to 192.168.1.1:51045 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK3C68F8;received=192.168.1.1;rport=51045
From: <sip:201@192.168.1.1>;tag=37D2B51C-570
To: <sip:101@192.168.5.254>;tag=as671bc917
Call-ID: 4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1
CSeq: 101 INVITE
Server: Asterisk PBX 1.8.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:101@192.168.5.254:5060>
Content-Type: application/sdp
Content-Length: 237
v=0
o=root 1756453186 1756453186 IN IP4 192.168.5.254
s=Asterisk PBX 1.8.22.0
c=IN IP4 192.168.5.254
t=0 0
m=audio 19558 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------>
<--- SIP read from UDP:192.168.1.1:51045 --->
ACK sip:101@192.168.5.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK3C7204F
From: <sip:201@192.168.1.1>;tag=37D2B51C-570
To: <sip:101@192.168.5.254>;tag=as671bc917
Date: Mon, 03 Jun 2013 10:43:40 GMT
Call-ID: 4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1
Max-Forwards: 70
CSeq: 101 ACK
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
<--- SIP read from UDP:192.168.9.101:5060 --->
BYE sip:201@192.168.5.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.101:5060;branch=z9hG4bK-74fce758
From: <sip:101@192.168.9.101:5060>;tag=c4387c58bd4708c3i0
To: "201" <sip:201@192.168.5.254>;tag=as7083d61b
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 101 BYE
Max-Forwards: 70
User-Agent: Linksys/SPA921-5.1.8
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Sending to 192.168.9.101:5060 (NAT)
Scheduling destruction of SIP dialog '383f302027f6aed5281b98e70b244c76@192.168.5.254:5060' in 6400 ms (Method: BYE)
<--- Transmitting (NAT) to 192.168.9.101:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.101:5060;branch=z9hG4bK-74fce758;received=192.168.9.101;rport=5060
From: <sip:101@192.168.9.101:5060>;tag=c4387c58bd4708c3i0
To: "201" <sip:201@192.168.5.254>;tag=as7083d61b
Call-ID: 383f302027f6aed5281b98e70b244c76@192.168.5.254:5060
CSeq: 101 BYE
Server: Asterisk PBX 1.8.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
== Spawn extension (potok, 101, 1) exited non-zero on 'SIP/addpac-0000002c'
Scheduling destruction of SIP dialog '4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1' in 6400 ms (Method: ACK)
set_destination: Parsing <sip:201@192.168.1.1:5060> for address/port to send to
set_destination: set destination to 192.168.1.1:5060
Reliably Transmitting (NAT) to 192.168.1.1:51045:
BYE sip:201@192.168.1.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK17d213e1;rport
Max-Forwards: 70
From: <sip:101@192.168.5.254>;tag=as671bc917
To: <sip:201@192.168.1.1>;tag=37D2B51C-570
Call-ID: 4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.8.22.0
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
---
<--- SIP read from UDP:192.168.1.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.254:5060;branch=z9hG4bK17d213e1;rport
From: <sip:101@192.168.5.254>;tag=as671bc917
To: <sip:201@192.168.1.1>;tag=37D2B51C-570
Date: Mon, 03 Jun 2013 10:43:45 GMT
Call-ID: 4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1
Server: Cisco-SIPGateway/IOS-12.x
Content-Length: 0
CSeq: 102 BYE
<------------->
--- (9 headers 0 lines) ---
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog '4988AA7C-CB7111E2-97F7E10E-7B6264BA@192.168.1.1' Method: ACK
192.168.1.1 - addpac (стоит рядом с LG)
192.168.5.254 - asterisk (находится в другом офисе, офис связан с моим по ipsec)
192.168.9.101 - IP телефон (находится в моём офисе)
В тунелях НАТа нет, маршрутизация рабочая всё пинается при проверке tracerом всё идёт по одним маршрутам.
Причём если IP-телефон поставить в другом офисе, чтобы он был в этой же подсети, что и Asterisk (там-то уж точно ни какого НАТа нет), то ситуация не меняется. Нет голоса в обе стороны, при звонке с LG на IP-телефон