asterisk*CLI> pjsip show registrations
No objects found.
Probably I’m using the wrong command…
I need to force the unregistration of an extension, but I start to think that it is not correct, because the extension could re-register itself few seconds later…
The AMI Action PJSIPUnregister unregisters a registration sent from Asterisk to an external system, as the Synopsis references:
Unregister an outbound registration.
Outbound, in this case, is outbound from Asterisk to something else.
As you realized, there isn’t much of a point in un-registering something registering to Asterisk, as it will just send a REGISTER request again later. You have a few options if you want to keep something REGISTER-ing with you:
Change the password on the endpoint’s auth object. That will prevent any further registrations to that endpoint.
Delete any registered contacts using ARI push configuration mechanisms. (If you want to kill the contacts immediately, that is.)
Assuming you want something else to register to that endpoint, you can always change the password on the auth object to something that some other new device knows.