Skip to content

PJSIPNotify()

Synopsis

Send a NOTIFY to either an arbitrary URI, or inside a SIP dialog.

Description

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.

Warning

To send a NOTIFY to a specified URI, a default_outbound_endpoint must be configured. This endpoint determines the message contact.


Example: Send a NOTIFY with Event and X-Data headers in current dialog
same = n,PJSIPNotify(,&Event=Test&X-Data=Fun)
Example: Send a preconfigured NOTIFY force-answer defined in pjsip_notify.conf in current dialog
same = n,PJSIPNotify(,force-answer)
Example: Send a NOTIFY to with Test Event and X-Data headers
same = n,PJSIPNotify(<sip:bob@127.0.0.1:5260>,&Event=Test&X-Data=Fun)
Example: Send a NOTIFY to 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=)

Syntax

PJSIPNotify([to,]content)
Arguments
  • to - Abritrary URI to which to send the NOTIFY. If none is specified, send inside the SIP dialog for the current channel.

  • content - Either an option pre-configured in pjsip_notify.conf or a list of headers and body content to send in the NOTIFY.

Generated Version

This documentation was generated from Asterisk branch 22 using version GIT