Asterisk 20.2: how to force re-sending of REGISTER


I’ve just installed Asterisk 20.2 on Bookworm (using Debian unstable repo).
Using CLI, how can I force Asterisk to send a REGISTER message to a remote endpoint ?

I thought “pjsip send registration ” was the appropriate command for this it it doesn’t seem to trigger anything visible (an error message or some PJSIP logger data).


What error do you get? I’m on an old version (Asterisk 16.30.0) but pjsip send registration is an incorrect command there. It should be pjsip send register *all or pjsip send register <registration>.

If I do a pjsip send register *all it says “Re-register all queued” and the re-register is done.

But even with an incorrect command you should get an error message back.
For me:

asterisk*CLI> pjsip send registration
No such command ‘pjsip send registration’ (type ‘core show help pjsip send registration’ for other possible commands)

I agree: I incorrectly typed pjsip send registration while I should have typed pjsip send register.
Sorry for this.

On another hand, the issue I see is while doing I don’t see anything “sent over the wire” nor any error message displayed on screen: the only trace of something happening is a mysterious “(exp 17s)” implying something was done 17s ago.

In my testing, I added a “outbound_proxy=” line in my registration section. Removing it changed the whole result as my trunk could at last come up.
The point, IMHO, is that if anything prevent a REGISTER message to be sent, it should trigger some logging.

It normally does. I don’t know why it wouldn’t in your particular scenario, unless it’s some internal PJSIP thing that didn’t bubble up to Asterisk or produce a log message. Did you check the past log to see if something did come up?

It queues the REGISTER command. So no direct error should be visible. Does it generate the message “Re-register all queued” for you?

On another terminal I use sngrep to see if the register is really done and I see here it works. You could also enable debugging to see if the re-register is done. Otherwise there should be an entry in the logs.

I enabled “pjsip set logger on” before “pjsip send register ” and got nothing on screen (no SIP traffic nor error, warning or notice message.

If I can find time to do so, I’ll file an issue with all details.

On the case I worked on, SIP traffic became visible when I corrected my trunk settings. What surprised me, is the console silence.

Thanks for replying.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.