diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-19 17:05:43 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-19 17:05:43 +0000 |
commit | b67daff4e573d8f24c423e788734a100856d40ba (patch) | |
tree | 3ff9092602307aba784912689205155f274cb86a | |
parent | 0b95b65ab98f0157b5af629b85f8f6caeba39b39 (diff) |
deprecate chan_agent callback mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40521 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | UPGRADE.txt | 9 | ||||
-rw-r--r-- | channels/chan_agent.c | 17 |
2 files changed, 25 insertions, 1 deletions
diff --git a/UPGRADE.txt b/UPGRADE.txt index 1c572cbcb..09ba006ea 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -293,6 +293,13 @@ The Zap channel: * Support for MFC/R2 has been removed, as it has not been functional for some time and it has no maintainer. +The Agent channel: + +* Callback mode (AgentCallbackLogin) is now deprecated, since the entire function + it provided can be done using dialplan logic, without requiring additional + channel and module locks (which frequently caused deadlocks). An example of + how to do this using AEL dialplan is in doc/queues-with-callback-members.txt. + The G726-32 codec: * It has been determined that previous versions of Asterisk used the wrong codeword @@ -360,5 +367,5 @@ Music on Hold: starting music on hold on the channel. An example for how this would be useful is in an enterprise network of Asterisk servers. When one phone on one server puts a phone on a different server on hold, the remote server will be - responsibile for playing the hold music to its local phone that was put on + responsible for playing the hold music to its local phone that was put on hold instead of the far end server across the network playing the music. diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 1c3f8d8df..b8a54e74b 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -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; |