Merge james's patch (bug #7)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-08-25 22:40:14 +00:00
parent 1434714b58
commit aaf83cc86f
4 changed files with 9 additions and 4 deletions

7
pbx.c
View File

@@ -3855,17 +3855,22 @@ static void *ast_pbx_run_app(void *data)
return NULL;
}
int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *app, char *appdata, int *reason, int sync, char *callerid)
int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *app, char *appdata, int *reason, int sync, char *callerid, char *variable)
{
struct ast_channel *chan;
struct async_stat *as;
struct app_tmp *tmp;
char *var, *vartmp;
int res = -1;
if (!app || !strlen(app))
return -1;
if (sync) {
chan = ast_request_and_dial(type, format, data, timeout, reason, callerid);
if (chan) {
vartmp = variable;
while( (var = strtok_r(NULL, "|", &vartmp)) ) {
pbx_builtin_setvar( chan, var );
}
if (chan->_state == AST_STATE_UP) {
res = 0;
if (option_verbose > 3)