aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xREADME.variables2
-rwxr-xr-xdoc/README.variables2
-rwxr-xr-xpbx.c3
3 files changed, 7 insertions, 0 deletions
diff --git a/README.variables b/README.variables
index 95485ba7f..dab5faca9 100755
--- a/README.variables
+++ b/README.variables
@@ -44,6 +44,8 @@ ${UNIQUEID} Current call unique identifier
${DNID} Dialed Number Identifier
${RDNIS} Redirected Dial Number ID Service
${HANGUPCAUSE} Hangup cause on last PRI hangup
+${ACCOUNTCODE} Account code (if specified)
+
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
There are two reference modes - reference by value and reference by name.
diff --git a/doc/README.variables b/doc/README.variables
index 95485ba7f..dab5faca9 100755
--- a/doc/README.variables
+++ b/doc/README.variables
@@ -44,6 +44,8 @@ ${UNIQUEID} Current call unique identifier
${DNID} Dialed Number Identifier
${RDNIS} Redirected Dial Number ID Service
${HANGUPCAUSE} Hangup cause on last PRI hangup
+${ACCOUNTCODE} Account code (if specified)
+
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
There are two reference modes - reference by value and reference by name.
diff --git a/pbx.c b/pbx.c
index 0ed1fd07d..10a890da9 100755
--- a/pbx.c
+++ b/pbx.c
@@ -865,6 +865,9 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,const char *var,
} else if (c && !strcmp(var, "HANGUPCAUSE")) {
snprintf(workspace, workspacelen -1, "%i", c->hangupcause);
*ret = workspace;
+ } else if (c && !strcmp(var, "ACCOUNTCODE")) {
+ strncpy(workspace, c->accountcode, workspacelen - 1);
+ *ret = workspace;
} else {
if (c) {
AST_LIST_TRAVERSE(headp,variables,entries) {