diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-09-04 22:46:06 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-09-04 22:46:06 +0000 |
commit | 9a38efea30101623570ef7d4cdc8cdf4100f5aae (patch) | |
tree | f016895e297e9f25bb661849572c6ee9dce16894 | |
parent | e79d9f2a559cc17c3010f181a178cc69405b8723 (diff) |
Add ${DNIS}
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1475 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | README.variables | 2 | ||||
-rwxr-xr-x | doc/README.variables | 2 | ||||
-rwxr-xr-x | pbx.c | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/README.variables b/README.variables index 8a6a3e201..e7e94d239 100755 --- a/README.variables +++ b/README.variables @@ -40,6 +40,8 @@ ${ENV(VAR)} Environmental variable VAR ${EPOCH} Current unix style epoch ${DATETIME} Current date time in the format: YYYY-MM-DD_HH:MM:SS ${UNIQUEID} Current call unique identifier +${DNID} Dialed Number Identifier +${RDNIS} Redirected Dial Number ID Service There are two reference modes - reference by value and reference by name. To refer to a variable with its name (as an argument to a function that diff --git a/doc/README.variables b/doc/README.variables index 8a6a3e201..e7e94d239 100755 --- a/doc/README.variables +++ b/doc/README.variables @@ -40,6 +40,8 @@ ${ENV(VAR)} Environmental variable VAR ${EPOCH} Current unix style epoch ${DATETIME} Current date time in the format: YYYY-MM-DD_HH:MM:SS ${UNIQUEID} Current call unique identifier +${DNID} Dialed Number Identifier +${RDNIS} Redirected Dial Number ID Service There are two reference modes - reference by value and reference by name. To refer to a variable with its name (as an argument to a function that @@ -797,6 +797,12 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,const char *var, *ret = workspace; } else *ret = NULL; + } else if (c && !strcmp(var, "DNID")) { + if (c->dnid) { + strncpy(workspace, c->dnid, workspacelen - 1); + *ret = workspace; + } else + *ret = NULL; } else if (c && !strcmp(var, "HINT")) { if (!ast_get_hint(workspace, workspacelen - 1, c, c->context, c->exten)) *ret = NULL; |