Asterisk func channel

Synopsis:

CHANNEL(item)

Description:

Gets/set various pieces of information about the channel. (New in 1.4)

item may be one of the following:
Read/write Item Description
R/O audioreadformat format currently being read
R/O audionativeformat format used natively for audio
R/O audiowriteformat format currently being written
R/W callgroup call groups for call pickup
R/O channeltype technology used for channel
R/W language language for sounds played
R/W musicclass class (from musiconhold.conf) for hold music
R/O state state for channel
R/W tonezone zone for indications played
R/O videonativeformat format used natively for video


Items available in 1.6:
Standard items (provided by all channel technologies) are:
Read/write Item Description
R/O audioreadformat format currently being read
R/O audionativeformat format used natively for audio
R/O audiowriteformat format currently being written
R/W callgroup call groups for call pickup
R/O channeltype technology used for channel
R/W language language for sounds played
R/W musicclass class (from musiconhold.conf) for hold music
R/W parkinglot parkinglot for parking
R/W rxgain set rxgain level on channel drivers that support it
R/O state state for channel
R/W tonezone zone for indications played
R/W txgain set txgain level on channel drivers that support it
R/O videonativeformat format used natively for video


chan_iax2 provides the following additional options:
Read/write Item Description
R/W osptoken Get or set the OSP token information for a call
R/O peerip Get the peer's ip address
R/O peername Get the peer's username


chan_sip provides the following additional options:
Read/write Item Description
R/O peerip Get the IP address of the peer
R/O recvip Get the source IP address of the peer
R/O from Get the URI from the From: header
R/O uri Get the URI from the Contact: header
R/O useragent Get the useragent
R/O peername Get the name of the peer
R/O t38passthrough 1 if T38 is offered or enabled in this channel, otherwise 0
R/O rtpqos * Get QOS information about the RTP stream
R/O rtpdest ** Get remote RTP destination information


*The option rtpqos takes two additional arguments:

Argument 1:
audio Get data about the audio stream
video Get data about the video stream
text Get data about the text stream
Argument 2:
local_ssrc Local SSRC (stream ID)
local_lostpackets Local lost packets
local_jitter Local calculated jitter
local_maxjitter Local calculated jitter (maximum)
local_minjitter Local calculated jitter (minimum)
local_normdevjitter Local calculated jitter (normal deviation)
local_stdevjitter Local calculated jitter (standard deviation)
local_count Number of received packets
remote_ssrc Remote SSRC (stream ID)
remote_lostpackets Remote lost packets
remote_jitter Remote reported jitter
remote_maxjitter Remote calculated jitter (maximum)
remote_minjitter Remote calculated jitter (minimum)
remote_normdevjitter Remote calculated jitter (normal deviation)
remote_stdevjitter Remote calculated jitter (standard deviation)
remote_count Number of transmitted packets
rtt Round trip time
maxrtt Round trip time (maximum)
minrtt Round trip time (minimum)
normdevrtt Round trip time (normal deviation)
stdevrtt Round trip time (standard deviation)
all All statistics (in a form suited to logging, but not for parsing)

See also: Asterisk RTCP

**The option rtpdest takes one additional argument:

Argument 1:
audio Get audio destination
video Get video destination

Notes

  • Those items marked R/W above may be both read and set.
  • *CLI> show function CHANNEL
  • Additional items may be available from the channel driver providing the channel; see its documentation for details.
  • Any item requested that is not available on the current channel will return an empty string.

Return value

Returns the resulting string.

Example

exten => s,1,Set(foo=${CHANNEL(channeltype)})
exten => s,1,Set(CHANNEL(callgroup)=g3)

See also



Synopsis:

CHANNEL(item)

Description:

Gets/set various pieces of information about the channel. (New in 1.4)

item may be one of the following:
Read/write Item Description
R/O audioreadformat format currently being read
R/O audionativeformat format used natively for audio
R/O audiowriteformat format currently being written
R/W callgroup call groups for call pickup
R/O channeltype technology used for channel
R/W language language for sounds played
R/W musicclass class (from musiconhold.conf) for hold music
R/O state state for channel
R/W tonezone zone for indications played
R/O videonativeformat format used natively for video


Items available in 1.6:
Standard items (provided by all channel technologies) are:
Read/write Item Description
R/O audioreadformat format currently being read
R/O audionativeformat format used natively for audio
R/O audiowriteformat format currently being written
R/W callgroup call groups for call pickup
R/O channeltype technology used for channel
R/W language language for sounds played
R/W musicclass class (from musiconhold.conf) for hold music
R/W parkinglot parkinglot for parking
R/W rxgain set rxgain level on channel drivers that support it
R/O state state for channel
R/W tonezone zone for indications played
R/W txgain set txgain level on channel drivers that support it
R/O videonativeformat format used natively for video


chan_iax2 provides the following additional options:
Read/write Item Description
R/W osptoken Get or set the OSP token information for a call
R/O peerip Get the peer's ip address
R/O peername Get the peer's username


chan_sip provides the following additional options:
Read/write Item Description
R/O peerip Get the IP address of the peer
R/O recvip Get the source IP address of the peer
R/O from Get the URI from the From: header
R/O uri Get the URI from the Contact: header
R/O useragent Get the useragent
R/O peername Get the name of the peer
R/O t38passthrough 1 if T38 is offered or enabled in this channel, otherwise 0
R/O rtpqos * Get QOS information about the RTP stream
R/O rtpdest ** Get remote RTP destination information


*The option rtpqos takes two additional arguments:

Argument 1:
audio Get data about the audio stream
video Get data about the video stream
text Get data about the text stream
Argument 2:
local_ssrc Local SSRC (stream ID)
local_lostpackets Local lost packets
local_jitter Local calculated jitter
local_maxjitter Local calculated jitter (maximum)
local_minjitter Local calculated jitter (minimum)
local_normdevjitter Local calculated jitter (normal deviation)
local_stdevjitter Local calculated jitter (standard deviation)
local_count Number of received packets
remote_ssrc Remote SSRC (stream ID)
remote_lostpackets Remote lost packets
remote_jitter Remote reported jitter
remote_maxjitter Remote calculated jitter (maximum)
remote_minjitter Remote calculated jitter (minimum)
remote_normdevjitter Remote calculated jitter (normal deviation)
remote_stdevjitter Remote calculated jitter (standard deviation)
remote_count Number of transmitted packets
rtt Round trip time
maxrtt Round trip time (maximum)
minrtt Round trip time (minimum)
normdevrtt Round trip time (normal deviation)
stdevrtt Round trip time (standard deviation)
all All statistics (in a form suited to logging, but not for parsing)

See also: Asterisk RTCP

**The option rtpdest takes one additional argument:

Argument 1:
audio Get audio destination
video Get video destination

Notes

  • Those items marked R/W above may be both read and set.
  • *CLI> show function CHANNEL
  • Additional items may be available from the channel driver providing the channel; see its documentation for details.
  • Any item requested that is not available on the current channel will return an empty string.

Return value

Returns the resulting string.

Example

exten => s,1,Set(foo=${CHANNEL(channeltype)})
exten => s,1,Set(CHANNEL(callgroup)=g3)

See also



Created by: murf, Last modification: Thu 23 of Sep, 2010 (13:21 UTC) by JustRumours
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+