This question might be very simple, but I did not manage to find any answer.
I am running Asterisk 13.9.1 with PJSIP stack. Various UACs (hard and soft phones) are registered dynamically.
If a network or application suddenly goes down, an UAC does not send the correct ‘deregistration’ message (REGISTER with zero expiration time), so that registration is lost from UAC’s prospecive but is kept on the server - pjsip show contacts clearly indicate this.
When this UAC goes online, it tries to register again from a new TCP port and legitimately receives 403 Forbidden due to max_contacts=1 directive.
Increasing max_contacts value would not solve the issue - UAC will register, but Asterisk will send incoming calls to the first (initial) registration which is dead.
I noticed that neither pjsip reload, nor even application restart do not clear such registrations.
Do you have any advice how to clear them?