deprecate chan_agent callback mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-08-19 17:05:43 +00:00
parent a583f314dc
commit fd0ac387a9
2 changed files with 25 additions and 1 deletions

View File

@@ -2137,6 +2137,19 @@ static int login_exec(struct ast_channel *chan, void *data)
return __login_exec(chan, data, 0);
}
static void callback_deprecated(void)
{
static int depwarning = 0;
if (!depwarning) {
depwarning = 1;
ast_log(LOG_WARNING, "AgentCallbackLogin is deprecated and will be removed in a future release.\n");
ast_log(LOG_WARNING, "See doc/queues-with-callback-members.txt for an example of how to achieve\n");
ast_log(LOG_WARNING, "the same functionality using only dialplan logic.\n");
}
}
/*!
* Called by the AgentCallbackLogin application (from the dial plan).
*
@@ -2147,6 +2160,8 @@ static int login_exec(struct ast_channel *chan, void *data)
*/
static int callback_exec(struct ast_channel *chan, void *data)
{
callback_deprecated();
return __login_exec(chan, data, 1);
}
@@ -2168,6 +2183,8 @@ static int action_agent_callback_login(struct mansession *s, struct message *m)
struct agent_pvt *p;
int login_state = 0;
callback_deprecated();
if (ast_strlen_zero(agent)) {
astman_send_error(s, m, "No agent specified");
return 0;