Add dialplan application PJSIPNOTIFY to send either pre-configured
NOTIFY messages from pjsip_notify.conf or with headers defined in
dialplan.
Also adds the ability to send pre-configured NOTIFY commands to a
channel via the CLI.
Resolves: #799
UserNote: A new dialplan application PJSIPNotify is now available
which can send SIP NOTIFY requests from the dialplan.
The pjsip send notify CLI command has also been enhanced to allow
sending NOTIFY messages to a specific channel. Syntax:
pjsip send notify <option> channel <channel>
pull/838/head
Mike Bradeen10 months agocommitted byasterisk-org-access-app[bot]
Send a NOTIFY to either an arbitrary URI, or inside a SIP dialog.
</synopsis>
<syntax>
<parametername="to"required="false">
<para>Abritrary URI to which to send the NOTIFY. If none is specified, send inside
the SIP dialog for the current channel.</para>
</parameter>
<parametername="content"required="true">
<para>Either an option pre-configured in pjsip_notify.conf or a list of headers and body content to send in the NOTIFY.</para>
</parameter>
</syntax>
<description>
<para>
Sends a NOTIFY to a specified URI, or if none provided, within the current SIP dialog for the
current channel. The content can either be set to either an entry configured in pjsip_notify.conf
or specified as a list of key value pairs.
</para>
<warning><para>
To send a NOTIFY to a specified URI, a default_outbound_endpoint must be configured. This
endpoint determines the message contact.
</para></warning>
<para>
</para>
<exampletitle="Send a NOTIFY with Event and X-Data headers in current dialog">
same = n,PJSIPNotify(,&Event=Test&X-Data=Fun)
</example>
<exampletitle="Send a preconfigured NOTIFY force-answer defined in pjsip_notify.conf in current dialog">
same = n,PJSIPNotify(,force-answer)
</example>
<exampletitle="Send a NOTIFY to <sip:bob@127.0.0.1:5260> with Test Event and X-Data headers">
same = n,PJSIPNotify(<sip:bob@127.0.0.1:5260>,&Event=Test&X-Data=Fun)
</example>
<exampletitle="Send a NOTIFY to <sip:bob@127.0.0.1:5260> with Custom Event and message body">
same = n,PJSIPNotify(<sip:bob@127.0.0.1:5260>,&Event=Custom&Content-type=application/voicemail&Content=check-messages&Content=)
</example>
</description>
</application>
<managername="PJSIPHangup"language="en_US">
<synopsis>
Hangup an incoming PJSIP channel with a SIP response code