aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_osplookup.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-05 15:15:12 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-05 15:15:12 +0000
commitdbe6ddeb43ade81974f82f1cecac1637a547d6dc (patch)
treeeb09a6dcc54d0fb34cb3560b6b21601ebf1f1a97 /apps/app_osplookup.c
parent6928c4450a8c321796a66f93de5f74d52819c427 (diff)
Merge OSP updates from matt nicholson (with changes)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4674 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_osplookup.c')
-rwxr-xr-xapps/app_osplookup.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index 4110d740b..41f5d002f 100755
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -113,12 +113,13 @@ static int osplookup_exec(struct ast_channel *chan, void *data)
if ((res = ast_osp_lookup(chan, provider, temp, chan->cid.cid_num, &result)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
- pbx_builtin_setvar_helper(chan, "OSPHANDLE", tmp);
- pbx_builtin_setvar_helper(chan, "OSPTECH", result.tech);
- pbx_builtin_setvar_helper(chan, "OSPDEST", result.dest);
- pbx_builtin_setvar_helper(chan, "OSPTOKEN", result.token);
+ pbx_builtin_setvar_helper(chan, "_OSPHANDLE", tmp);
+ pbx_builtin_setvar_helper(chan, "_OSPTECH", result.tech);
+ pbx_builtin_setvar_helper(chan, "_OSPDEST", result.dest);
+ pbx_builtin_setvar_helper(chan, "_OSPTOKEN", result.token);
snprintf(tmp, sizeof(tmp), "%d", result.numresults);
- pbx_builtin_setvar_helper(chan, "OSPRESULTS", tmp);
+ pbx_builtin_setvar_helper(chan, "_OSPRESULTS", tmp);
+
} else {
if (!res)
ast_log(LOG_NOTICE, "OSP Lookup failed for '%s' (provider '%s')\n", temp, provider ? provider : "<default>");
@@ -153,12 +154,12 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
- pbx_builtin_setvar_helper(chan, "OSPHANDLE", tmp);
- pbx_builtin_setvar_helper(chan, "OSPTECH", result.tech);
- pbx_builtin_setvar_helper(chan, "OSPDEST", result.dest);
- pbx_builtin_setvar_helper(chan, "OSPTOKEN", result.token);
+ pbx_builtin_setvar_helper(chan, "_OSPHANDLE", tmp);
+ pbx_builtin_setvar_helper(chan, "_OSPTECH", result.tech);
+ pbx_builtin_setvar_helper(chan, "_OSPDEST", result.dest);
+ pbx_builtin_setvar_helper(chan, "_OSPTOKEN", result.token);
snprintf(tmp, sizeof(tmp), "%d", result.numresults);
- pbx_builtin_setvar_helper(chan, "OSPRESULTS", tmp);
+ pbx_builtin_setvar_helper(chan, "_OSPRESULTS", tmp);
}
} else {
if (!res) {
@@ -204,7 +205,7 @@ static int ospfinished_exec(struct ast_channel *chan, void *data)
result.handle = -1;
if (temp && strlen(temp) && (sscanf(temp, "%i", &result.handle) == 1) && (result.handle > -1)) {
if (!ast_osp_terminate(result.handle, cause, start, duration)) {
- pbx_builtin_setvar_helper(chan, "OSPHANDLE", "");
+ pbx_builtin_setvar_helper(chan, "_OSPHANDLE", "");
res = 1;
}
} else {