summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-06-10 12:48:50 +0000
committerRussell Bryant <russell@russellbryant.com>2008-06-10 12:48:50 +0000
commitf4a8062e9316b065b9b83632ca2046d43b990538 (patch)
tree6628d8e6cf74abb51f1267effcf152b32c7401ba /main/pbx.c
parent74932445b78e728c1b9819e3e5da4d0c82e72645 (diff)
Merge another change from team/russell/events ...
DUNDi uses a concept called the Entity ID for unique server identifiers. I have pulled out the handling of EIDs and made it something available to all of Asterisk. There is now a global Entity ID that can be used for other purposes as well, such as code providing distributed device state, which is why I did this. The global Entity ID is set automatically, just like it was done in DUNDi, but it can also be set in asterisk.conf. DUNDi will now use this global EID unless one is specified in dundi.conf. The current EID for the system can be seen in the "core show settings" CLI command. It is also available in the dialplan via the ENTITYID variable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index f49ead16e..b2aebbd9b 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2314,6 +2314,9 @@ void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, c
s = workspace;
} else if (!strcmp(var, "SYSTEMNAME")) {
s = ast_config_AST_SYSTEM_NAME;
+ } else if (!strcmp(var, "ENTITYID")) {
+ ast_eid_to_str(workspace, workspacelen, &g_eid);
+ s = workspace;
}
}
/* if not found, look into chanvars or global vars */