Possible BUG in pkg Asterisk 18: endpoint contact info gets deleted immediately after registration
There's an erratic behaviour in Asterisk 18 pkg in Alpine 3.16 (armv7) : trunks are registered correctly but local endpoints are deleted immediately with NO LOGS and NO EXPLANATION whatsoever even with all debugging enabled.
This issue is driving me insane.
Log:
This is when my local phone registers to Asterisk:
== Contact 100/sip:100@192.168.111.165:63976;ob has been deleted == Endpoint 100 is now Unreachable -- Attempted to remove non-existent contact 'sip:100@192.168.111.165:63976;ob' from AOR '100' by request -- Attempted to remove non-existent contact 'sip:100@192.168.111.169:56033' from AOR '100' by request -- Attempted to remove non-existent contact 'sip:100@192.168.111.169:36145' from AOR '100' by request -- Added contact 'sip:100@192.168.111.169:36145' to AOR '100' with expiration of 3600 seconds == Endpoint 100 is now Reachable
And all seems OK. Now, as soon as I tell Asterisk to show endpoints, contact info gets DELETED with NO REASON - NO EXPLANATION - NOTHING IN LOGS - NOTHING IN DEBUG.
mxqpro2*CLI> pjsip show endpoints
Objects found: 4
.......
== Contact 100/sip:100@192.168.111.169:36145 has been deleted == Endpoint 100 is now Unreachable
There is no explanation anywhere WHY the contact gets deleted. I understand Asterisk 18 uses sqlite3 internally, I checked the database file (/var/lib/asterisk/astdb.sqlite3) and it seems correct (i.e. the endpoint data is stored there correctly).
IF I configure the endpoint with an explicit static clause (i.e. IP:PORT) the phone works as expected, but it's NOT how it should be: the phone/softphone should register to the sip server and pass its contact data.
Same configuration on an Armbian Bullseye (armv7, same machine) works correctly and I'm out of clues (7 hours straight working on this).