diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-12 06:00:18 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-12 06:00:18 +0000 |
commit | f61680257a63d31f0abcf41b5c29f4670552af2f (patch) | |
tree | 37350d3bd0d6df02129f16dc35b893e9a674e627 /pbx.c | |
parent | 9cfcee51633cfff22801dd82843f5b7c7f4fdd82 (diff) |
Wed Mar 12 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@641 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 29 |
1 files changed, 8 insertions, 21 deletions
@@ -754,6 +754,14 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,char *cp3,char * *cp4=ast_var_value(variables); } } + if (!(*cp4)) { + int len=strlen(cp3); + int len_env=strlen("ENV("); + if (len > (len_env+1) && !strncasecmp(cp3,"ENV(",len_env) && !strcmp(cp3+len-1,")")) { + cp3[len-1]='\0'; + *cp4=getenv(cp3+len_env); + } + } } } @@ -1101,27 +1109,6 @@ int ast_pbx_run(struct ast_channel *c) c->pbx->rtimeout = 10; c->pbx->dtimeout = 5; - if (option_debug) - ast_log(LOG_DEBUG, "PBX_THREAD(%s)\n", c->name); - else if (option_verbose > 1) { - struct timeval tv; - struct tm tm; - FILE *LOG; - - gettimeofday(&tv,NULL); - localtime_r(&(tv.tv_sec),&tm); - LOG = fopen(AST_SPOOL_DIR "/call.log","a"); - - if (c->callerid) { - ast_verbose( VERBOSE_PREFIX_2 "Accepting call on '%s' (%s) at %02d-%02d %02d:%02d\n", c->name, c->callerid, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min); - fprintf(LOG,"%04d-%02d-%02d %02d:%02d:%02d - %s - %s\n",tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, c->name, c->callerid); - } else { - ast_verbose( VERBOSE_PREFIX_2 "Accepting call on '%s' at %02d-%02d %02d:%02d\n", c->name, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min); - fprintf(LOG,"%04d-%02d-%02d %02d:%02d:%02d - %s\n",tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, c->name); - } - fclose(LOG); - } - /* Start by trying whatever the channel is set to */ if (!ast_exists_extension(c, c->context, c->exten, c->priority, c->callerid)) { /* JK02: If not successfull fall back to 's' */ |