Здравствуйте.
Вопрос конечно из стадии ламерских, но что-то не могу побороть. Не пойму в чем проблема. Стоит Asterisk c одним интерфейсом и белым ip. К нему цепляюсь клиентом с белым ip - работает все хорошо, если клиент за Nat (ADSL-modem), то идет тишина. Если смотреть rtp debug , то почему rtp трафик идет на локальный ip?
Где что надо подкрутить, посоветуйте.
sip.conf :
[general]
context = default
nat=no
externip = 72.54.92.112
qualify=yes
canreinvite=no
disallow = all
allow = alaw
allow = ulaw
[201]
fullname=201
username=201
secret=password
canreinvite=NO
context=con-out
dtmfmode=RFC2833
host=dynamic
nat=YES
qualify=yes
type=friend
disallow=all
allow=ulaw
allow=alaw
Вот sip debug:
mysrv*CLI> sip set debug on
SIP Debugging enabled
mysrv*CLI>
<--- SIP read from UDP:72.54.92.192:52862 --->
REGISTER sip:72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-731e6675ee32f27b-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>
To: "201"<sip:201@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 10.50.7.158 : 52862 (no NAT)
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-731e6675ee32f27b-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
To: "201"<sip:201@72.54.92.112>;tag=as2a60dece
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 1 REGISTER
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4eg3df5a"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:72.54.92.192:52862 --->
REGISTER sip:72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-a711181e0e4a7417-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>
To: "201"<sip:201@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="4eg3df5a",uri="sip:72.54.92.112",response="b6da894210dc4ec179ce5854804c1c51",algorithm=MD5
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 72.54.92.192 : 52862 (NAT)
-- Registered SIP '201' at 72.54.92.192 port 52862
Reliably Transmitting (NAT) to 72.54.92.192:52862:
OPTIONS sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b SIP/2.0
Via: SIP/2.0/UDP 72.54.92.112:5060;branch=z9hG4bK55ab6048;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@72.54.92.112>;tag=as328c3033
To: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>
Contact: <sip:asterisk@72.54.92.112>
Call-ID: 3f337c4729ef507965ea5ab313aec535@72.54.92.112
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.16.1
Date: Thu, 03 Mar 2011 09:16:07 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
> Saved useragent "eyeBeam release 1102q stamp 51814" for peer 201
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-a711181e0e4a7417-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
To: "201"<sip:201@72.54.92.112>;tag=as2a60dece
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 2 REGISTER
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Expires: 3600
Contact: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>;expires=3600
Date: Thu, 03 Mar 2011 09:16:07 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 72.54.92.112:5060;branch=z9hG4bK55ab6048;rport=5060
Contact: <sip:10.50.7.158:52862>
To: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>;tag=792e597d
From: "asterisk"<sip:asterisk@72.54.92.112>;tag=as328c3033
Call-ID: 3f337c4729ef507965ea5ab313aec535@72.54.92.112
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
[Mar 3 12:16:07] NOTICE[15382]: chan_sip.c:18479 handle_response_peerpoke: Peer '201' is now Reachable. (3ms / 2000ms)
Really destroying SIP dialog '3f337c4729ef507965ea5ab313aec535@72.54.92.112' Method: OPTIONS
<--- SIP read from UDP:72.54.92.192:52862 --->
REGISTER sip:72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-dc6c7f22de1bfd0b-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>;expires=0
To: "201"<sip:201@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 3 REGISTER
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="4eg3df5a",uri="sip:72.54.92.112",response="b6da894210dc4ec179ce5854804c1c51",algorithm=MD5
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 72.54.92.192 : 52862 (NAT)
[Mar 3 12:16:07] NOTICE[15382]: chan_sip.c:12913 check_auth: Correct auth, but based on stale nonce received from '"201"<sip:201@72.54.92.112>;tag=2e12fd33'
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-dc6c7f22de1bfd0b-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
To: "201"<sip:201@72.54.92.112>;tag=as2a60dece
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 3 REGISTER
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5677a0b2", stale=true
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:72.54.92.192:52862 --->
REGISTER sip:72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-ac6b6c3b56634759-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@10.50.7.158:52862;rinstance=3948b2aaa5b09c1b>;expires=0
To: "201"<sip:201@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 4 REGISTER
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="5677a0b2",uri="sip:72.54.92.112",response="fe6f63d8b301f1a2456f6f3e9827a9e4",algorithm=MD5
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 72.54.92.192 : 52862 (NAT)
-- Unregistered SIP '201'
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-ac6b6c3b56634759-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
To: "201"<sip:201@72.54.92.112>;tag=as2a60dece
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 4 REGISTER
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Expires: 0
Date: Thu, 03 Mar 2011 09:16:07 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:72.54.92.192:52862 --->
REGISTER sip:72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b9226647fa4dad59-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@72.54.92.192:52862;rinstance=c9d0721862a6451a>
To: "201"<sip:201@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 5 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="5677a0b2",uri="sip:72.54.92.112",response="fe6f63d8b301f1a2456f6f3e9827a9e4",algorithm=MD5
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 72.54.92.192 : 52862 (NAT)
[Mar 3 12:16:07] NOTICE[15382]: chan_sip.c:12913 check_auth: Correct auth, but based on stale nonce received from '"201"<sip:201@72.54.92.112>;tag=2e12fd33'
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b9226647fa4dad59-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
To: "201"<sip:201@72.54.92.112>;tag=as2a60dece
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 5 REGISTER
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="406310f1", stale=true
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:72.54.92.192:52862 --->
REGISTER sip:72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-8e09142ab77c0d3f-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@72.54.92.192:52862;rinstance=c9d0721862a6451a>
To: "201"<sip:201@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 6 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="406310f1",uri="sip:72.54.92.112",response="b358ec678855a8541549977c84b6ada5",algorithm=MD5
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 72.54.92.192 : 52862 (NAT)
-- Registered SIP '201' at 72.54.92.192 port 52862
Reliably Transmitting (NAT) to 72.54.92.192:52862:
OPTIONS sip:201@72.54.92.192:52862;rinstance=c9d0721862a6451a SIP/2.0
Via: SIP/2.0/UDP 72.54.92.112:5060;branch=z9hG4bK7e4a3b5d;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@72.54.92.112>;tag=as572b685e
To: <sip:201@72.54.92.192:52862;rinstance=c9d0721862a6451a>
Contact: <sip:asterisk@72.54.92.112>
Call-ID: 1a23c34c2094d79165618c080b8360e2@72.54.92.112
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.16.1
Date: Thu, 03 Mar 2011 09:16:07 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
> Saved useragent "eyeBeam release 1102q stamp 51814" for peer 201
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-8e09142ab77c0d3f-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=2e12fd33
To: "201"<sip:201@72.54.92.112>;tag=as2a60dece
Call-ID: MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.
CSeq: 6 REGISTER
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Expires: 3600
Contact: <sip:201@72.54.92.192:52862;rinstance=c9d0721862a6451a>;expires=3600
Date: Thu, 03 Mar 2011 09:16:07 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'MjNhYzFhYTg5ODk2MDY3YWY3ZDM3OTM5ZDNhNTdjNmY.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 72.54.92.112:5060;branch=z9hG4bK7e4a3b5d;rport=5060
Contact: <sip:10.50.7.158:52862>
To: <sip:201@72.54.92.192:52862;rinstance=c9d0721862a6451a>;tag=c96e7939
From: "asterisk"<sip:asterisk@72.54.92.112>;tag=as572b685e
Call-ID: 1a23c34c2094d79165618c080b8360e2@72.54.92.112
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1102q stamp 51814
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
[Mar 3 12:16:07] NOTICE[15382]: chan_sip.c:18479 handle_response_peerpoke: Peer '201' is now Reachable. (4ms / 2000ms)
Really destroying SIP dialog '1a23c34c2094d79165618c080b8360e2@72.54.92.112' Method: OPTIONS
mysrv*CLI>
mysrv*CLI>
mysrv*CLI>
<--- SIP read from UDP:72.54.92.192:52862 --->
INVITE sip:*11@72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b847141add1e5314-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@72.54.92.192:52862>
To: "*11"<sip:*11@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=6a474053
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: eyeBeam release 1102q stamp 51814
Content-Length: 436
v=0
o=- 2 2 IN IP4 10.50.7.158
s=CounterPath eyeBeam 1.5
c=IN IP4 10.50.7.158
t=0 0
m=audio 36594 RTP/AVP 0 8 101
a=alt:1 5 : BzY5gPi6 3KKaISW1 10.50.7.158 36594
a=alt:2 4 : gmNsAe6r V4An9/fI 172.18.250.238 36594
a=alt:3 3 : ebUq0P7T +hGuF9af 169.254.86.5 36594
a=alt:4 2 : mL1oZlPz GbDUbADT 192.168.172.1 36594
a=alt:5 1 : xcXpazLV uhj4qe4f 192.168.85.1 36594
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
<------------->
--- (12 headers 14 lines) ---
== Using SIP RTP CoS mark 5
Sending to 10.50.7.158 : 52862 (no NAT)
Using INVITE request as basis request - YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
Found peer '201' for '201' from 72.54.92.192:52862
<--- Reliably Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b847141add1e5314-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=6a474053
To: "*11"<sip:*11@72.54.92.112>;tag=as68e1bb55
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="601c0537"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.' in 6400 ms (Method: INVITE)
<--- SIP read from UDP:72.54.92.192:52862 --->
ACK sip:*11@72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b847141add1e5314-1---d8754z-;rport
To: "*11"<sip:*11@72.54.92.112>;tag=as68e1bb55
From: "201"<sip:201@72.54.92.112>;tag=6a474053
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 1 ACK
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
<--- SIP read from UDP:72.54.92.192:52862 --->
INVITE sip:*11@72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b542f31c2106f139-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@72.54.92.192:52862>
To: "*11"<sip:*11@72.54.92.112>
From: "201"<sip:201@72.54.92.112>;tag=6a474053
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="601c0537",uri="sip:*11@72.54.92.112",response="f8de0ad1f77dd3281c516235e81f11f8",algorithm=MD5
Content-Length: 436
v=0
o=- 2 2 IN IP4 10.50.7.158
s=CounterPath eyeBeam 1.5
c=IN IP4 10.50.7.158
t=0 0
m=audio 36594 RTP/AVP 0 8 101
a=alt:1 5 : BzY5gPi6 3KKaISW1 10.50.7.158 36594
a=alt:2 4 : gmNsAe6r V4An9/fI 172.18.250.238 36594
a=alt:3 3 : ebUq0P7T +hGuF9af 169.254.86.5 36594
a=alt:4 2 : mL1oZlPz GbDUbADT 192.168.172.1 36594
a=alt:5 1 : xcXpazLV uhj4qe4f 192.168.85.1 36594
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
<------------->
--- (13 headers 14 lines) ---
Sending to 72.54.92.192 : 52862 (NAT)
Using INVITE request as basis request - YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
Found peer '201' for '201' from 72.54.92.192:52862
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 10.50.7.158:36594
Looking for *11 in taxi-vip-out (domain 72.54.92.112)
list_route: hop: <sip:201@72.54.92.192:52862>
<--- Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b542f31c2106f139-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=6a474053
To: "*11"<sip:*11@72.54.92.112>
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:*11@72.54.92.112>
Content-Length: 0
<------------>
-- Executing [*11@taxi-vip-out:1] Answer("SIP/201-00000000", "") in new stack
Audio is at 72.54.92.112 port 17408
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (NAT) to 72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-b542f31c2106f139-1---d8754z-;received=72.54.92.192;rport=52862
From: "201"<sip:201@72.54.92.112>;tag=6a474053
To: "*11"<sip:*11@72.54.92.112>;tag=as218b8a47
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.16.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:*11@72.54.92.112>
Content-Type: application/sdp
Content-Length: 296
v=0
o=root 1818027501 1818027501 IN IP4 72.54.92.112
s=Asterisk PBX 1.6.2.16.1
c=IN IP4 72.54.92.112
t=0 0
m=audio 17408 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------>
<--- SIP read from UDP:72.54.92.192:52862 --->
ACK sip:*11@72.54.92.112 SIP/2.0
Via: SIP/2.0/UDP 10.50.7.158:52862;branch=z9hG4bK-d8754z-a4455d54e3796153-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:201@72.54.92.192:52862>
To: "*11"<sip:*11@72.54.92.112>;tag=as218b8a47
From: "201"<sip:201@72.54.92.112>;tag=6a474053
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 2 ACK
User-Agent: eyeBeam release 1102q stamp 51814
Authorization: Digest username="201",realm="asterisk",nonce="601c0537",uri="sip:*11@72.54.92.112",response="f8de0ad1f77dd3281c516235e81f11f8",algorithm=MD5
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
-- Executing [*11@taxi-vip-out:2] Playback("SIP/201-00000000", "tt-weasels") in new stack
-- <SIP/201-00000000> Playing 'tt-weasels.gsm' (language 'en')
-- Executing [*11@taxi-vip-out:3] Hangup("SIP/201-00000000", "") in new stack
== Spawn extension (taxi-vip-out, *11, 3) exited non-zero on 'SIP/201-00000000'
Scheduling destruction of SIP dialog 'YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.' in 6400 ms (Method: ACK)
set_destination: Parsing <sip:201@72.54.92.192:52862> for address/port to send to
set_destination: set destination to 72.54.92.192, port 52862
Reliably Transmitting (NAT) to 72.54.92.192:52862:
BYE sip:201@72.54.92.192:52862 SIP/2.0
Via: SIP/2.0/UDP 72.54.92.112:5060;branch=z9hG4bK7be22605;rport
Max-Forwards: 70
From: "*11"<sip:*11@72.54.92.112>;tag=as218b8a47
To: "201"<sip:201@72.54.92.112>;tag=6a474053
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.6.2.16.1
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
---
<--- SIP read from UDP:72.54.92.192:52862 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 72.54.92.112:5060;branch=z9hG4bK7be22605;rport=5060
Contact: <sip:201@72.54.92.192:52862>
To: "201"<sip:201@72.54.92.112>;tag=6a474053
From: "*11"<sip:*11@72.54.92.112>;tag=as218b8a47
Call-ID: YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.
CSeq: 102 BYE
User-Agent: eyeBeam release 1102q stamp 51814
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog 'YzYwYjJmZjcwYmM1ZjkyOGM1YzA1NDc5MGM1ODcwZTI.' Method: ACK
mysrv*CLI> sip set debug off
SIP Debugging Disabled
mysrv*CLI>
rtp debug :
Sent RTP packet to 10.50.7.158:25218 (type 00, seq 001410, ts 000320, len 000160)
у астера только 1 интерфейс и 1 внешний ip, никаких дугих подсетей нету. Пробовал прописать localnet = 72.54.92.0/255.255.255.0 - не помогает.
Пропишив sip.conf
[general]
nat=yes
externip = всешний ip_шлюза астера
localnet = подсеть астера (192.168.0.0/255.255.255.0)
на клиенте надо выставить, что он пойдет через NAT
Вот сейчас поэкспериментирвал и полностью запутался. Дома попробовал взять adsl-модем, по умолчаню выставил все настройки, включил Nat и с сервером все благополучно работает, голос ходит. В другом же месте adsl-можем с этим сервром работать отказвается. Мог бы подумать что как-то по особому надо настраивать модем, но с другим сервером (права он сам за натом находится) соединяется и гоняет голос без проблем. Вот такая ситуэйшн.
на роутере ОТКЛЮЧИТЕ sip-detection. ну он может по разному называться в зависимости от марки. но смысл в том, что у 90% роутеров он если естьработает неверно. может называть както типо помощь-в-нат-протоколах, да вообще как угодно. вобщем выключайте все абривиатуры которые не гугляться во вкладке с нат ;)
Провайдер может закрывать порты.... У меня с одним клиентом так было. Настраиваю, телефон подключается, звонит, а голоса нет. В результате выснилось, что провайдер в этом удалённом мелком городишке порты только основные пооткрывал, а всё, что не знает их убогий админ закрыто. И на мои вопросы "какое вы имеете право?" отвечал, что "такая политика компании" мля.... Вобщем не повезло моему клиенту... Есть идея запустить РТП по 80 порту у него, но времени всё нет этим занятся...
т.е. это клиент сидит в серой сетке с другим NAT-ом, а сам астер - на белом ip. Тогда все настройки nat=yes и externip идут лесом. Важен пожалуй лишь domain=
Тут реально firewall надо ковырять того роутика ADSL. Еще может стоит правильно настроить STUN и NAT у этого Бима-черного уха :) (CounterPath eyeBeam 1.5). Реально если клиент регистрируется, он открывает динамические порты от NAT наружу обычно. Судя по логу, клиент и не вкуривает что Астеру надо сказать о переодевалке на роутике.
Задан: 2011-03-03 12:38:33 +0400
Просмотрен: 13,879 раз
Обновлен: Mar 04 '11
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.