mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-04 20:33:53 +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>
This commit is contained in:
committed by
asterisk-org-access-app[bot]
parent
2328a0ab3a
commit
b2455b2732
@@ -828,3 +828,53 @@ exten => _X.,40000(ani),NoOp(ANI: ${EXTEN})
|
||||
; "core show functions" will list all dialplan functions
|
||||
; "core show function <COMMAND>" will show you more information about
|
||||
; one function. Remember that function names are UPPER CASE.
|
||||
|
||||
; Examples using PJSIPNotify application.
|
||||
;[generate-notify]
|
||||
;
|
||||
; Send a NOTIFY with the following headers inside the SIP dialog for the current channel:
|
||||
;
|
||||
; Event: Test
|
||||
; X-Data: Fun
|
||||
;
|
||||
;exten => 6880,1,noOp()
|
||||
; same => n,Answer()
|
||||
; same => n,PJSIPNotify(,&Event=Test&X-Data=Fun)
|
||||
; same => n,Wait(1)
|
||||
; same => n,Hangup()
|
||||
;
|
||||
; Send a NOTIFY with the following headers to bob's custom uri. This requries a
|
||||
; default outbound endpoint to be configured in pjsip.conf.
|
||||
;
|
||||
; Event: Test
|
||||
; X-Data: Over
|
||||
;
|
||||
;exten => 6881,1,noOp()
|
||||
; same => n,Answer()
|
||||
; same => n,PJSIPNotify(<sip:bob@127.0.0.1:5260>,&Event=Test&X-Data=Over)
|
||||
; same => n,Wait(1)
|
||||
; same => n,Hangup()
|
||||
;
|
||||
; Send a NOTIFY with the the custom headers defined in pjsip_notify.conf under
|
||||
; 'custom-notify-1' inside the SIP dialog for the current channel.
|
||||
;
|
||||
;exten => 6882,1,noOp()
|
||||
; same => n,Answer()
|
||||
; same => n,PJSIPNotify(,custom-notify-1)
|
||||
; same => n,Wait(1)
|
||||
; same => n,Hangup()
|
||||
; Send a NOTIFY with the following headers and body to bob's custom uri. This
|
||||
; requries a default outbound endpoint to be configured in pjsip.conf.
|
||||
;
|
||||
; Event: Custom
|
||||
;
|
||||
; Content-Type: application/voicemail
|
||||
; Content-Length: 14
|
||||
;
|
||||
; check-messages
|
||||
;
|
||||
;exten => 6882,1,noOp()
|
||||
; same => n,Answer()
|
||||
; same => n,PJSIPNotify(,&Event=Custom&Content-type=application/voicemail&Content=check-messages&Content=)
|
||||
; same => n,Wait(1)
|
||||
; same => n,Hangup()
|
||||
|
||||
Reference in New Issue
Block a user