123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Asterisk Project : Asterisk 13 Function_CHANNEL</title>
- <link rel="stylesheet" href="styles/site.css" type="text/css" />
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body class="theme-default aui-theme-default">
- <div id="page">
- <div id="main" class="aui-page-panel">
- <div id="main-header">
- <div id="breadcrumb-section">
- <ol id="breadcrumbs">
- <li class="first">
- <span><a href="index.html">Asterisk Project</a></span>
- </li>
- <li>
- <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
- </li>
- <li>
- <span><a href="Asterisk-13-Dialplan-Functions_29394287.html">Asterisk 13 Dialplan Functions</a></span>
- </li>
- </ol>
- </div>
- <h1 id="title-heading" class="pagetitle">
- <span id="title-text">
- Asterisk Project : Asterisk 13 Function_CHANNEL
- </span>
- </h1>
- </div>
- <div id="content" class="view">
- <div class="page-metadata">
-
-
-
-
-
-
-
- Created by <span class='author'> wikibot</span> on Aug 08, 2014
- </div>
- <div id="main-content" class="wiki-content group">
- <h1 id="Asterisk13Function_CHANNEL-CHANNEL()">CHANNEL()</h1>
- <h3 id="Asterisk13Function_CHANNEL-Synopsis">Synopsis</h3>
- <p>Gets/sets various pieces of information about the channel.</p>
- <h3 id="Asterisk13Function_CHANNEL-Description">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 id="Asterisk13Function_CHANNEL-Syntax">Syntax</h3>
- <div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
- <pre>CHANNEL(item)</pre>
- </div></div>
- <h5 id="Asterisk13Function_CHANNEL-Arguments">Arguments</h5>
- <ul>
- <li><code>item</code> - Standard items (provided by all channel technologies) are:
- <ul>
- <li><code>amaflags</code> - R/W the Automatic Message Accounting (AMA) flags on the channel. When read from a channel, the integer value will always be returned. When written to a channel, both the string format or integer value is accepted.
- <ul>
- <li><code>1</code> - OMIT</li>
- <li><code>2</code> - BILLING</li>
- <li><code>3</code> - DOCUMENTATION</li>
- </ul>
- </li>
- <li><code>accountcode</code> - R/W the channel's account code.</li>
- <li><code>audioreadformat</code> - R/O format currently being read.</li>
- <li><code>audionativeformat</code> - R/O format used natively for audio.</li>
- <li><code>audiowriteformat</code> - R/O format currently being written.</li>
- <li><code>dtmf_features</code> - R/W The channel's DTMF bridge features. May include one or more of 'T' 'K' 'H' 'W' and 'X' in a similar manner to options in the <code>Dial</code> application. When setting it, the features string must be all upper case.</li>
- <li><code>callgroup</code> - R/W numeric call pickup groups that this channel is a member.</li>
- <li><code>pickupgroup</code> - R/W numeric call pickup groups this channel can pickup.</li>
- <li><code>namedcallgroup</code> - R/W named call pickup groups that this channel is a member.</li>
- <li><code>namedpickupgroup</code> - R/W named call pickup groups this channel can pickup.</li>
- <li><code>channeltype</code> - R/O technology used for channel.</li>
- <li><code>checkhangup</code> - R/O Whether the channel is hanging up (1/0)</li>
- <li><code>after_bridge_goto</code> - R/W the parseable goto string indicating where the channel is expected to return to in the PBX after exiting the next bridge it joins on the condition that it doesn't hang up. The parseable goto string uses the same syntax as the <code>Goto</code> application.</li>
- <li><code>hangup_handler_pop</code> - 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><code>hangup_handler_push</code> - 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><code>hangup_handler_wipe</code> - 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><code>language</code> - R/W language for sounds played.</li>
- <li><code>musicclass</code> - R/W class (from musiconhold.conf) for hold music.</li>
- <li><code>name</code> - The name of the channel</li>
- <li><code>parkinglot</code> - R/W parkinglot for parking.</li>
- <li><code>rxgain</code> - R/W set rxgain level on channel drivers that support it.</li>
- <li><code>secure_bridge_signaling</code> - Whether or not channels bridged to this channel require secure signaling</li>
- <li><code>secure_bridge_media</code> - Whether or not channels bridged to this channel require secure media</li>
- <li><code>state</code> - R/O state for channel</li>
- <li><code>tonezone</code> - R/W zone for indications played</li>
- <li><code>transfercapability</code> - R/W ISDN Transfer Capability, one of:
- <ul>
- <li><code>SPEECH</code></li>
- <li><code>DIGITAL</code></li>
- <li><code>RESTRICTED_DIGITAL</code></li>
- <li><code>3K1AUDIO</code></li>
- <li><code>DIGITAL_W_TONES</code></li>
- <li><code>VIDEO</code></li>
- </ul>
- </li>
- <li><code>txgain</code> - R/W set txgain level on channel drivers that support it.</li>
- <li><code>videonativeformat</code> - R/O format used natively for video</li>
- <li><code>trace</code> - R/W whether or not context tracing is enabled, only available <strong>if CHANNEL_TRACE is defined</strong>.<br />
- chan_sip provides the following additional options:</li>
- <li><code>peerip</code> - R/O Get the IP address of the peer.</li>
- <li><code>recvip</code> - R/O Get the source IP address of the peer.</li>
- <li><code>recvport</code> - R/O Get the source port of the peer.</li>
- <li><code>from</code> - R/O Get the URI from the From: header.</li>
- <li><code>uri</code> - R/O Get the URI from the Contact: header.</li>
- <li><code>useragent</code> - R/O Get the useragent.</li>
- <li><code>peername</code> - R/O Get the name of the peer.</li>
- <li><code>t38passthrough</code> - R/O <code>1</code> if T38 is offered or enabled in this channel, otherwise <code>0</code></li>
- <li><code>rtpqos</code> - R/O Get QOS information about the RTP stream<br />
- This option takes two additional arguments:<br />
- Argument 1:<br />
- <code>audio</code> Get data about the audio stream<br />
- <code>video</code> Get data about the video stream<br />
- <code>text</code> Get data about the text stream<br />
- Argument 2:<br />
- <code>local_ssrc</code> Local SSRC (stream ID)<br />
- <code>local_lostpackets</code> Local lost packets<br />
- <code>local_jitter</code> Local calculated jitter<br />
- <code>local_maxjitter</code> Local calculated jitter (maximum)<br />
- <code>local_minjitter</code> Local calculated jitter (minimum)<br />
- {{local_normdevjitter}}Local calculated jitter (normal deviation)<br />
- <code>local_stdevjitter</code> Local calculated jitter (standard deviation)<br />
- <code>local_count</code> Number of received packets<br />
- <code>remote_ssrc</code> Remote SSRC (stream ID)<br />
- {{remote_lostpackets}}Remote lost packets<br />
- <code>remote_jitter</code> Remote reported jitter<br />
- <code>remote_maxjitter</code> Remote calculated jitter (maximum)<br />
- <code>remote_minjitter</code> Remote calculated jitter (minimum)<br />
- {{remote_normdevjitter}}Remote calculated jitter (normal deviation)<br />
- {{remote_stdevjitter}}Remote calculated jitter (standard deviation)<br />
- <code>remote_count</code> Number of transmitted packets<br />
- <code>rtt</code> Round trip time<br />
- <code>maxrtt</code> Round trip time (maximum)<br />
- <code>minrtt</code> Round trip time (minimum)<br />
- <code>normdevrtt</code> Round trip time (normal deviation)<br />
- <code>stdevrtt</code> Round trip time (standard deviation)<br />
- <code>all</code> All statistics (in a form suited to logging, but not for parsing)</li>
- <li><code>rtpdest</code> - R/O Get remote RTP destination information.<br />
- This option takes one additional argument:<br />
- Argument 1:<br />
- <code>audio</code> Get audio destination<br />
- <code>video</code> Get video destination<br />
- <code>text</code> Get text destination<br />
- Defaults to <code>audio</code> if unspecified.</li>
- <li><code>rtpsource</code> - R/O Get source RTP destination information.<br />
- This option takes one additional argument:<br />
- Argument 1:<br />
- <code>audio</code> Get audio destination<br />
- <code>video</code> Get video destination<br />
- <code>text</code> Get text destination<br />
- Defaults to <code>audio</code> if unspecified.</li>
- <li><strong>Technology: PJSIP</strong>
- <ul>
- <li><code>rtp</code> - R/O Retrieve media related information.
- <ul>
- <li><code>type</code> - When <em>rtp</em> is specified, the <code>type</code> parameter must be provided. It specifies which RTP parameter to read.
- <ul>
- <li><code>src</code> - Retrieve the local address for RTP.</li>
- <li><code>dest</code> - Retrieve the remote address for RTP.</li>
- <li><code>direct</code> - If direct media is enabled, this address is the remote address used for RTP.</li>
- <li><code>secure</code> - Whether or not the media stream is encrypted.
- <ul>
- <li><code>0</code> - The media stream is not encrypted.</li>
- <li><code>1</code> - The media stream is encrypted.</li>
- </ul>
- </li>
- <li><code>hold</code> - Whether or not the media stream is currently restricted due to a call hold.
- <ul>
- <li><code>0</code> - The media stream is not held.</li>
- <li><code>1</code> - The media stream is held.</li>
- </ul>
- </li>
- </ul>
- </li>
- <li><code>media_type</code> - When <em>rtp</em> is specified, the <code>media_type</code> parameter may be provided. It specifies which media stream the chosen RTP parameter should be retrieved from.
- <ul>
- <li><code>audio</code> - Retrieve information from the audio media stream.
- <div class="aui-message hint shadowed information-macro">
- <p class="title">Note</p>
- <span class="aui-icon icon-hint">Icon</span>
- <div class="message-content">
-
- <p>If not specified, <code>audio</code> is used by default.</p>
- </div>
- </div>
- </li>
- <li><code>video</code> - Retrieve information from the video media stream.</li>
- </ul>
- </li>
- </ul>
- </li>
- <li><code>rtcp</code> - R/O Retrieve RTCP statistics.
- <ul>
- <li><code>statistic</code> - When <em>rtcp</em> is specified, the <code>statistic</code> parameter must be provided. It specifies which RTCP statistic parameter to read.
- <ul>
- <li><code>all</code> - Retrieve a summary of all RTCP statistics.<br />
- The following data items are returned in a semi-colon delineated list:
- <ul>
- <li><code>ssrc</code> - Our Synchronization Source identifier</li>
- <li><code>themssrc</code> - Their Synchronization Source identifier</li>
- <li><code>lp</code> - Our lost packet count</li>
- <li><code>rxjitter</code> - Received packet jitter</li>
- <li><code>rxcount</code> - Received packet count</li>
- <li><code>txjitter</code> - Transmitted packet jitter</li>
- <li><code>txcount</code> - Transmitted packet count</li>
- <li><code>rlp</code> - Remote lost packet count</li>
- <li><code>rtt</code> - Round trip time</li>
- </ul>
- </li>
- <li><code>all_jitter</code> - Retrieve a summary of all RTCP Jitter statistics.<br />
- The following data items are returned in a semi-colon delineated list:
- <ul>
- <li><code>minrxjitter</code> - Our minimum jitter</li>
- <li><code>maxrxjitter</code> - Our max jitter</li>
- <li><code>avgrxjitter</code> - Our average jitter</li>
- <li><code>stdevrxjitter</code> - Our jitter standard deviation</li>
- <li><code>reported_minjitter</code> - Their minimum jitter</li>
- <li><code>reported_maxjitter</code> - Their max jitter</li>
- <li><code>reported_avgjitter</code> - Their average jitter</li>
- <li><code>reported_stdevjitter</code> - Their jitter standard deviation</li>
- </ul>
- </li>
- <li><code>all_loss</code> - Retrieve a summary of all RTCP packet loss statistics.<br />
- The following data items are returned in a semi-colon delineated list:
- <ul>
- <li><code>minrxlost</code> - Our minimum lost packets</li>
- <li><code>maxrxlost</code> - Our max lost packets</li>
- <li><code>avgrxlost</code> - Our average lost packets</li>
- <li><code>stdevrxlost</code> - Our lost packets standard deviation</li>
- <li><code>reported_minlost</code> - Their minimum lost packets</li>
- <li><code>reported_maxlost</code> - Their max lost packets</li>
- <li><code>reported_avglost</code> - Their average lost packets</li>
- <li><code>reported_stdevlost</code> - Their lost packets standard deviation</li>
- </ul>
- </li>
- <li><code>all_rtt</code> - Retrieve a summary of all RTCP round trip time information.<br />
- The following data items are returned in a semi-colon delineated list:
- <ul>
- <li><code>minrtt</code> - Minimum round trip time</li>
- <li><code>maxrtt</code> - Maximum round trip time</li>
- <li><code>avgrtt</code> - Average round trip time</li>
- <li><code>stdevrtt</code> - Standard deviation round trip time</li>
- </ul>
- </li>
- <li><code>txcount</code> - Transmitted packet count</li>
- <li><code>rxcount</code> - Received packet count</li>
- <li><code>txjitter</code> - Transmitted packet jitter</li>
- <li><code>rxjitter</code> - Received packet jitter</li>
- <li><code>remote_maxjitter</code> - Their max jitter</li>
- <li><code>remote_minjitter</code> - Their minimum jitter</li>
- <li><code>remote_normdevjitter</code> - Their average jitter</li>
- <li><code>remote_stdevjitter</code> - Their jitter standard deviation</li>
- <li><code>local_maxjitter</code> - Our max jitter</li>
- <li><code>local_minjitter</code> - Our minimum jitter</li>
- <li><code>local_normdevjitter</code> - Our average jitter</li>
- <li><code>local_stdevjitter</code> - Our jitter standard deviation</li>
- <li><code>txploss</code> - Transmitted packet loss</li>
- <li><code>rxploss</code> - Received packet loss</li>
- <li><code>remote_maxrxploss</code> - Their max lost packets</li>
- <li><code>remote_minrxploss</code> - Their minimum lost packets</li>
- <li><code>remote_normdevrxploss</code> - Their average lost packets</li>
- <li><code>remote_stdevrxploss</code> - Their lost packets standard deviation</li>
- <li><code>local_maxrxploss</code> - Our max lost packets</li>
- <li><code>local_minrxploss</code> - Our minimum lost packets</li>
- <li><code>local_normdevrxploss</code> - Our average lost packets</li>
- <li><code>local_stdevrxploss</code> - Our lost packets standard deviation</li>
- <li><code>rtt</code> - Round trip time</li>
- <li><code>maxrtt</code> - Maximum round trip time</li>
- <li><code>minrtt</code> - Minimum round trip time</li>
- <li><code>normdevrtt</code> - Average round trip time</li>
- <li><code>stdevrtt</code> - Standard deviation round trip time</li>
- <li><code>local_ssrc</code> - Our Synchronization Source identifier</li>
- <li><code>remote_ssrc</code> - Their Synchronization Source identifier</li>
- </ul>
- </li>
- <li><code>media_type</code> - When <em>rtcp</em> is specified, the <code>media_type</code> parameter may be provided. It specifies which media stream the chosen RTCP parameter should be retrieved from.
- <ul>
- <li><code>audio</code> - Retrieve information from the audio media stream.
- <div class="aui-message hint shadowed information-macro">
- <p class="title">Note</p>
- <span class="aui-icon icon-hint">Icon</span>
- <div class="message-content">
-
- <p>If not specified, <code>audio</code> is used by default.</p>
- </div>
- </div>
- </li>
- <li><code>video</code> - Retrieve information from the video media stream.</li>
- </ul>
- </li>
- </ul>
- </li>
- <li><code>endpoint</code> - R/O The name of the endpoint associated with this channel. Use the <em>PJSIP_ENDPOINT</em> function to obtain further endpoint related information.</li>
- <li><code>pjsip</code> - R/O Obtain information about the current PJSIP channel and its session.
- <ul>
- <li><code>type</code> - When <em>pjsip</em> is specified, the <code>type</code> parameter must be provided. It specifies which signalling parameter to read.
- <ul>
- <li><code>secure</code> - Whether or not the signalling uses a secure transport.
- <ul>
- <li><code>0</code> - The signalling uses a non-secure transport.</li>
- <li><code>1</code> - The signalling uses a secure transport.</li>
- </ul>
- </li>
- <li><code>target_uri</code> - The request URI of the <code>INVITE</code> request associated with the creation of this channel.</li>
- <li><code>local_uri</code> - The local URI.</li>
- <li><code>remote_uri</code> - The remote URI.</li>
- <li><code>t38state</code> - The current state of any T.38 fax on this channel.
- <ul>
- <li><code>DISABLED</code> - T.38 faxing is disabled on this channel.</li>
- <li><code>LOCAL_REINVITE</code> - Asterisk has sent a <code>re-INVITE</code> to the remote end to initiate a T.38 fax.</li>
- <li><code>REMOTE_REINVITE</code> - The remote end has sent a <code>re-INVITE</code> to Asterisk to initiate a T.38 fax.</li>
- <li><code>ENABLED</code> - A T.38 fax session has been enabled.</li>
- <li><code>REJECTED</code> - A T.38 fax session was attempted but was rejected.</li>
- </ul>
- </li>
- <li><code>local_addr</code> - On inbound calls, the full IP address and port number that the <code>INVITE</code> request was received on. On outbound calls, the full IP address and port number that the <code>INVITE</code> request was transmitted from.</li>
- <li><code>remote_addr</code> - On inbound calls, the full IP address and port number that the <code>INVITE</code> request was received from. On outbound calls, the full IP address and port number that the <code>INVITE</code> request was transmitted to.<br />
- chan_iax2 provides the following additional options:</li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li><code>osptoken</code> - R/O Get the peer's osptoken.</li>
- <li><code>peerip</code> - R/O Get the peer's ip address.</li>
- <li><code>peername</code> - R/O Get the peer's username.</li>
- <li><code>secure_signaling</code> - R/O Get the if the IAX channel is secured.</li>
- <li><code>secure_media</code> - R/O Get the if the IAX channel is secured.<br />
- chan_dahdi provides the following additional options:</li>
- <li><code>dahdi_channel</code> - R/O DAHDI channel related to this channel.</li>
- <li><code>dahdi_span</code> - R/O DAHDI span related to this channel.</li>
- <li><code>dahdi_type</code> - R/O DAHDI channel type, one of:
- <ul>
- <li><code>analog</code></li>
- <li><code>mfc/r2</code></li>
- <li><code>pri</code></li>
- <li><code>pseudo</code></li>
- <li><code>ss7</code></li>
- </ul>
- </li>
- <li><code>keypad_digits</code> - R/O PRI Keypad digits that came in with the SETUP message.</li>
- <li><code>reversecharge</code> - R/O PRI Reverse Charging Indication, one of:
- <ul>
- <li><code>-1</code> - None</li>
- <li>{{ 1}} - Reverse Charging Requested</li>
- </ul>
- </li>
- <li><code>no_media_path</code> - R/O PRI Nonzero if the channel has no B channel. The channel is either on hold or a call waiting call.</li>
- <li><code>buffers</code> - W/O Change the channel's buffer policy (for the current call only)<br />
- This option takes two arguments:<br />
- Number of buffers,<br />
- Buffer policy being one of:<br />
- <code>full</code><br />
- <code>immediate</code><br />
- <code>half</code></li>
- <li><code>echocan_mode</code> - W/O Change the configuration of the active echo canceller on the channel (if any), for the current call only.<br />
- Possible values are:<br />
- {{on}}Normal mode (the echo canceller is actually reinitalized)<br />
- {{off}}Disabled<br />
- {{fax}}FAX/data mode (NLP disabled if possible, otherwise completely disabled)<br />
- {{voice}}Voice mode (returns from FAX mode, reverting the changes that were made)<br />
- chan_ooh323 provides the following additional options:</li>
- <li><code>faxdetect</code> - R/W Fax Detect<br />
- Returns 0 or 1<br />
- Write yes or no</li>
- <li><code>t38support</code> - R/W t38support<br />
- Returns 0 or 1<br />
- Write yes or no</li>
- <li><code>h323id_url</code> - R/0 Returns caller URL</li>
- <li><code>caller_h323id</code> - R/0 Returns caller h323id</li>
- <li><code>caller_dialeddigits</code> - R/0 Returns caller dialed digits</li>
- <li><code>caller_email</code> - R/0 Returns caller email</li>
- <li><code>callee_email</code> - R/0 Returns callee email</li>
- <li><code>callee_dialeddigits</code> - R/0 Returns callee dialed digits</li>
- <li><code>caller_url</code> - R/0 Returns caller URL</li>
- </ul>
- </li>
- </ul>
- <h3 id="Asterisk13Function_CHANNEL-SeeAlso">See Also</h3>
- <h3 id="Asterisk13Function_CHANNEL-ImportVersion">Import Version</h3>
- <p>This documentation was imported from Asterisk Version SVN-branch-13-r420538</p>
- </div>
-
-
- </div> </div>
- <div id="footer">
- <section class="footer-body">
- <p>Document generated by Confluence on Aug 11, 2014 13:46</p>
- </section>
- </div>
- </div> </body>
- </html>
|