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

Обрывается исходящий звонок

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

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

mishapolitaev
Сообщения: 22
Зарегистрирован: 31 янв 2016, 08:20

Обрывается исходящий звонок

Сообщение mishapolitaev »

Всем привет. Помогите советом, уже замучался возиться. Книгу читал "Asterisk будущее телефонии", гуглил.
Астериск и sip phone за NAT.

В Asterisk воткнут GSM модем для звонков на мобильные. Если через модем звоню с сипфона который в одной сети с астериском то всё окей, звонок не прерывается. Если звоню через тот же модем на тот же номер с другого сипфона, который за НАТом то звонок прерывается на ~6 СЕК.

Включил debug:
> sip set debug peer 109

Код: Выделить всё

<--- SIP read from UDP:105.88.61.10:63363 --->
INVITE sip:466@95.55.15.109:20160 SIP/2.0
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---c0a6b118d7cd0e2b;rport
Max-Forwards: 70
Contact: <sip:109@105.88.61.10;rinstance=2fcc5d63c3a097f8>
To: <sip:466@95.55.15.109:20160>
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.4 stamp 80103
Content-Length: 364

v=0
o=- 1462358437509784 1 IN IP4 105.88.61.10
s=X-Lite release 4.9.4 stamp 80103
c=IN IP4 105.88.61.10
t=0 0
m=audio 61654 RTP/AVP 9 8 85 120 0 84 3 101
a=rtpmap:85 speex/8000
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (13 headers 13 lines) ---
Sending to 105.88.61.10:63363 (no NAT)
Sending to 105.88.61.10:63363 (no NAT)
Using INVITE request as basis request - 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
Found peer '109' for '109' from 105.88.61.10:63363

<--- Reliably Transmitting (NAT) to 105.88.61.10:63363 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---c0a6b118d7cd0e2b;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as308a7147
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 1 INVITE
	Server: Asterisk PBX 11.22.0}
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="049960a6"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE' in 7040 ms (Method: INVITE)
Retransmitting #1 (NAT) to 105.88.61.10:63363:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---c0a6b118d7cd0e2b;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as308a7147
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 1 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="049960a6"
Content-Length: 0


---

<--- SIP read from UDP:105.88.61.10:63363 --->
ACK sip:466@95.55.15.109:20160 SIP/2.0
Via: SIP/2.0/UDP 105.88.61.10:63363;branch=z9hG4bK-524287-1---c0a6b118d7cd0e2b;rport
Max-Forwards: 70
To: <sip:466@95.55.15.109:20160>;tag=as308a7147
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 1 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:105.88.61.10:63363 --->
INVITE sip:466@95.55.15.109:20160 SIP/2.0
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;rport
Max-Forwards: 70
Contact: <sip:109@105.88.61.10;rinstance=2fcc5d63c3a097f8>
To: <sip:466@95.55.15.109:20160>
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.4 stamp 80103
Authorization: Digest username="109",realm="asterisk",nonce="049960a6",uri="sip:466@95.55.15.109:20160",response="06ef1c8e454de73141b8f844e020a207",algorithm=MD5
Content-Length: 364

v=0
o=- 1462358437509784 1 IN IP4 105.88.61.10
s=X-Lite release 4.9.4 stamp 80103
c=IN IP4 105.88.61.10
t=0 0
m=audio 61654 RTP/AVP 9 8 85 120 0 84 3 101
a=rtpmap:85 speex/8000
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Sending to 105.88.61.10:63363 (NAT)
Using INVITE request as basis request - 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
Found peer '109' for '109' from 105.88.61.10:63363
  == Using SIP RTP CoS mark 5
Found RTP audio format 9
Found RTP audio format 8
Found RTP audio format 85
Found RTP audio format 120
Found RTP audio format 0
Found RTP audio format 84
Found RTP audio format 3
Found RTP audio format 101
Found audio description format speex for ID 85
Found unknown media description format opus for ID 120
Found audio description format speex for ID 84
Found audio description format telephone-event for ID 101
Capabilities: us - (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|speex16|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14|testlaw|g719|speex32|slin12|slin24|slin32|slin44|slin48|slin96|slin192), peer - audio=(gsm|ulaw|alaw|speex|speex16|g722)/video=(nothing)/text=(nothing), combined - (gsm|ulaw|alaw|speex|speex16|g722)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 105.88.61.10:61654
Looking for 466 in from-internal (domain 95.55.15.109)
list_route: hop: <sip:109@105.88.61.10;rinstance=2fcc5d63c3a097f8>

<--- Transmitting (NAT) to 105.88.61.10:63363 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Length: 0


<------------>
    -- Executing [466@from-internal:1] Dial("SIP/109-00000003", "Dongle/KS/466") in new stack
    -- Called Dongle/KS/466
    -- Dongle/KS-0100000003 is making progress passing it to SIP/109-00000003
Audio is at 10844
Adding codec 100002 (gsm) to SDP
Adding codec 100002 (gsm) to SDP
Adding codec 100003 (ulaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100009 (speex) to SDP
Adding codec 100012 (g722) to SDP
Adding codec 100016 (speex16) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Transmitting (NAT) to 105.88.61.10:63363 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>

<--- SIP read from UDP:105.88.61.10:63363 --->
ACK sip:466@95.55.15.109:20160 SIP/2.0
Via: SIP/2.0/UDP 105.88.61.10:63363;branch=z9hG4bK-524287-1---c0a6b118d7cd0e2b;rport
Max-Forwards: 70
To: <sip:466@95.55.15.109:20160>;tag=as308a7147
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 1 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
       > 0xb6b10278 -- Probation passed - setting RTP source address to 105.88.61.10:61654
    -- Dongle/KS-0100000003 answered SIP/109-00000003
Audio is at 10844
Adding codec 100002 (gsm) to SDP
Adding codec 100002 (gsm) to SDP
Adding codec 100003 (ulaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100009 (speex) to SDP
Adding codec 100012 (g722) to SDP
Adding codec 100016 (speex16) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 105.88.61.10:63363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>
Retransmitting #1 (NAT) to 105.88.61.10:63363:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #2 (NAT) to 105.88.61.10:63363:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #3 (NAT) to 105.88.61.10:63363:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #4 (NAT) to 105.88.61.10:63363:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #5 (NAT) to 105.88.61.10:63363:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
Retransmitting #6 (NAT) to 105.88.61.10:63363:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10;branch=z9hG4bK-524287-1---7c4c2e40e6dc5c11;received=105.88.61.10;rport=63363
From: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
To: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:466@95.55.15.109:20160>
Content-Type: application/sdp
Content-Length: 431

v=0
o=root 847945641 847945641 IN IP4 95.55.15.109
s=Asterisk PBX 11.22.0
c=IN IP4 95.55.15.109
t=0 0
m=audio 10844 RTP/AVP 3 3 0 0 8 8 85 9 84 101
a=rtpmap:3 GSM/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:85 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
  == Spawn extension (from-internal, 466, 1) exited non-zero on 'SIP/109-00000003'
Scheduling destruction of SIP dialog '80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE' in 7040 ms (Method: INVITE)
set_destination: Parsing <sip:109@105.88.61.10;rinstance=2fcc5d63c3a097f8> for address/port to send to
set_destination: set destination to 105.88.61.10:5060
Reliably Transmitting (NAT) to 105.88.61.10:63363:
BYE sip:109@105.88.61.10;rinstance=2fcc5d63c3a097f8 SIP/2.0
Via: SIP/2.0/UDP 95.55.15.109:20160;branch=z9hG4bK1aef515e;rport
Max-Forwards: 70
From: <sip:466@95.55.15.109:20160>;tag=as165b713e
To: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 102 BYE
User-Agent: Asterisk PBX 11.22.0
Proxy-Authorization: Digest username="109", realm="asterisk", algorithm=MD5, uri="sip:95.55.15.109", nonce="049960a6", response="0c27228a0ffdc2d7276826a4728a3d35"
X-Asterisk-HangupCause: No user responding
X-Asterisk-HangupCauseCode: 18
Content-Length: 0


---
Retransmitting #1 (NAT) to 105.88.61.10:63363:
BYE sip:109@105.88.61.10;rinstance=2fcc5d63c3a097f8 SIP/2.0
Via: SIP/2.0/UDP 95.55.15.109:20160;branch=z9hG4bK1aef515e;rport
Max-Forwards: 70
From: <sip:466@95.55.15.109:20160>;tag=as165b713e
To: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 102 BYE
User-Agent: Asterisk PBX 11.22.0
Proxy-Authorization: Digest username="109", realm="asterisk", algorithm=MD5, uri="sip:95.55.15.109", nonce="049960a6", response="0c27228a0ffdc2d7276826a4728a3d35"
X-Asterisk-HangupCause: No user responding
X-Asterisk-HangupCauseCode: 18
Content-Length: 0


---

<--- SIP read from UDP:105.88.61.10:63363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10:63363;branch=z9hG4bK1aef515e;rport=20160
Contact: <sip:109@105.88.61.10:63363;rinstance=2fcc5d63c3a097f8>
To: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
From: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 102 BYE
User-Agent: X-Lite release 4.9.4 stamp 80103
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog '80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE' Method: INVITE

<--- SIP read from UDP:105.88.61.10:63363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 105.88.61.10:63363;branch=z9hG4bK1aef515e;rport=20160
Contact: <sip:109@105.88.61.10:63363;rinstance=2fcc5d63c3a097f8>
To: "109"<sip:109@95.55.15.109:20160>;tag=721d2c40
From: <sip:466@95.55.15.109:20160>;tag=as165b713e
Call-ID: 80103MjY1NmU5Y2VmYzBkOTU3OTYxYjVkZGU2NjE4NzZkNmE
CSeq: 102 BYE
User-Agent: X-Lite release 4.9.4 stamp 80103
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---

<--- SIP read from UDP:105.88.61.10:63363 --->


<------------->
95.55.15.109:20160 -- 20160 это внешний порт который проброшен через НАТ на 5060 порт астериска.

SIP.CONF

Код: Выделить всё

[general]
transport=udp
allowguest=no
alwaysauthreject=yes
externaddr=95.55.15.109:20160
localnet=192.168.1.0/255.255.255.0

[109]
type=friend
host=dynamic
nat=force_rport,comedia
context=from-internal
allow=all
qualify=300
secret=pass
deny=0.0.0.0/0.0.0.0
permit=105.88.61.10/255.255.255.255
permit=192.168.1.0/255.255.255.0
Что интересно, то что Астериск говорит в начале:

Код: Выделить всё

SIP/2.0 401 Unauthorized
После чего начинает 6 раз

Код: Выделить всё

Retransmitting #1
После 6 раза сбрасывает звонок. Не пойму как это сипфон не авторизован, если я только что им зарегался на Астериске.
Окей, и вот дебаг с сипфона, который внутри сети с Астериском, звонок на тот же номер.

> sip set debug peer 108

Код: Выделить всё

<--- SIP read from UDP:192.168.1.4:51927 --->
INVITE sip:466@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-cabf4a89344f662e-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:466@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 237

v=0
o=Z 0 0 IN IP4 192.168.1.4
s=Z
c=IN IP4 192.168.1.4
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 98 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (14 headers 12 lines) ---
Sending to 192.168.1.4:51927 (no NAT)
Sending to 192.168.1.4:51927 (no NAT)
Using INVITE request as basis request - ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
Found peer '108' for '108' from 192.168.1.4:51927

<--- Reliably Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 401 

Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-cabf4a89344f662e-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
To: <sip:466@192.168.1.4;transport=UDP>;tag=as14d81c0a
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 1 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="76b876e7"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.1.4:51927 --->
PUBLISH sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-830e18565cb57fcd-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=217df316
Call-ID: ZjgyODQ0YTY0ZTE1YmU3ZjM1ZmJmZDYxZGEyYjEyNDI.
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence, kpml
Content-Length: 263

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:108@192.168.1.4;transport=UDP"> <tuple id="108" > <status><basic>open</basic></status> <note>On the phone</note> </tuple>
</presence>
<------------->
--- (16 headers 3 lines) ---
Sending to 192.168.1.4:51927 (no NAT)

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-830e18565cb57fcd-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=217df316
To: <sip:108@192.168.1.4;transport=UDP>;tag=as1869075e
Call-ID: ZjgyODQ0YTY0ZTE1YmU3ZjM1ZmJmZDYxZGEyYjEyNDI.
CSeq: 1 PUBLISH
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog 'ZjgyODQ0YTY0ZTE1YmU3ZjM1ZmJmZDYxZGEyYjEyNDI.' Method: PUBLISH

<--- SIP read from UDP:192.168.1.4:51927 --->
SUBSCRIBE sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-85cb2ea709369492-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=8caf1c0e
Call-ID: NDkyNzA0ZGUwZmIzMjVjMDc5NzdlNjdjNmM2ZTFmMmI.
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0

<------------->
--- (16 headers 0 lines) ---
Sending to 192.168.1.4:51927 (no NAT)
Creating new subscription
Sending to 192.168.1.4:51927 (no NAT)
list_route: hop: <sip:108@192.168.1.4:51927;transport=UDP>
Found peer '108' for '108' from 192.168.1.4:51927

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 401 
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-85cb2ea709369492-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=8caf1c0e
To: <sip:108@192.168.1.4;transport=UDP>;tag=as4f9fc832
Call-ID: NDkyNzA0ZGUwZmIzMjVjMDc5NzdlNjdjNmM2ZTFmMmI.
CSeq: 1 SUBSCRIBE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="7791824e"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'NDkyNzA0ZGUwZmIzMjVjMDc5NzdlNjdjNmM2ZTFmMmI.' in 6400 ms (Method: SUBSCRIBE)

<--- SIP read from UDP:192.168.1.4:51927 --->
ACK sip:466@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-cabf4a89344f662e-1---d8754z-
Max-Forwards: 70
To: <sip:466@192.168.1.4;transport=UDP>;tag=as14d81c0a
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 1 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:192.168.1.4:51927 --->
INVITE sip:466@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-579d549e31b49bfe-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:466@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="108",realm="asterisk",nonce="76b876e7",uri="sip:466@192.168.1.4;transport=UDP",response="3bc0af637d6b252ac4b9e785be767487",algorithm=MD5
Allow-Events: presence, kpml
Content-Length: 237

v=0
o=Z 0 0 IN IP4 192.168.1.4
s=Z
c=IN IP4 192.168.1.4
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 98 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (15 headers 12 lines) ---
Sending to 192.168.1.4:51927 (no NAT)
Using INVITE request as basis request - ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
Found peer '108' for '108' from 192.168.1.4:51927
  == Using SIP RTP CoS mark 5
Found RTP audio format 3
Found RTP audio format 110
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 98
Found RTP audio format 101
Found audio description format speex for ID 110
Found audio description format iLBC for ID 98
Found audio description format telephone-event for ID 101
Capabilities: us - (gsm|ulaw|alaw|h263|testlaw), peer - audio=(gsm|ulaw|alaw|speex|ilbc)/video=(nothing)/text=(nothing), combined - (gsm|ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.1.4:8000
Looking for 466 in from-internal (domain 192.168.1.4)
list_route: hop: <sip:108@192.168.1.4:51927;transport=UDP>

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-579d549e31b49bfe-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
To: <sip:466@192.168.1.4;transport=UDP>
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:466@192.168.1.4:5060>
Content-Length: 0


<------------>
    -- Executing [466@from-internal:1] Dial("SIP/108-00000000", "Dongle/KS/466") in new stack

<--- SIP read from UDP:192.168.1.4:51927 --->
SUBSCRIBE sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-1f123aa481108ce9-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=8caf1c0e
Call-ID: NDkyNzA0ZGUwZmIzMjVjMDc5NzdlNjdjNmM2ZTFmMmI.
CSeq: 2 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="108",realm="asterisk",nonce="7791824e",uri="sip:108@192.168.1.4;transport=UDP",response="782ca933f282c180e35dcbf0c6cd72d2",algorithm=MD5
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0

<------------->
    -- Called Dongle/KS/466
--- (17 headers 0 lines) ---
Creating new subscription
Sending to 192.168.1.4:51927 (no NAT)
Found peer '108' for '108' from 192.168.1.4:51927

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-1f123aa481108ce9-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=8caf1c0e
To: <sip:108@192.168.1.4;transport=UDP>;tag=as4f9fc832
Call-ID: NDkyNzA0ZGUwZmIzMjVjMDc5NzdlNjdjNmM2ZTFmMmI.
CSeq: 2 SUBSCRIBE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog 'NDkyNzA0ZGUwZmIzMjVjMDc5NzdlNjdjNmM2ZTFmMmI.' Method: SUBSCRIBE
    -- Dongle/KS-0100000000 is making progress passing it to SIP/108-00000000
Audio is at 25482
Adding codec 100003 (ulaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-579d549e31b49bfe-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
To: <sip:466@192.168.1.4;transport=UDP>;tag=as25f38dcf
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:466@192.168.1.4:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 279

v=0
o=root 491410129 491410129 IN IP4 192.168.1.4
s=Asterisk PBX 11.22.0
c=IN IP4 192.168.1.4
t=0 0
m=audio 25482 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

<------------>
       > 0xb6b2d8d0 -- Probation passed - setting RTP source address to 192.168.1.4:8000
    -- Dongle/KS-0100000000 answered SIP/108-00000000
Audio is at 25482
Adding codec 100003 (ulaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-579d549e31b49bfe-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
To: <sip:466@192.168.1.4;transport=UDP>;tag=as25f38dcf
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 2 INVITE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:466@192.168.1.4:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 279

v=0
o=root 491410129 491410129 IN IP4 192.168.1.4
s=Asterisk PBX 11.22.0
c=IN IP4 192.168.1.4
t=0 0
m=audio 25482 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

<------------>

<--- SIP read from UDP:192.168.1.4:51927 --->
ACK sip:466@192.168.1.4:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-25c89abbffb5e311-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:466@192.168.1.4;transport=UDP>;tag=as25f38dcf
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 2 ACK
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="108",realm="asterisk",nonce="76b876e7",uri="sip:466@192.168.1.4;transport=UDP",response="3bc0af637d6b252ac4b9e785be767487",algorithm=MD5
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---

<--- SIP read from UDP:192.168.1.4:51927 --->
PUBLISH sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-1cac37d7fc329d3c-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=23593611
Call-ID: MTg1OWNiMDI1ZWFiYWUwYzAwNDMzYTBmMjRjYTM5MDQ.
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence, kpml
Content-Length: 263

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:108@192.168.1.4;transport=UDP"> <tuple id="108" > <status><basic>open</basic></status> <note>On the phone</note> </tuple>
</presence>
<------------->
--- (16 headers 3 lines) ---
Sending to 192.168.1.4:51927 (no NAT)

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-1cac37d7fc329d3c-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=23593611
To: <sip:108@192.168.1.4;transport=UDP>;tag=as3e300dd0
Call-ID: MTg1OWNiMDI1ZWFiYWUwYzAwNDMzYTBmMjRjYTM5MDQ.
CSeq: 1 PUBLISH
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog 'MTg1OWNiMDI1ZWFiYWUwYzAwNDMzYTBmMjRjYTM5MDQ.' Method: PUBLISH

<--- SIP read from UDP:192.168.1.4:51927 --->
SUBSCRIBE sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-deba431ada216c6e-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=f2c9ac7c
Call-ID: NDM1ZGY0NWM3OGIxM2NjZWUwNjU5NWZhY2QwODc2N2Q.
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0

<------------->
--- (16 headers 0 lines) ---
Sending to 192.168.1.4:51927 (no NAT)
Creating new subscription
Sending to 192.168.1.4:51927 (no NAT)
list_route: hop: <sip:108@192.168.1.4:51927;transport=UDP>
Found peer '108' for '108' from 192.168.1.4:51927

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-deba431ada216c6e-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=f2c9ac7c
To: <sip:108@192.168.1.4;transport=UDP>;tag=as652509d8
Call-ID: NDM1ZGY0NWM3OGIxM2NjZWUwNjU5NWZhY2QwODc2N2Q.
CSeq: 1 SUBSCRIBE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4ae4f294"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'NDM1ZGY0NWM3OGIxM2NjZWUwNjU5NWZhY2QwODc2N2Q.' in 6400 ms (Method: SUBSCRIBE)

<--- SIP read from UDP:192.168.1.4:51927 --->
SUBSCRIBE sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-69f0e31072f957c8-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=f2c9ac7c
Call-ID: NDM1ZGY0NWM3OGIxM2NjZWUwNjU5NWZhY2QwODc2N2Q.
CSeq: 2 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="108",realm="asterisk",nonce="4ae4f294",uri="sip:108@192.168.1.4;transport=UDP",response="66e8b67f3ab98aad33c43cff7f578a94",algorithm=MD5
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0

<------------->
--- (17 headers 0 lines) ---
Creating new subscription
Sending to 192.168.1.4:51927 (no NAT)
Found peer '108' for '108' from 192.168.1.4:51927

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-69f0e31072f957c8-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=f2c9ac7c
To: <sip:108@192.168.1.4;transport=UDP>;tag=as652509d8
Call-ID: NDM1ZGY0NWM3OGIxM2NjZWUwNjU5NWZhY2QwODc2N2Q.
CSeq: 2 SUBSCRIBE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog 'NDM1ZGY0NWM3OGIxM2NjZWUwNjU5NWZhY2QwODc2N2Q.' Method: SUBSCRIBE
Really destroying SIP dialog 'YTg5N2FhOWZhMDU0NTVhMDAyMjM5MTRmZTFkYTdhODQ.' Method: REGISTER
Really destroying SIP dialog 'MzgyZDVmMTRjNWQyN2JlOGZmZDU4YzBjZTIxNGU1Mzk.' Method: REGISTER

<--- SIP read from UDP:192.168.1.4:51927 --->
BYE sip:466@192.168.1.4:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-ce8352bb5cbf1782-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:466@192.168.1.4;transport=UDP>;tag=as25f38dcf
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 3 BYE
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="108",realm="asterisk",nonce="76b876e7",uri="sip:466@192.168.1.4:5060",response="22d76cb34d14fb54eee4287994bba056",algorithm=MD5
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
Sending to 192.168.1.4:51927 (no NAT)
Scheduling destruction of SIP dialog 'ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-ce8352bb5cbf1782-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=d1949c7a
To: <sip:466@192.168.1.4;transport=UDP>;tag=as25f38dcf
Call-ID: ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.
CSeq: 3 BYE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>

<--- SIP read from UDP:192.168.1.4:51927 --->
PUBLISH sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-32dff6aa9bb4fc24-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=07000c73
Call-ID: NjlmMTFlYWJhNGM5ZjFjN2UzODhmNmFlOTllMTBlZmM.
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence, kpml
Content-Length: 257

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:108@192.168.1.4;transport=UDP"> <tuple id="108" > <status><basic>open</basic></status> <note>Online</note> </tuple>
</presence>
<------------->
--- (16 headers 3 lines) ---
Sending to 192.168.1.4:51927 (no NAT)

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-32dff6aa9bb4fc24-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=07000c73
To: <sip:108@192.168.1.4;transport=UDP>;tag=as4c7ce18b
Call-ID: NjlmMTFlYWJhNGM5ZjFjN2UzODhmNmFlOTllMTBlZmM.
CSeq: 1 PUBLISH
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog 'NjlmMTFlYWJhNGM5ZjFjN2UzODhmNmFlOTllMTBlZmM.' Method: PUBLISH

<--- SIP read from UDP:192.168.1.4:51927 --->
SUBSCRIBE sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-cb44f39537ebc4a5-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=9d304946
Call-ID: YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0

<------------->
--- (16 headers 0 lines) ---
Sending to 192.168.1.4:51927 (no NAT)
Creating new subscription
Sending to 192.168.1.4:51927 (no NAT)
list_route: hop: <sip:108@192.168.1.4:51927;transport=UDP>
Found peer '108' for '108' from 192.168.1.4:51927

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-cb44f39537ebc4a5-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=9d304946
To: <sip:108@192.168.1.4;transport=UDP>;tag=as39293471
Call-ID: YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.
CSeq: 1 SUBSCRIBE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1d1c0648"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.' in 6400 ms (Method: SUBSCRIBE)
  == Spawn extension (from-internal, 466, 1) exited non-zero on 'SIP/108-00000000'

<--- SIP read from UDP:192.168.1.4:51927 --->
SUBSCRIBE sip:108@192.168.1.4;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-c3f32eb1488dcbea-1---d8754z-
Max-Forwards: 70
Contact: <sip:108@192.168.1.4:51927;transport=UDP>
To: <sip:108@192.168.1.4;transport=UDP>
From: <sip:108@192.168.1.4;transport=UDP>;tag=9d304946
Call-ID: YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.
CSeq: 2 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="108",realm="asterisk",nonce="1d1c0648",uri="sip:108@192.168.1.4;transport=UDP",response="3f3aa323df1b16fcce5981a692371e46",algorithm=MD5
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0

<------------->
--- (17 headers 0 lines) ---
Creating new subscription
Sending to 192.168.1.4:51927 (no NAT)
Found peer '108' for '108' from 192.168.1.4:51927

<--- Transmitting (no NAT) to 192.168.1.4:51927 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-c3f32eb1488dcbea-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=9d304946
To: <sip:108@192.168.1.4;transport=UDP>;tag=as39293471
Call-ID: YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.
CSeq: 2 SUBSCRIBE
Server: Asterisk PBX 11.22.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog 'YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.' Method: SUBSCRIBE
Really destroying SIP dialog 'ZTcyNzIyYjMwMjhhY2EzYTI2ZGViYjU2NGU4OWU0Y2Q.' Method: BYE
Reliably Transmitting (no NAT) to 192.168.1.4:51927:
OPTIONS sip:108@192.168.1.4:51927;rinstance=7e21d6aa80f2619d;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK212e4bfe
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.4>;tag=as3bc5a4a7
To: <sip:108@192.168.1.4:51927;rinstance=7e21d6aa80f2619d;transport=UDP>
Contact: <sip:asterisk@192.168.1.4:5060>
Call-ID: 2e48d0d805e2a996262fdc970f6bb7a0@192.168.1.4:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.22.0
Date: Wed, 04 May 2016 10:38:42 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:192.168.1.4:51927 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK212e4bfe
Contact: <sip:192.168.1.4:51927>
To: <sip:108@192.168.1.4:51927;rinstance=7e21d6aa80f2619d;transport=UDP>;tag=e9918847
From: "asterisk"<sip:asterisk@192.168.1.4>;tag=as3bc5a4a7
Call-ID: 2e48d0d805e2a996262fdc970f6bb7a0@192.168.1.4:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '2e48d0d805e2a996262fdc970f6bb7a0@192.168.1.4:5060' Method: OPTIONS
Минуту поговорил - полёт нормальный, никаких Retransmitting не было, никаки Unathorized.

Заранее всем огромное благодарю!
Samael28
Сообщения: 1057
Зарегистрирован: 08 янв 2011, 18:32
Откуда: Киев
Контактная информация:

Re: Обрывается исходящий звонок

Сообщение Samael28 »

Не надо делать 20160 -> 5060. Сделайте 5060 -> 5060.
Мой профайл на Upwork
mishapolitaev
Сообщения: 22
Зарегистрирован: 31 янв 2016, 08:20

Re: Обрывается исходящий звонок

Сообщение mishapolitaev »

Пробовал, оказалось дело не в этом.
virus_net
Сообщения: 2337
Зарегистрирован: 05 июн 2013, 08:12
Откуда: Москва

Re: Обрывается исходящий звонок

Сообщение virus_net »

401 Unauthorized - так и должно быть, т.к. у вас в sip.conf allowguest=no

Так же не помешало бы запретить directmedia:

Код: Выделить всё

directmedia=no
directmediadeny=0.0.0.0/0
directrtpsetup=no
Так же не помешало бы убрать огромный выбор кодеков и свести его к двум, например:

Код: Выделить всё

disallow=all
allow = alaw
allow = ulaw
То же самое проделать в настройках SIP клиента.
mishapolitaev писал(а):20160 это внешний порт который проброшен через НАТ на 5060 порт астериска
а диапазон RTP портов ?
мой SIP URI sip:virus_net@asterisk.ru
bitname.ru - Домены .bit (namecoin) .emc .coin .lib .bazar (emercoin)

ENUMER - звони бесплатно и напрямую.
mishapolitaev
Сообщения: 22
Зарегистрирован: 31 янв 2016, 08:20

Re: Обрывается исходящий звонок

Сообщение mishapolitaev »

Но мой 109 пир не гость же, он ведь зарегался с логином и паролем и в консоли видно что он зарегался.

Rtp 10000-20000 udp которые проброшены через нат на астериск сервер. Если бы дело было в rtp то голос был бы в одну сторону, а так я 6 сек общаюсь с человеком.

Кодеки были у меня ulaw, alaw. Потом разрешил все, думал может дело в них. Уберу назад.

directrtpsetup=no не помогло, остальное попробую. Думаю тоже врядли в этом дело. Мне кажется мой sip клиент почему то ACK не посылает на Invite, который кстати он смог послать, или на какое-то другое SIP сообщение. Поэтому у меня после 6 Retransmitting обрывается звонок. Тут прочёл о причинах ретрансмиттинга https://wiki.asterisk.org/wiki/display/ ... nsmissions

Кстати если ставлю в настройках 109 пира

Код: Выделить всё

qualify=no
То звонок обрывается аж после 10 Retransmittinga.
virus_net
Сообщения: 2337
Зарегистрирован: 05 июн 2013, 08:12
Откуда: Москва

Re: Обрывается исходящий звонок

Сообщение virus_net »

На чем у вас организован NAT ?
мой SIP URI sip:virus_net@asterisk.ru
bitname.ru - Домены .bit (namecoin) .emc .coin .lib .bazar (emercoin)

ENUMER - звони бесплатно и напрямую.
ded
Сообщения: 15630
Зарегистрирован: 26 авг 2010, 19:00

Re: Обрывается исходящий звонок

Сообщение ded »

Отключите RTCP или настройте его прохождение через NAT правильно.

Авторизация не при чём. У вас всё проходит через первую посылку неавторизованного запроса (в логе - SUBSCRIBE)

Код: Выделить всё

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.4:51927;branch=z9hG4bK-d8754z-cb44f39537ebc4a5-1---d8754z-;received=192.168.1.4
From: <sip:108@192.168.1.4;transport=UDP>;tag=9d304946
To: <sip:108@192.168.1.4;transport=UDP>;tag=as39293471
Call-ID: YzE5YzU2YmM3MDI4NDlhNTcyNWZmMGE5ODE4OTYzZjc.
CSeq: 1 SUBSCRIBE
и в ответ на SIP/2.0 401 Unauthorized идёт следующий запрос - авторизованный:

Код: Выделить всё

Authorization: Digest username="108",realm="asterisk",nonce="7791824e",uri="sip:108@192.168.1.4;transport=UDP",response="782ca933f282c180e35dcbf0c6cd72d2",algorithm=MD5
И так со всеми диалогами - INVITE, SUBSCRIBE, etc. Это не зависит от того, что уже софтфон зарегистрировался, то есть диалог REGISTER состоялся.
mishapolitaev
Сообщения: 22
Зарегистрирован: 31 янв 2016, 08:20

Re: Обрывается исходящий звонок

Сообщение mishapolitaev »

virus_net писал(а):На чем у вас организован NAT ?
На обычных домашних роутерах, с одной стороны это DLink DSL 2640U, c другой -- TP-Link WR741N.
mishapolitaev
Сообщения: 22
Зарегистрирован: 31 янв 2016, 08:20

Re: Обрывается исходящий звонок

Сообщение mishapolitaev »

ded писал(а):Отключите RTCP или настройте его прохождение через NAT правильно.
А как Вы поняли что дело в RTCP? Что он не правильно проходит через NAT?

Благодарю за ответ.
ded
Сообщения: 15630
Зарегистрирован: 26 авг 2010, 19:00

Re: Обрывается исходящий звонок

Сообщение ded »

Ванга шепнула.
RTCP is also affected by NAT, the same way as RTP and SIP. So if there's too much time between each RTCP report, NAT relationships will be forgotten and RTCP packets lost.
One way to avoid this problem is to use RTP/RTCP multiplexing as defined in RFC5761 (tba or draft-ietf-avt-rtp-and-rtcp-mux-07). I guess that if asterisk were to support this it may require some minor enhancements.
http://asterisk.ru/knowledgebase/RTP
http://www.voip-info.org/wiki/view/Asterisk+RTCP
Ответить
© 2008 — 2025 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH