diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-24 06:00:18 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-24 06:00:18 +0000 |
commit | f6a861f645e0b978daabe5c2095a22cb69978d5c (patch) | |
tree | 388e986b909e145722de5c909a1496e0402a4ac7 /pbx.c | |
parent | b6be24372a79c5fe8568a831bab188db9ea98e8c (diff) |
Mon Feb 24 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@622 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -710,12 +710,21 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,char *cp3,char * } else if (!strcmp(cp3, "EXTEN")) { *cp4 = c->exten; } else if (!strncmp(cp3, "EXTEN-", strlen("EXTEN-")) && + /* XXX Remove me eventually */ (sscanf(cp3 + strlen("EXTEN-"), "%d", &offset) == 1)) { if (offset < 0) offset=0; if (offset > strlen(c->exten)) offset = strlen(c->exten); *cp4 = c->exten + offset; + ast_log(LOG_WARNING, "The use of 'EXTEN-foo' has been derprecated in favor of 'EXTEN:foo'\n"); + } else if (!strncmp(cp3, "EXTEN:", strlen("EXTEN:")) && + (sscanf(cp3 + strlen("EXTEN:"), "%d", &offset) == 1)) { + if (offset < 0) + offset=0; + if (offset > strlen(c->exten)) + offset = strlen(c->exten); + *cp4 = c->exten + offset; } else if (!strcmp(cp3, "RDNIS")) { *cp4 = c->rdnis; if (!(*cp4)) @@ -2784,8 +2793,8 @@ int ast_async_goto(struct ast_channel *chan, char *context, char *exten, int pri struct ast_frame *f; tmpchan = ast_channel_alloc(0); if (tmpchan) { - ast_setstate(tmpchan, chan->_state); snprintf(tmpchan->name, sizeof(tmpchan->name), "AsyncGoto/%s", chan->name); + ast_setstate(tmpchan, chan->_state); /* Make formats okay */ tmpchan->readformat = chan->readformat; tmpchan->writeformat = chan->writeformat; |