Pjsip send notify to a uri

This is actually an Asterisk question. I had posted over on that community 2 years ago, and received an answer.

But I just got around to trying to implement that answer and it is not working. I added on to my thread over there, but as this community gets more action, I thought I would ask here also.

Asterisk is supposed to support sending a sip notify to a specific URI. But I cannot get it to work.

Has anyone else tried this? When I issue the command, I see nothing in sngrep.

The syntax that was posted seems valid as it gives no error.

pjsip send notify reboot uri sip:[email protected]<ip addr>

That’s an asynchronous operation. If you open the Asterisk console and do it, does it present you a message with further detail?

1 Like

Bad testing is bad :frowning:

I’m so used to doing things with rasterisk -x that I didn’t even think about that.

With the port, just in case :slight_smile:

The “default_outbound_endpoint” option has to be set in the global section[1] to an endpoint to be used for them.

[1] wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip


Looks like freepbx doesn’t have a setting for this, but you could do it by enabling the anonymous endpoint (enable SIP Guests in Asterisk SIP Settings) and then putting default_outbound_endpoint=anonymous into /etc/asterisk/pjsip_custom_post.conf.

1 Like

So that fixed it by choosing a random endpoint as the default. Obviously, I do not want it in pjsip_custom.conf long term. this was a quick test.


Is there a better good practice to use for that?

Not particularly fond of having that enabled.

I find it useful for purposes like this or calling to various SIP URIs from the dialplan.

For inbound traffic that hits it, I got tired of seeing the noise of internet scanners and gave it a dead-end context. I’m using it for outbound purposes only.

Unless more discussion follows on, for now, I have just added the first extension on the PBX as the default endpoint.

I just tried this setup and got

Unable to find notify type ‘reboot’


Unable to find notify type ‘restart-yealink’

because restart-yealink is my own custom notify command to not conflict with the built in EPM ones.

1 Like

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