Skip to content

Commit 5f59e0d

Browse files
InterLinked1Friendly Automation
authored andcommitted
documentation: Document built-in system and channel vars
Documentation for built-in special system and channel vars is currently outdated, and updating is a manual process since there is no XML documentation for these anywhere. This adds documentation for system vars to func_env and for channel vars to func_channel so that they appear along with the corresponding fields that would be accessed using a function. ASTERISK-29848 #close Change-Id: I6997f925c4a45fffe71321861f5898a8b7182fa9
1 parent fbaf74b commit 5f59e0d

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

funcs/func_channel.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,41 @@
278278
same => n,Log(NOTICE, This channel is: ${CHANNEL(state)})
279279
</example>
280280
<xi:include xpointer="xpointer(/docs/info[@name='CHANNEL_EXAMPLES'])" />
281+
<para>The following channel variables are available as special built-in
282+
dialplan channel variables. These variables cannot be set or modified
283+
and are read-only.</para>
284+
<variablelist>
285+
<variable name="CALLINGPRES">
286+
<para>Caller ID presentation for incoming calls (PRI channels)</para>
287+
</variable>
288+
<variable name="CALLINGANI2">
289+
<para>Caller ANI2 (PRI channels)</para>
290+
</variable>
291+
<variable name="CALLINGTON">
292+
<para>Caller Type of Number (PRI channels)</para>
293+
</variable>
294+
<variable name="CALLINGTNS">
295+
<para>Transit Network Selector (PRI channels)</para>
296+
</variable>
297+
<variable name="EXTEN">
298+
<para>Current extension</para>
299+
</variable>
300+
<variable name="CONTEXT">
301+
<para>Current context</para>
302+
</variable>
303+
<variable name="PRIORITY">
304+
<para>Current priority</para>
305+
</variable>
306+
<variable name="CHANNEL">
307+
<para>Current channel name</para>
308+
</variable>
309+
<variable name="UNIQUEID">
310+
<para>Current call unique identifier</para>
311+
</variable>
312+
<variable name="HANGUPCAUSE">
313+
<para>Asterisk cause of hangup (inbound/outbound)</para>
314+
</variable>
315+
</variablelist>
281316
</description>
282317
</function>
283318
***/

funcs/func_env.c

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,55 @@
4949
</syntax>
5050
<description>
5151
<para>Variables starting with <literal>AST_</literal> are reserved to the system and may not be set.</para>
52+
<para>Additionally, the following system variables are available as special built-in dialplan variables.
53+
These variables cannot be set or modified and are read-only.</para>
54+
<variablelist>
55+
<variable name="EPOCH">
56+
<para>Current unix style epoch</para>
57+
</variable>
58+
<variable name="SYSTEMNAME">
59+
<para>value of the <literal>systemname</literal> option from <literal>asterisk.conf</literal></para>
60+
</variable>
61+
<variable name="ASTCACHEDIR">
62+
<para>value of the <literal>astcachedir</literal> option from <literal>asterisk.conf</literal></para>
63+
</variable>
64+
<variable name="ASTETCDIR">
65+
<para>value of the <literal>astetcdir</literal> option from <literal>asterisk.conf</literal></para>
66+
</variable>
67+
<variable name="ASTMODDIR">
68+
<para>value of the <literal>astmoddir</literal> option from <literal>asterisk.conf</literal></para>
69+
</variable>
70+
<variable name="ASTVARLIBDIR">
71+
<para>value of the <literal>astvarlib</literal> option from <literal>asterisk.conf</literal></para>
72+
</variable>
73+
<variable name="ASTDBDIR">
74+
<para>value of the <literal>astdbdir</literal> option from <literal>asterisk.conf</literal></para>
75+
</variable>
76+
<variable name="ASTKEYDIR">
77+
<para>value of the <literal>astkeydir</literal> option from <literal>asterisk.conf</literal></para>
78+
</variable>
79+
<variable name="ASTDATADIR">
80+
<para>value of the <literal>astdatadir</literal> option from <literal>asterisk.conf</literal></para>
81+
</variable>
82+
<variable name="ASTAGIDIR">
83+
<para>value of the <literal>astagidir</literal> option from <literal>asterisk.conf</literal></para>
84+
</variable>
85+
<variable name="ASTSPOOLDIR">
86+
<para>value of the <literal>astspooldir</literal> option from <literal>asterisk.conf</literal></para>
87+
</variable>
88+
<variable name="ASTRUNDIR">
89+
<para>value of the <literal>astrundir</literal> option from <literal>asterisk.conf</literal></para>
90+
</variable>
91+
<variable name="ASTLOGDIR">
92+
<para>value of the <literal>astlogdir</literal> option from <literal>asterisk.conf</literal></para>
93+
</variable>
94+
<variable name="ASTSBINDIR">
95+
<para>value of the <literal>astsbindir</literal> option from <literal>asterisk.conf</literal></para>
96+
</variable>
97+
<variable name="ENTITYID">
98+
<para>Global Entity ID set automatically, or from <literal>asterisk.conf</literal></para>
99+
</variable>
100+
</variablelist>
52101
</description>
53102
</function>
54103
<function name="STAT" language="en_US">

0 commit comments

Comments
 (0)