Отловил в логах события, связанные с таймаутом регистрации. Но они мне ничем не помогли, разве что теперь я знаю, что потеря регистрации связана с каким-то таймаутом (пока не понятно каким). При чём специально провел эксперимент: запустил софтфон с регистрацией. За два часа GXP1628 отваливался дважды, а софтфон - ниразу. Заподозрил отсутсвие фактической регистрации в момент рестарта телефона (т.к. старая регистрация ещё действует), поставил галку "Unregister on Reboot = All". Ноль по фазе. Что за хрень, ума не приложу. Беплатный софтфон с настройками по-умолчанию регистрацию держит, а телефон за $85 отваливается.
Вот логи в момент потери регистрации:
[Feb 2 20:31:39] VERBOSE[100731] chan_sip.c: set_destination: Parsing <sip:660@10.1.1.160:5060> for address/port to send to
[Feb 2 20:31:39] VERBOSE[100731] chan_sip.c: set_destination: set destination to 10.1.1.160:5060
[Feb 2 20:31:39] VERBOSE[100731] chan_sip.c: Reliably Transmitting (no NAT) to 10.1.1.160:5060:
NOTIFY sip:660@10.1.1.160:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.120:5060;branch=z9hG4bK75b7fbfe;rport
Max-Forwards: 70
From: <sip:661@10.1.1.120>;tag=as654ea89b
To: <sip:660@10.1.1.120>;tag=113628648
Contact: <sip:661@10.1.1.120:5060>
Call-ID:
1554482010-5060-2@BA.B.B.BGACSeq: 105 NOTIFY
User-Agent: Asterisk PBX 13.6.0
Subscription-State: terminated;reason=timeout
Event: dialog
Content-Type: application/dialog-info+xml
Content-Length: 201
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="3" state="full" entity="sip:661@10.1.1.120">
<dialog id="661">
<state>terminated</state>
</dialog>
</dialog-info>
---
[Feb 2 20:31:39] VERBOSE[100731] chan_sip.c:
<--- SIP read from UDP:10.1.1.160:5060 --->
SIP/2.0 481 Subscription Does Not Exist
Via: SIP/2.0/UDP 10.1.1.120:5060;branch=z9hG4bK75b7fbfe;rport=5060
From: <sip:661@10.1.1.120>;tag=as654ea89b
To: <sip:660@10.1.1.120>;tag=113628648
Call-ID:
1554482010-5060-2@BA.B.B.BGACSeq: 105 NOTIFY
Supported: replaces, path, timer
User-Agent: Grandstream GXP1628 1.0.2.27
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
<------------->
[Feb 2 20:31:39] VERBOSE[100731] chan_sip.c: --- (10 headers 0 lines) ---
[Feb 2 20:31:39] VERBOSE[100731] chan_sip.c: Really destroying SIP dialog
'1554482010-5060-2@BA.B.B.BGA' Method: SUBSCRIBE
[Feb 2 20:31:40] VERBOSE[100731] chan_sip.c: set_destination: Parsing <sip:660@10.1.1.160:5060> for address/port to send to
[Feb 2 20:31:40] VERBOSE[100731] chan_sip.c: set_destination: set destination to 10.1.1.160:5060
[Feb 2 20:31:40] VERBOSE[100731] chan_sip.c: Reliably Transmitting (no NAT) to 10.1.1.160:5060:
NOTIFY sip:660@10.1.1.160:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.120:5060;branch=z9hG4bK79bbd13f;rport
Max-Forwards: 70
From: <sip:662@10.1.1.120>;tag=as51a35485
To: <sip:660@10.1.1.120>;tag=298925962
Contact: <sip:662@10.1.1.120:5060>
Call-ID:
538233515-5060-3@BA.B.B.BGACSeq: 105 NOTIFY
User-Agent: Asterisk PBX 13.6.0
Subscription-State: terminated;reason=timeout
Event: dialog
Content-Type: application/dialog-info+xml
Content-Length: 201
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="3" state="full" entity="sip:662@10.1.1.120">
<dialog id="662">
<state>terminated</state>
</dialog>
</dialog-info>
---
[Feb 2 20:31:40] VERBOSE[100731] chan_sip.c:
<--- SIP read from UDP:10.1.1.160:5060 --->
SIP/2.0 481 Subscription Does Not Exist
Via: SIP/2.0/UDP 10.1.1.120:5060;branch=z9hG4bK79bbd13f;rport=5060
From: <sip:662@10.1.1.120>;tag=as51a35485
To: <sip:660@10.1.1.120>;tag=298925962
Call-ID:
538233515-5060-3@BA.B.B.BGACSeq: 105 NOTIFY
Supported: replaces, path, timer
User-Agent: Grandstream GXP1628 1.0.2.27
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
<------------->
[Feb 2 20:31:40] VERBOSE[100731] chan_sip.c: --- (10 headers 0 lines) ---
[Feb 2 20:31:40] VERBOSE[100731] chan_sip.c: Really destroying SIP dialog
'538233515-5060-3@BA.B.B.BGA' Method: SUBSCRIBE