How to clean contacts when using realtime pjsip?

I am having some dead contacts on my asterisk server.
I tried to use database deltree, but it does not work

ip-121-12-12-12*CLI> database deltree registrar/contact
Database entries do not exist.

My server is set up with real-time pjsip

I confirm that in my MySQL database, ps_contacts table is clean.
However, when I do pjsip show contacts, it still have the dead contacts inside.

ip-121-12-12-12*CLI> pjsip show contacts

Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>

Contact: camerasiptest3/sip:camerasiptest3@ 77665cbae4 NonQual nan
Contact: camerasiptest3/sip:camerasiptest3@ bd850979db NonQual nan
Contact: camerasiptest3/sip:camerasiptest3@ 7199d148ea NonQual nan
Contact: camerasiptest4/sip:camerasiptest4@ 4d6e18b8b8 NonQual nan
Contact: camerasiptest4/sip:camerasiptest4@ 56fa199329 NonQual nan
Contact: camerasiptest5/sip:camerasiptest5@ 762a9d06eb NonQual nan
Contact: camerasiptest5/sip:camerasiptest5@ 05ad61e798 NonQual nan

Objects found: 7

I also has a sorcery setting











I’m guessing those are static contacts you have defined in your pjsip.conf, or realtime ps_aors table. Do a select on your ps_aors table and see what’s defined for the “contact” field(s).

Static contacts by their nature remain until no longer defined in the configuration.

I found the problem, it was my stupid mistake. :frowning: I looked into the wrong database for another asterisk server. Could I delete this post?

To delete a post I believe you can select the ‘…’ button (show more) and select the trash can icon (delete this post).

However it doesn’t hurt to leave it and who knows someone else may find it useful later. They might even be clued in to see if they too are looking at the wrong place :slight_smile: