mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Playback() wasn't setting PLAYBACKSTATUS under several circumstances.
Playback() returns -1 on missing args - so should Background() git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -110,6 +110,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
|
|||||||
if (chan->_state != AST_STATE_UP) {
|
if (chan->_state != AST_STATE_UP) {
|
||||||
if (option_skip) {
|
if (option_skip) {
|
||||||
/* At the user's option, skip if the line is not up */
|
/* At the user's option, skip if the line is not up */
|
||||||
|
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
|
||||||
LOCAL_USER_REMOVE(u);
|
LOCAL_USER_REMOVE(u);
|
||||||
return 0;
|
return 0;
|
||||||
} else if (!option_noanswer)
|
} else if (!option_noanswer)
|
||||||
@@ -137,11 +138,11 @@ static int playback_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
front = back;
|
front = back;
|
||||||
}
|
}
|
||||||
if (mres)
|
|
||||||
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED");
|
|
||||||
else
|
|
||||||
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
|
|
||||||
}
|
}
|
||||||
|
if (mres)
|
||||||
|
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED");
|
||||||
|
else
|
||||||
|
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
|
||||||
LOCAL_USER_REMOVE(u);
|
LOCAL_USER_REMOVE(u);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
2
pbx.c
2
pbx.c
@@ -5745,7 +5745,7 @@ static int pbx_builtin_background(struct ast_channel *chan, void *data)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ast_log(LOG_WARNING, "Background requires an argument (filename)\n");
|
ast_log(LOG_WARNING, "Background requires an argument (filename)\n");
|
||||||
break;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user