diff --git a/conf.d/regexroute.conf.sample b/conf.d/regexroute.conf.sample index edb163c7..7f2e17f4 100644 --- a/conf.d/regexroute.conf.sample +++ b/conf.d/regexroute.conf.sample @@ -47,6 +47,7 @@ ; $(random,STRING) = STRING with each ? character replaced with a random digit ; $(index,N,ITEM1,ITEM2,...) = N-th (modulo length of list) item in list ; $(rotate,N,ITEM1,ITEM2,...) = list rotated N (modulo length of list) times +; $(config,SECTION,KEY) = value of KEY= in [SECTION] of main config file (yate.conf, yate-qt4.conf) ; $(engine,NAME) = value of Engine's runtime parameter NAME ; $(runid) = the current Engine run identifier ; $(nodename) = the node name the Engine runs as, may be empty diff --git a/modules/regexroute.cpp b/modules/regexroute.cpp index 7d4db2ca..4beca2e3 100644 --- a/modules/regexroute.cpp +++ b/modules/regexroute.cpp @@ -287,6 +287,11 @@ static void evalFunc(String& str) } lst->destruct(); } + else if ((sep >= 0) && (str == "config")) { + str = par.substr(0,sep).trimBlanks(); + par = par.substr(sep+1).trimBlanks(); + str = Engine::config().getValue(str,par); + } else if (str == "engine") str = Engine::runParams().getValue(vars(par)); else if (str == "runid") {