diff options
author | Mark Spencer <markster@digium.com> | 2005-01-05 15:15:12 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-01-05 15:15:12 +0000 |
commit | 7568d9a4eff334c54ffda0272e75f69b1ce2a6e6 (patch) | |
tree | eb09a6dcc54d0fb34cb3560b6b21601ebf1f1a97 /apps | |
parent | 5db0b8e31a2471f6d19b25d5c9a4440717060e22 (diff) |
Merge OSP updates from matt nicholson (with changes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_dial.c | 2 | ||||
-rwxr-xr-x | apps/app_osplookup.c | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 0226995d2..307d80cc3 100755 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1017,7 +1017,7 @@ static int dial_exec(struct ast_channel *chan, void *data) time(&answer_time); #ifdef OSP_SUPPORT /* Once call is answered, ditch the OSP Handle */ - pbx_builtin_setvar_helper(chan, "OSPHANDLE", ""); + pbx_builtin_setvar_helper(chan, "_OSPHANDLE", ""); #endif strncpy(status, "ANSWER", sizeof(status) - 1); /* Ah ha! Someone answered within the desired timeframe. Of course after this 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 { |