<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2166/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+Standard+Channel+Variables">Asterisk Standard Channel Variables</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~mdavenport">Malcolm Davenport</a>
</h4>
<br/>
<h4>Changes (2)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-changed-lines" >There are a number of variables that are defined or read by Asterisk. Here is a <span class="diff-changed-words">list<span class="diff-added-chars"style="background-color: #dfd;">ing</span></span> of <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">them, as they apply to Asterisk 1.8.</span> <span class="diff-added-words"style="background-color: #dfd;">them. </span> More information is available in each application's help text. All these variables are in UPPER CASE only. <br></td></tr>
<tr><td class="diff-unchanged" > <br>Variables marked with a * are builtin functions and can't be set, only read in the dialplan. Writes to such variables are silently ignored. <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h3. Variables present in Asterisk 1.8 and forward: <br> <br></td></tr>
<tr><td class="diff-unchanged" >* $\{CDR(accountcode)\} * - Account code (if specified) <br>* $\{BLINDTRANSFER\} - The name of the channel on the other side of a blind transfer <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<p>There are a number of variables that are defined or read by Asterisk. Here is a listing of them. More information is available in each application's help text. All these variables are in UPPER CASE only.</p>
<p>Variables marked with a * are builtin functions and can't be set, only read in the dialplan. Writes to such variables are silently ignored.</p>
<h3><a name="AsteriskStandardChannelVariables-VariablespresentinAsterisk1.8andforward%3A"></a>Variables present in Asterisk 1.8 and forward:</h3>
<ul>
        <li>${CDR(accountcode)} * - Account code (if specified)</li>
        <li>${BLINDTRANSFER} - The name of the channel on the other side of a blind transfer</li>
        <li>${BRIDGEPEER} - Bridged peer</li>
        <li>${BRIDGEPVTCALLID} - Bridged peer PVT call ID (SIP Call ID if a SIP call)</li>
        <li>${CALLERID(ani)} * - Caller ANI (PRI channels)</li>
        <li>${CALLERID(ani2)} * - ANI2 (Info digits) also called Originating line information or OLI</li>
        <li>${CALLERID(all)} * - Caller ID</li>
        <li>${CALLERID(dnid)} * - Dialed Number Identifier</li>
        <li>${CALLERID(name)} * - Caller ID Name only</li>
        <li>${CALLERID(num)} * - Caller ID Number only</li>
        <li>${CALLERID(rdnis)} * - Redirected Dial Number ID Service</li>
        <li>${CALLINGANI2} * - Caller ANI2 (PRI channels)</li>
        <li>${CALLINGPRES} * - Caller ID presentation for incoming calls (PRI channels)</li>
        <li>${CALLINGTNS} * - Transit Network Selector (PRI channels)</li>
        <li>${CALLINGTON} * - Caller Type of Number (PRI channels)</li>
        <li>${CHANNEL} * - Current channel name</li>
        <li>${CONTEXT} * - Current context</li>
        <li>${DATETIME} * - Current date time in the format: DDMMYYYY-HH:MM:SS (Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})</li>
        <li>${DB_RESULT} - Result value of DB_EXISTS() dial plan function</li>
        <li>${EPOCH} * - Current unix style epoch</li>
        <li>${EXTEN} * - Current extension</li>
        <li>${ENV(VAR)} - Environmental variable VAR</li>
        <li>${GOTO_ON_BLINDXFR} - Transfer to the specified context/extension/priority after a blind transfer (use ^ characters in place of | to separate context/extension/priority when setting this variable from the dialplan)</li>
        <li>${HANGUPCAUSE} * - Asterisk cause of hangup (inbound/outbound)</li>
        <li>${HINT} * - Channel hints for this extension</li>
        <li>${HINTNAME} * - Suggested Caller*ID name for this extension</li>
        <li>${INVALID_EXTEN} - The invalid called extension (used in the "i" extension)</li>
        <li>${LANGUAGE} * - Current language (Deprecated; use ${LANGUAGE()})</li>
        <li>${LEN(VAR)} - String length of VAR (integer)</li>
        <li>${PRIORITY} * - Current priority in the dialplan</li>
        <li>${PRIREDIRECTREASON} - Reason for redirect on PRI, if a call was directed</li>
        <li>${TIMESTAMP} * - Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})</li>
        <li>${TRANSFER_CONTEXT} - Context for transferred calls</li>
        <li>${FORWARD_CONTEXT} - Context for forwarded calls</li>
        <li>${DYNAMIC_PEERNAME} - The name of the channel on the other side when a dynamic feature is used.</li>
        <li>${DYNAMIC_FEATURENAME} The name of the last triggered dynamic feature.</li>
        <li>${UNIQUEID} * - Current call unique identifier</li>
        <li>${SYSTEMNAME} * - value of the systemname option of asterisk.conf</li>
        <li>${ENTITYID} * - Global Entity ID set automatically, or from asterisk.conf</li>
</ul>
</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+Standard+Channel+Variables">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=4620398&revisedVersion=6&originalVersion=5">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>