Send a sip notify to AMI or CLI

I’m trying to find a starting point to sending a custom sip notify via the command line either with asterisk -rx or via AMI. I need to send an XML document to a phone for a configuration change.

Any help or direction on a decent novice guide to this would be appreciated. Thanks.

If using chan_sip have a look at the sip_notify.conf file. You can set the content type / message and send it from the CLI with:

asterisk*CLI> sip notify 
Usage: sip notify <type> <peer> [<peer>...]

There is an AMI action as well.
I imagine the process is very similar for pjsip.

chan_sip here. I need a custom/dynamic payload, so sip_notify.conf isn’t going to cut it. I’ve never touched AMI. I’d love to be able to insert the payload like:
sip notify “content” peer