Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to GIT-16-3746b1e

...

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)})
			

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)})
	

Syntax

No Format
CHANNEL(item)

...

This documentation was imported from Asterisk Version GIT-16-324a6093746b1e