How to send SIP Notify to all connected ATA devices?

Hi all, I am fairly new to Asterisk so please be gentle :smile:

I have been asked to set up Asterisk to send out a SIP Notify message once a day, to reboot attached ATA devices (its a temporary measure whilst a bug is fixed in the devices).

Here are my instructions…

About restart ATA by SIP NOTIFY message, when server send NOTIFY message which include header “Event: check-sync;reboot=true”, ATA will reboot: For examples, SIP NOTIFY message: NOTIFY sip:10002@;transport=UDP SIP/2.0 Via: SIP/2.0/UDP;branch=z9hG4bK-d8754z-016ba529cb3ce414-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:10002@> To: <sip:10002@> From: <sip:10002@>;tag=86598310 Call-ID: ZjYyODE1NDRiNjY2ZGI0YzcyMDk1YjdjMzZhOGEzY2I. CSeq: 1 NOTIFY Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE Supported: replaces User-Agent: Asterisk Event: check-sync;reboot=true Content-Length: 0

The trouble is I don’t know how to do this! Asterisk is using realtime sip, in a sip_buddies database table. Each ATA has its own sip numbers (one for fxs and one for fxo). I have no idea how to get the ip address?

Please any help would be greatly appreciated!!

There is no explicit mechanism to send a SIP NOTIFY to all SIP devices connected to either chan_sip or res_pjsip. Both provide a CLI command and AMI action to do it on an individual basis though. If you have a list you can call it for each device.

The CLI commands are:
sip notify
pjsip send notify

The AMI actions are:

Thankyou Joshua. So if I understand you correctly, there is no way to send out a ‘mass’ sip notify? It has to be done one by one?

Are there any plugins which can do it? The developer of the ATA device must have given us incorrect information :confused:

Not via Asterisk, no. It doesn’t provide such a CLI tool or AMI action.

Maybe the builder of the ATA device wants to contribute a patch? :smile:

Ok thanks! I’m glad its decided at least :smile: