mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
res_pjsip_notify: add dialplan application
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>
(cherry picked from commit e94c5f0d3b
)
This commit is contained in:
committed by
Asterisk Development Team
parent
3f670e6358
commit
40d7ce1084
@@ -55,6 +55,46 @@
|
||||
</description>
|
||||
</application>
|
||||
|
||||
<application name="PJSIPNotify" language="en_US">
|
||||
<synopsis>
|
||||
Send a NOTIFY to either an arbitrary URI, or inside a SIP dialog.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="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>
|
||||
<parameter name="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>
|
||||
<example title="Send a NOTIFY with Event and X-Data headers in current dialog">
|
||||
same = n,PJSIPNotify(,&Event=Test&X-Data=Fun)
|
||||
</example>
|
||||
<example title="Send a preconfigured NOTIFY force-answer defined in pjsip_notify.conf in current dialog">
|
||||
same = n,PJSIPNotify(,force-answer)
|
||||
</example>
|
||||
<example title="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>
|
||||
<example title="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>
|
||||
|
||||
<manager name="PJSIPHangup" language="en_US">
|
||||
<synopsis>
|
||||
Hangup an incoming PJSIP channel with a SIP response code
|
||||
|
Reference in New Issue
Block a user