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
This commit is contained in:
Richard Mudgett
2013-07-15 23:20:55 +00:00
parent d43bbfb74e
commit d43b17a872
11 changed files with 2966 additions and 2736 deletions

30
CHANGES
View File

@@ -14,10 +14,17 @@
Applications
------------------
AgentLogin
------------------
* The application no longer does agent authentication. The dialplan needs to
perform this function before running AgentLogin. If the agent is already
logged in, dialplan will continue with the AGENT_STATUS channel variable
set to ALREADY_LOGGED_IN.
AgentMonitorOutgoing
------------------
* The 'c' option has been removed. It is not possible to modify the name of a
channel involved in a CDR.
* Application removed. It was a holdover from when AgentCallbackLogin was
removed.
ForkCDR
------------------
@@ -260,8 +267,8 @@ AMI (Asterisk Manager Interface)
of "CallerID" and "ConnectedID" to avoid confusion with similarly named
parameters in the channel snapshot.
* The "Agentlogin" and "Agentlogoff" events have been renamed "AgentLogin" and
"AgentLogoff" respectively.
* The AMI events "Agentlogin" and "Agentlogoff" have been renamed
"AgentLogin" and "AgentLogoff" respectively.
* The "Channel" key used in the "AlarmClear", "Alarm", and "DNDState" has been
renamed "DAHDIChannel" since it does not convey an Asterisk channel name.
@@ -453,6 +460,21 @@ chan_agent
and pretending otherwise helps no one.
* The AGENTUPDATECDR channel variable has also been removed, for the same
reason as the updatecdr option.
* The driver is no longer a Data retrieval API data provider for the
AMI DataGet action.
* The endcall and enddtmf configuration options are removed. Use the
dialplan function CHANNEL(dtmf-features) to set DTMF features on the agent
channel before calling AgentLogin.
* chan_agent is removed and replaced with AgentLogin and AgentRequest dialplan
applications. Agents are connected with callers using the new AgentRequest
dialplan application. The Agents:<agent-id> device state is available to
monitor the status of an agent. See agents.conf.sample for valid
configuration options.
chan_bridge
------------------
* chan_bridge is removed and its functionality is incorporated into ConfBridge
itself.
chan_local
------------------