mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
Make ${ACCOUNTCODE} available and document (bug #459)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -44,6 +44,8 @@ ${UNIQUEID} Current call unique identifier
|
|||||||
${DNID} Dialed Number Identifier
|
${DNID} Dialed Number Identifier
|
||||||
${RDNIS} Redirected Dial Number ID Service
|
${RDNIS} Redirected Dial Number ID Service
|
||||||
${HANGUPCAUSE} Hangup cause on last PRI hangup
|
${HANGUPCAUSE} Hangup cause on last PRI hangup
|
||||||
|
${ACCOUNTCODE} Account code (if specified)
|
||||||
|
|
||||||
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
|
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
|
||||||
|
|
||||||
There are two reference modes - reference by value and reference by name.
|
There are two reference modes - reference by value and reference by name.
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ ${UNIQUEID} Current call unique identifier
|
|||||||
${DNID} Dialed Number Identifier
|
${DNID} Dialed Number Identifier
|
||||||
${RDNIS} Redirected Dial Number ID Service
|
${RDNIS} Redirected Dial Number ID Service
|
||||||
${HANGUPCAUSE} Hangup cause on last PRI hangup
|
${HANGUPCAUSE} Hangup cause on last PRI hangup
|
||||||
|
${ACCOUNTCODE} Account code (if specified)
|
||||||
|
|
||||||
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
|
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
|
||||||
|
|
||||||
There are two reference modes - reference by value and reference by name.
|
There are two reference modes - reference by value and reference by name.
|
||||||
|
|||||||
3
pbx.c
3
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")) {
|
} else if (c && !strcmp(var, "HANGUPCAUSE")) {
|
||||||
snprintf(workspace, workspacelen -1, "%i", c->hangupcause);
|
snprintf(workspace, workspacelen -1, "%i", c->hangupcause);
|
||||||
*ret = workspace;
|
*ret = workspace;
|
||||||
|
} else if (c && !strcmp(var, "ACCOUNTCODE")) {
|
||||||
|
strncpy(workspace, c->accountcode, workspacelen - 1);
|
||||||
|
*ret = workspace;
|
||||||
} else {
|
} else {
|
||||||
if (c) {
|
if (c) {
|
||||||
AST_LIST_TRAVERSE(headp,variables,entries) {
|
AST_LIST_TRAVERSE(headp,variables,entries) {
|
||||||
|
|||||||
Reference in New Issue
Block a user