diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-02 00:58:31 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-02 00:58:31 +0000 |
commit | 6868babd229a635c5fd89c7b284025a92e0a3f9d (patch) | |
tree | 25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_macro.c | |
parent | b201da1a3eb1cae654cdd3fe89ef8f9e55dd0b83 (diff) |
Huge callerid rework (might break H.323, others)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3874 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_macro.c')
-rwxr-xr-x | apps/app_macro.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c index ea6775c90..dd658689d 100755 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -3,7 +3,7 @@ * * Macro Implementation * - * Copyright (C) 2003, Digium + * Copyright (C) 2003-2004, Digium, Inc. * * Mark Spencer <markster@digium.com> * @@ -85,7 +85,7 @@ static int macro_exec(struct ast_channel *chan, void *data) return 0; } snprintf(fullmacro, sizeof(fullmacro), "macro-%s", macro); - if (!ast_exists_extension(chan, fullmacro, "s", 1, chan->callerid)) { + if (!ast_exists_extension(chan, fullmacro, "s", 1, chan->cid.cid_num)) { if (!ast_context_find(fullmacro)) ast_log(LOG_WARNING, "No such context '%s' for macro '%s'\n", fullmacro, macro); else @@ -137,8 +137,8 @@ static int macro_exec(struct ast_channel *chan, void *data) pbx_builtin_setvar_helper(chan, varname, cur); argc++; } - while(ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->callerid)) { - if ((res = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority, chan->callerid))) { + while(ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) { + if ((res = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num))) { /* Something bad happened, or a hangup has been requested. */ if (((res >= '0') && (res <= '9')) || ((res >= 'A') && (res <= 'F'))) { /* Just return result as to the previous application as if it had been dialed */ @@ -210,7 +210,7 @@ out: /* Handle macro offset if it's set by checking the availability of step n + offset + 1, otherwise continue normally if there is any problem */ if (sscanf(offsets, "%d", &offset) == 1) { - if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + offset + 1, chan->callerid)) { + if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + offset + 1, chan->cid.cid_num)) { chan->priority += offset; } } |