A lot of new non-existent trunks offline

Just restored a 12.0.69 backup to 16.0.40.10 machine.
I removed about 200 unused extension in exported extensions.csv then restored.
Then converted all extensions from old sip to pjsip.
I’m ended in all removed extensions displayed as “trunks offline” in dashboard.
In “asterisk info” (or sip show peers) , all of them are displayed as:

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description
234                       (Unspecified)                            D  Yes        Yes         A  0        UNKNOWN

How can I remove all of these ??

Have you reloaded the system so it knows those chan_sip peers are no longer needed?

Yes, same issue…
They seem stuck in some table…

So is the 234 one of the ones you removed from the exported csv file before importing it back in?

Looks like the import created an asterisk user without the corresponding device (or perhaps vice versa). You can manually edit the URL for the system to read and bulk delete the unnecessary devices

/admin/config.php?display=devices

and then do the same to bulk delete unneeded users:

/admin/config.php?display=users

Yes 234 is a removed extension.
Next, I issued fwconsole convert2pjsip -a
Lorne, display devices and display users gives the same amount of correct extensions number.
I don’t understand where the removed ones (now seen as trunks) are now hidden…
Of course,

/admin/config.php?display=trunks

shows the correct trunk list :face_with_raised_eyebrow: