From 5f59e0d36f3aa455ff89de206bbf3076df5a08b1 Mon Sep 17 00:00:00 2001 From: Naveen Albert Date: Sat, 8 Jan 2022 20:35:09 +0000 Subject: [PATCH] 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 --- funcs/func_channel.c | 35 +++++++++++++++++++++++++++++++ funcs/func_env.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/funcs/func_channel.c b/funcs/func_channel.c index 312806d966..c6e5ec1a34 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -278,6 +278,41 @@ same => n,Log(NOTICE, This channel is: ${CHANNEL(state)}) + The following channel variables are available as special built-in + dialplan channel variables. These variables cannot be set or modified + and are read-only. + + + Caller ID presentation for incoming calls (PRI channels) + + + Caller ANI2 (PRI channels) + + + Caller Type of Number (PRI channels) + + + Transit Network Selector (PRI channels) + + + Current extension + + + Current context + + + Current priority + + + Current channel name + + + Current call unique identifier + + + Asterisk cause of hangup (inbound/outbound) + + ***/ diff --git a/funcs/func_env.c b/funcs/func_env.c index e5e3e70e6a..f5ff3e0d3c 100644 --- a/funcs/func_env.c +++ b/funcs/func_env.c @@ -49,6 +49,55 @@ Variables starting with AST_ are reserved to the system and may not be set. + Additionally, the following system variables are available as special built-in dialplan variables. + These variables cannot be set or modified and are read-only. + + + Current unix style epoch + + + value of the systemname option from asterisk.conf + + + value of the astcachedir option from asterisk.conf + + + value of the astetcdir option from asterisk.conf + + + value of the astmoddir option from asterisk.conf + + + value of the astvarlib option from asterisk.conf + + + value of the astdbdir option from asterisk.conf + + + value of the astkeydir option from asterisk.conf + + + value of the astdatadir option from asterisk.conf + + + value of the astagidir option from asterisk.conf + + + value of the astspooldir option from asterisk.conf + + + value of the astrundir option from asterisk.conf + + + value of the astlogdir option from asterisk.conf + + + value of the astsbindir option from asterisk.conf + + + Global Entity ID set automatically, or from asterisk.conf + + -- 2.47.2