summaryrefslogtreecommitdiff
path: root/apps/app_minivm.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-02-29 16:52:47 +0000
committerTerry Wilson <twilson@digium.com>2012-02-29 16:52:47 +0000
commita9d607a35764d93790172cab1f630e14fb8e043c (patch)
treedadea55813cfc525898844c51eec824d468455cb /apps/app_minivm.c
parent0b988da21c1ec856b7b8bad2434bf93498d17cfd (diff)
Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r--apps/app_minivm.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index bf408f81f..cd613b67d 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1746,10 +1746,10 @@ static void run_externnotify(struct ast_channel *chan, struct minivm_account *vm
snprintf(arguments, sizeof(arguments), "%s %s@%s %s %s&",
ast_strlen_zero(vmu->externnotify) ? global_externnotify : vmu->externnotify,
vmu->username, vmu->domain,
- (chan->caller.id.name.valid && chan->caller.id.name.str)
- ? chan->caller.id.name.str : "",
- (chan->caller.id.number.valid && chan->caller.id.number.str)
- ? chan->caller.id.number.str : "");
+ (ast_channel_caller(chan)->id.name.valid && ast_channel_caller(chan)->id.name.str)
+ ? ast_channel_caller(chan)->id.name.str : "",
+ (ast_channel_caller(chan)->id.number.valid && ast_channel_caller(chan)->id.number.str)
+ ? ast_channel_caller(chan)->id.number.str : "");
ast_debug(1, "Executing: %s\n", arguments);
ast_safe_system(arguments);
@@ -1935,8 +1935,8 @@ static int leave_voicemail(struct ast_channel *chan, char *username, struct leav
ast_strftime(timebuf, sizeof(timebuf), "%H:%M:%S", &tm);
ast_callerid_merge(callerid, sizeof(callerid),
- S_COR(chan->caller.id.name.valid, chan->caller.id.name.str, NULL),
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL),
+ S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, NULL),
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL),
"Unknown");
snprintf(logbuf, sizeof(logbuf),
/* "Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:origtime:duration:durationstatus:accountcode" */
@@ -2141,8 +2141,8 @@ static int minivm_notify_exec(struct ast_channel *chan, const char *data)
ast_channel_unlock(chan);
res = notify_new_message(chan, template, vmu, filename, atoi(duration_string),
format,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL),
- S_COR(chan->caller.id.name.valid, chan->caller.id.name.str, NULL));
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL),
+ S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, NULL));
}
pbx_builtin_setvar_helper(chan, "MVM_NOTIFY_STATUS", res == 0 ? "SUCCESS" : "FAILED");
@@ -2304,18 +2304,18 @@ static int minivm_greet_exec(struct ast_channel *chan, const char *data)
if (ast_test_flag(vmu, MVM_OPERATOR)) {
if (!ast_strlen_zero(vmu->exit)) {
if (ast_exists_extension(chan, vmu->exit, "o", 1,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1);
ouseexten = 1;
}
} else if (ast_exists_extension(chan, ast_channel_context(chan), "o", 1,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1);
ouseexten = 1;
}
else if (!ast_strlen_zero(ast_channel_macrocontext(chan))
&& ast_exists_extension(chan, ast_channel_macrocontext(chan), "o", 1,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
strncat(ecodes, "0", sizeof(ecodes) - strlen(ecodes) - 1);
ousemacro = 1;
}
@@ -2323,15 +2323,15 @@ static int minivm_greet_exec(struct ast_channel *chan, const char *data)
if (!ast_strlen_zero(vmu->exit)) {
if (ast_exists_extension(chan, vmu->exit, "a", 1,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
strncat(ecodes, "*", sizeof(ecodes) - strlen(ecodes) - 1);
}
} else if (ast_exists_extension(chan, ast_channel_context(chan), "a", 1,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
strncat(ecodes, "*", sizeof(ecodes) - strlen(ecodes) - 1);
} else if (!ast_strlen_zero(ast_channel_macrocontext(chan))
&& ast_exists_extension(chan, ast_channel_macrocontext(chan), "a", 1,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
strncat(ecodes, "*", sizeof(ecodes) - strlen(ecodes) - 1);
ausemacro = 1;
}