<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2172/18/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL">Asterisk 11 Function_CHANNEL</a></h2>
<h4>Page <b>added</b> by <a href="https://wiki.asterisk.org/wiki/display/~wikibot">Wiki Bot</a>
</h4>
<br/>
<div class="notificationGreySide">
<h1><a name="Asterisk11Function_CHANNEL-CHANNEL%28%29"></a>CHANNEL()</h1>
<h3><a name="Asterisk11Function_CHANNEL-Synopsis"></a>Synopsis</h3>
<p>Gets/sets various pieces of information about the channel.</p>
<h3><a name="Asterisk11Function_CHANNEL-Description"></a>Description</h3>
<p>Gets/sets various pieces of information about the channel, additional <em>item</em> may be available from the channel driver; see its documentation for details. Any <em>item</em> requested that is not available on the current channel will return an empty string.</p>
<h3><a name="Asterisk11Function_CHANNEL-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>CHANNEL(item)</pre>
</div></div>
<h5><a name="Asterisk11Function_CHANNEL-Arguments"></a>Arguments</h5>
<ul>
        <li>item - Standard items (provided by all channel technologies) are:
        <ul>
                <li>audioreadformat - R/O format currently being read.</li>
                <li>audionativeformat - R/O format used natively for audio.</li>
                <li>audiowriteformat - R/O format currently being written.</li>
                <li>callgroup - R/W call groups for call pickup.</li>
                <li>pickupgroup - R/W call groups for call pickup.</li>
                <li>channeltype - R/O technology used for channel.</li>
                <li>checkhangup - R/O Whether the channel is hanging up (1/0)</li>
                <li>hangup_handler_pop - W/O Replace the most recently added hangup handler with a new hangup handler on the channel if supplied. The assigned string is passed to the Gosub application when the channel is hung up. Any optionally omitted context and exten are supplied by the channel pushing the handler before it is pushed.</li>
                <li>hangup_handler_push - W/O Push a hangup handler onto the channel hangup handler stack. The assigned string is passed to the Gosub application when the channel is hung up. Any optionally omitted context and exten are supplied by the channel pushing the handler before it is pushed.</li>
                <li>hangup_handler_wipe - W/O Wipe the entire hangup handler stack and replace with a new hangup handler on the channel if supplied. The assigned string is passed to the Gosub application when the channel is hung up. Any optionally omitted context and exten are supplied by the channel pushing the handler before it is pushed.</li>
                <li>language - R/W language for sounds played.</li>
                <li>musicclass - R/W class (from musiconhold.conf) for hold music.</li>
                <li>name - The name of the channel</li>
                <li>parkinglot - R/W parkinglot for parking.</li>
                <li>rxgain - R/W set rxgain level on channel drivers that support it.</li>
                <li>secure_bridge_signaling - Whether or not channels bridged to this channel require secure signaling</li>
                <li>secure_bridge_media - Whether or not channels bridged to this channel require secure media</li>
                <li>state - R/O state for channel</li>
                <li>tonezone - R/W zone for indications played</li>
                <li>transfercapability - R/W ISDN Transfer Capability, one of:
                <ul>
                        <li>SPEECH</li>
                        <li>DIGITAL</li>
                        <li>RESTRICTED_DIGITAL</li>
                        <li>3K1AUDIO</li>
                        <li>DIGITAL_W_TONES</li>
                        <li>VIDEO</li>
                </ul>
                </li>
                <li>txgain - R/W set txgain level on channel drivers that support it.</li>
                <li>videonativeformat - R/O format used natively for video</li>
                <li>trace - R/W whether or not context tracing is enabled, only available <b>if CHANNEL_TRACE is defined</b>.chan_sip provides the following additional options:</li>
                <li>peerip - R/O Get the IP address of the peer.</li>
                <li>recvip - R/O Get the source IP address of the peer.</li>
                <li>from - R/O Get the URI from the From: header.</li>
                <li>uri - R/O Get the URI from the Contact: header.</li>
                <li>useragent - R/O Get the useragent.</li>
                <li>peername - R/O Get the name of the peer.</li>
                <li>t38passthrough - R/O <tt>1</tt> if T38 is offered or enabled in this channel, otherwise <tt>0</tt></li>
                <li>rtpqos - R/O Get QOS information about the RTP streamThis option takes two additional arguments:Argument 1:<tt>audio</tt> Get data about the audio stream{{video}} Get data about the video stream{{text}} Get data about the text streamArgument 2:<tt>local_ssrc</tt> Local SSRC (stream ID)<tt>local_lostpackets</tt> Local lost packets{{local_jitter}} Local calculated jitter{{local_maxjitter}} Local calculated jitter (maximum)<tt>local_minjitter</tt> Local calculated jitter (minimum)<tt>local_normdevjitter}}Local calculated jitter (normal deviation){{local_stdevjitter</tt> Local calculated jitter (standard deviation)<tt>local_count</tt> Number of received packets{{remote_ssrc}} Remote SSRC (stream ID)<tt>remote_lostpackets}}Remote lost packets{{remote_jitter</tt> Remote reported jitter{{remote_maxjitter}} Remote calculated jitter (maximum)<tt>remote_minjitter</tt> Remote calculated jitter (minimum)<tt>remote_normdevjitter}}Remote calculated jitter (normal deviation){{remote_stdevjitter}}Remote calculated jitter (standard deviation){{remote_count</tt> Number of transmitted packets{{rtt}} Round trip time{{maxrtt}} Round trip time (maximum)<tt>minrtt</tt> Round trip time (minimum)<tt>normdevrtt</tt> Round trip time (normal deviation)<tt>stdevrtt</tt> Round trip time (standard deviation)<tt>all</tt> All statistics (in a form suited to logging, but not for parsing)</li>
                <li>rtpdest - R/O Get remote RTP destination information.This option takes one additional argument:Argument 1:<tt>audio</tt> Get audio destination{{video}} Get video destination{{text}} Get text destinationchan_iax2 provides the following additional options:</li>
                <li>peerip - R/O Get the peer's ip address.</li>
                <li>peername - R/O Get the peer's username.chan_dahdi provides the following additional options:</li>
                <li>dahdi_channel - R/O DAHDI channel related to this channel.</li>
                <li>dahdi_span - R/O DAHDI span related to this channel.</li>
                <li>dahdi_type - R/O DAHDI channel type, one of:
                <ul>
                        <li>analog</li>
                        <li>mfc/r2</li>
                        <li>pri</li>
                        <li>pseudo</li>
                        <li>ss7</li>
                </ul>
                </li>
                <li>keypad_digits - R/O PRI Keypad digits that came in with the SETUP message.</li>
                <li>reversecharge - R/O PRI Reverse Charging Indication, one of:
                <ul>
                        <li>-1 - None</li>
                        <li>1 - Reverse Charging Requested</li>
                </ul>
                </li>
                <li>no_media_path - R/O PRI Nonzero if the channel has no B channel. The channel is either on hold or a call waiting call.</li>
                <li>buffers - W/O Change the channel's buffer policy (for the current call only)This option takes two arguments:Number of buffers,Buffer policy being one of:<tt>full</tt><tt>immediate</tt><tt>half</tt></li>
                <li>echocan_mode - W/O Change the configuration of the active echo canceller on the channel (if any), for the current call only.Possible values are:{{on}}Normal mode (the echo canceller is actually reinitalized){{off}}Disabled{{fax}}FAX/data mode (NLP disabled if possible, otherwise completely disabled){{voice}}Voice mode (returns from FAX mode, reverting the changes that were made)chan_ooh323 provides the following additional options:</li>
                <li>faxdetect - Fax Detect <span class="error">[R/W]</span>Returns 0 or 1Write yes or no</li>
                <li>t38support - t38support <span class="error">[R/W]</span>Returns 0 or 1Write yes or no</li>
                <li>h323id - Returns h323id <a href="/wiki/pages/createpage.action?spaceKey=AST&title=R&linkCreation=true&fromPageId=20187163" class="createlink">R</a></li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk11Function_CHANNEL-ImportVersion"></a>Import Version</h3>
<p>This documentation was imported from Asterisk Version SVN-trunk-r370322</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>