Есть сервер астериск (подключен без нат) и есть удаленные клиенты SIP dlink сидят за НАТ ом (роутер микротик)
В CLI asterisk каждые 50 секунд постоянно сыплятся сообщения типа
Код: Выделить всё
-- Registered SIP '6202' at 78.78.78.78:6149
-- Registered SIP '6100' at 78.78.78.78:2080
-- Registered SIP '6150' at 78.78.78.78:27600
-- Registered SIP '6200' at 78.78.78.78:42668
-- Registered SIP '6101' at 78.78.78.78:32611
-- Registered SIP '6102' at 78.78.78.78:59649
-- Registered SIP '6151' at 78.78.78.78:7979
Запросы типа REGISTER отрабатываются корректно согласно всем учебникам. Ниже TcpDump.
Почему в консоль идет Register только от микротика? Пробовал ставить в sip.conf параметры ниже (дабы продлить срок жизни регистрации) - не помогает.
qualifyfreq=120 ; 120 секунд
qualify=400 ; пакеты типа OPTIONS
На SIP телефоне dlink стоит Keep alive -UDP 120 секунд
Все адреса белые.
Еще бывает звонишь на такого абонента, а астер пишет что канал не доступен и выкидывает.
Код: Выделить всё
Jul 5 10:36:35] WARNING[11416]: chan_sip.c:4140 retrans_pkt: Retransmission timeout reached on transmission 48b516d4741330e2505898010c9c761f@92.126.126.126:5061 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
[Jul 5 10:36:35] WARNING[11416]: chan_sip.c:4164 retrans_pkt: Hanging up call 48b516d4741330e2505898010c9c761f@92.126.126.126:5061 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
== Everyone is busy/congested at this time (1:0/0/1)
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: sip.conf
type=friend
host=dynamic
disallow=all
allow=alaw
allow=ulaw
context=call
qualify=400
qualifyfreq=120
nat=force_rport,comedia
directmedia=no
host=dynamic
disallow=all
allow=alaw
allow=ulaw
context=call
qualify=400
qualifyfreq=120
nat=force_rport,comedia
directmedia=no
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER: Tcpdump
<--- SIP read from UDP:78.78.78.78:39363 --->
REGISTER sip:92.126.126.126 SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK4064304551473614822
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 1 REGISTER
Contact: <sip:6151@78.78.78.78:3470>
Max-Forwards: 70
Expires: 230
Supported: path
User-Agent: DPH-
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 78.78.78.78:3470 (no NAT)
Sending to 78.78.78.78:3470 (no NAT)
<--- Transmitting (NAT) to 78.78.78.78:39363 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK4064304551473614822;received=78.78.78.78;rport=39363
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>;tag=as1105b505
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 1 REGISTER
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="45d3e40a"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '118547815650-23829216365850@78.78.78.78' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:78.78.78.78:39363 --->
REGISTER sip:92.126.126.126 SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK2478178772899930382
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 2 REGISTER
Contact: <sip:6151@78.78.78.78:3470>
Authorization: Digest username="6151", realm="asterisk", nonce="45d3e40a", uri="sip:92.126.126.126", response="17870c5be1e1dfacf76d8d198a1e27f7", algorithm=MD5
Max-Forwards: 70
Expires: 230
Supported: path
User-Agent: DPH-
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0
<------------->
--- (14 headers 0 lines) ---
Sending to 78.78.78.78:3470 (no NAT)
-- Registered SIP '6151' at 78.78.78.78:39363
Reliably Transmitting (NAT) to 78.78.78.78
OPTIONS sip:6151@78.78.78.78:3470 SIP/2.0
Via: SIP/2.0/UDP 92.126.126.126:5061;branch=z9hG4bK48d2f3e8;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@92.126.126.126:5061>;tag=as09b5a840
To: <sip:6151@78.78.78.78:3470>
Contact: <sip:asterisk@92.126.126.126:5061>
Call-ID: 19897eb964c5bb6e7e696c3e1e323c05@92.126.126.126:5061
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Date: Tue, 05 Jul 2022 06:07:30 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- Transmitting (NAT) to 78.78.78.78:39363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK2478178772899930382;received=78.78.78.78;rport=39363
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>;tag=as1105b505
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 2 REGISTER
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 230
Contact: <sip:6151@78.78.78.78:3470>;expires=230
Date: Tue, 05 Jul 2022 06:07:30 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '118547815650-23829216365850@78.78.78.78' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:78.78.78.78:39363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 92.126.126.126:5061;branch=z9hG4bK48d2f3e8;rport=5061
From: "asterisk" <sip:asterisk@92.126.126.126:5061>;tag=as09b5a840
To: <sip:6151@78.78.78.78:3470>;tag=1903129287
Call-ID: 19897eb964c5bb6e7e696c3e1e323c05@92.126.126.126:5061
CSeq: 102 OPTIONS
Contact: <sip:192.168.15.236:5061>
Supported: 100rel, replaces, timer
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Accept: application/sdp, message/sipfrag, application/dtmf-relay
Content-Length: 0
REGISTER sip:92.126.126.126 SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK4064304551473614822
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 1 REGISTER
Contact: <sip:6151@78.78.78.78:3470>
Max-Forwards: 70
Expires: 230
Supported: path
User-Agent: DPH-
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 78.78.78.78:3470 (no NAT)
Sending to 78.78.78.78:3470 (no NAT)
<--- Transmitting (NAT) to 78.78.78.78:39363 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK4064304551473614822;received=78.78.78.78;rport=39363
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>;tag=as1105b505
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 1 REGISTER
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="45d3e40a"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '118547815650-23829216365850@78.78.78.78' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:78.78.78.78:39363 --->
REGISTER sip:92.126.126.126 SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK2478178772899930382
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 2 REGISTER
Contact: <sip:6151@78.78.78.78:3470>
Authorization: Digest username="6151", realm="asterisk", nonce="45d3e40a", uri="sip:92.126.126.126", response="17870c5be1e1dfacf76d8d198a1e27f7", algorithm=MD5
Max-Forwards: 70
Expires: 230
Supported: path
User-Agent: DPH-
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0
<------------->
--- (14 headers 0 lines) ---
Sending to 78.78.78.78:3470 (no NAT)
-- Registered SIP '6151' at 78.78.78.78:39363
Reliably Transmitting (NAT) to 78.78.78.78
OPTIONS sip:6151@78.78.78.78:3470 SIP/2.0
Via: SIP/2.0/UDP 92.126.126.126:5061;branch=z9hG4bK48d2f3e8;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@92.126.126.126:5061>;tag=as09b5a840
To: <sip:6151@78.78.78.78:3470>
Contact: <sip:asterisk@92.126.126.126:5061>
Call-ID: 19897eb964c5bb6e7e696c3e1e323c05@92.126.126.126:5061
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Date: Tue, 05 Jul 2022 06:07:30 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- Transmitting (NAT) to 78.78.78.78:39363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 78.78.78.78:3470;branch=z9hG4bK2478178772899930382;received=78.78.78.78;rport=39363
From: Babushka <sip:6151@92.126.126.126:5061>;tag=139115470
To: Babushka <sip:6151@92.126.126.126:5061>;tag=as1105b505
Call-ID: 118547815650-23829216365850@78.78.78.78
CSeq: 2 REGISTER
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 230
Contact: <sip:6151@78.78.78.78:3470>;expires=230
Date: Tue, 05 Jul 2022 06:07:30 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '118547815650-23829216365850@78.78.78.78' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:78.78.78.78:39363 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 92.126.126.126:5061;branch=z9hG4bK48d2f3e8;rport=5061
From: "asterisk" <sip:asterisk@92.126.126.126:5061>;tag=as09b5a840
To: <sip:6151@78.78.78.78:3470>;tag=1903129287
Call-ID: 19897eb964c5bb6e7e696c3e1e323c05@92.126.126.126:5061
CSeq: 102 OPTIONS
Contact: <sip:192.168.15.236:5061>
Supported: 100rel, replaces, timer
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Accept: application/sdp, message/sipfrag, application/dtmf-relay
Content-Length: 0