Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to GIT-18-e006d2d

...

Code Block
titleExample: Standard CHANNEL item examples
linenumberstrue
; Push a hangup handler subroutine existing at dialplan
; location default,s,1 onto the current channel
same => n,Set(CHANNEL(hangup_handler_push)=default,s,1)

; Set the current tonezone to Germany (de)
same => n,Set(CHANNEL(tonezone)=de)

; Set the allowed maximum number of forwarding attempts
same => n,Set(CHANNEL(max_forwards)=10)

; If this channel is ejected from its next bridge, and if
; the channel is not hung up, begin executing dialplan at
; location default,after-bridge,1
same => n,Set(CHANNEL(after_bridge_goto)=default,after-bridge,1)

; Log the current state of the channel
same => n,Log(NOTICE, This channel is: ${CHANNEL(state)})

The following channel variables are available as special built-in dialplan channel variables. These variables cannot be set or modified and are read-only.

  • CALLINGPRES - Caller ID presentation for incoming calls (PRI channels)
  • CALLINGANI2 - Caller ANI2 (PRI channels)
  • CALLINGTON - Caller Type of Number (PRI channels)
  • CALLINGTNS - Transit Network Selector (PRI channels)
  • EXTEN - Current extension
  • CONTEXT - Current context
  • PRIORITY - Current priority
  • CHANNEL - Current channel name
  • UNIQUEID - Current call unique identifier
  • HANGUPCAUSE - Asterisk cause of hangup (inbound/outbound)

Technology: PJSIP

Code Block
titleExample: PJSIP specific CHANNEL examples
linenumberstrue
; Log the current Call-ID
same => n,Log(NOTICE, ${CHANNEL(pjsip,call-id)})

; Log the destination address of the audio stream
same => n,Log(NOTICE, ${CHANNEL(rtp,dest)})

; Store the round-trip time associated with a
; video stream in the CDR field video-rtt
same => n,Set(CDR(video-rtt)=${CHANNEL(rtcp,rtt,video)})

...

This documentation was imported from Asterisk Version GIT-18-721026fe006d2d