summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-07-15 23:20:55 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-07-15 23:20:55 +0000
commitd43b17a872e8227aa8a9905a21f90bd48f9d5348 (patch)
treeba29a4b4e3e065ba935b5283c3b23decd7e1ec6d /include/asterisk
parentd43bbfb74e9111da7440d0fd8cc0b480ed47a0af (diff)
Replace chan_agent with app_agent_pool.
The ill conceived chan_agent is no more. It is now replaced by app_agent_pool. Agents login using the AgentLogin() application as before. The AgentLogin() application no longer does any authentication. Authentication is now the responsibility of the dialplan. (Besides, the authentication done by chan_agent did not match what the voice prompts asked for.) Sample extensions.conf [login] ; Sample agent 1001 login ; Set COLP for in between calls so the agent does not see the last caller COLP. exten => 1001,1,Set(CONNECTEDLINE(all)="Agent Waiting" <1001>) ; Give the agent DTMF transfer and disconnect features when connected to a caller. same => n,Set(CHANNEL(dtmf-features)=TX) same => n,AgentLogin(1001) same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS}) same => n,Hangup() [caller] ; Sample caller direct connect to agent 1001 exten => 800,1,AgentRequest(1001) same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS}) same => n,Hangup() ; Sample caller going through a Queue to agent 1001 exten => 900,1,Queue(agent_q) same => n,Hangup() Sample queues.conf [agent_q] member => Local/800@caller,,SuperAgent,Agent:1001 Under the hood operation overview: 1) Logged in agents wait for callers in an agents holding bridge. 2) Caller requests an agent using AgentRequest() 3) A basic bridge is created, the agent is notified, and caller joins the basic bridge to wait for the agent. 4) The agent is either automatically connected to the caller or must ack the call to connect. 5) The agent is moved from the agents holding bridge to the basic bridge. 6) The agent and caller talk. 7) The connection is ended by either party. 8) The agent goes back to the agents holding bridge. To avoid some locking issues with the agent holding bridge, I needed to make some changes to the after bridge callback support. The after bridge callback is now a list of requested callbacks with the last to be added the only active callback. The after bridge callback for failed callbacks will always happen in the channel thread when the channel leaves the bridging system or is destroyed. (closes issue ASTERISK-21554) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2657/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/bridging.h8
-rw-r--r--include/asterisk/config_options.h2
-rw-r--r--include/asterisk/stasis_channels.h16
3 files changed, 24 insertions, 2 deletions
diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h
index 08d0023e5..d770937a6 100644
--- a/include/asterisk/bridging.h
+++ b/include/asterisk/bridging.h
@@ -1651,7 +1651,7 @@ void ast_after_bridge_goto_read(struct ast_channel *chan, char *buffer, size_t b
/*! Reason the the after bridge callback will not be called. */
enum ast_after_bridge_cb_reason {
- /*! The datastore is being destroyed. Likely due to hangup. */
+ /*! The datastore is being destroyed. Likely due to hangup. (Enum value must be zero.) */
AST_AFTER_BRIDGE_CB_REASON_DESTROY,
/*! Something else replaced the callback with another. */
AST_AFTER_BRIDGE_CB_REASON_REPLACED,
@@ -1670,6 +1670,9 @@ enum ast_after_bridge_cb_reason {
* \param reason Reason callback is failing.
* \param data Extra data what setup the callback wanted to pass.
*
+ * \note Called when the channel leaves the bridging system or
+ * is destroyed.
+ *
* \return Nothing
*/
typedef void (*ast_after_bridge_cb_failed)(enum ast_after_bridge_cb_reason reason, void *data);
@@ -1709,6 +1712,9 @@ void ast_after_bridge_callback_discard(struct ast_channel *chan, enum ast_after_
*
* \note chan is locked by this function.
*
+ * \note failed is called when the channel leaves the bridging
+ * system or is destroyed.
+ *
* \retval 0 on success.
* \retval -1 on error.
*/
diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h
index 6b444466f..d557b5685 100644
--- a/include/asterisk/config_options.h
+++ b/include/asterisk/config_options.h
@@ -461,7 +461,7 @@ enum aco_process_status {
/*! \brief Process a config info via the options registered with an aco_info
*
* \param info The config_options_info to be used for handling the config
- * \param reload Whether or not this is a reload
+ * \param reload Non-zero if this is for a reload.
*
* \retval ACO_PROCESS_OK Success
* \retval ACO_PROCESS_ERROR Failure
diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h
index af2d15c3d..78e3c6e41 100644
--- a/include/asterisk/stasis_channels.h
+++ b/include/asterisk/stasis_channels.h
@@ -436,6 +436,22 @@ struct stasis_message_type *ast_channel_monitor_start_type(void);
struct stasis_message_type *ast_channel_monitor_stop_type(void);
/*!
+ * \since 12.0.0
+ * \brief Message type for agent login on a channel
+ *
+ * \retval A stasis message type
+ */
+struct stasis_message_type *ast_channel_agent_login_type(void);
+
+/*!
+ * \since 12.0.0
+ * \brief Message type for agent logoff on a channel
+ *
+ * \retval A stasis message type
+ */
+struct stasis_message_type *ast_channel_agent_logoff_type(void);
+
+/*!
* \since 12
* \brief Message type for starting music on hold on a channel
*