mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
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:
7
pbx.c
7
pbx.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user