|Summary:||ASTERISK-15586: [patch] Pause After call|
|Reporter:||Hernan Martinez (elhozo)||Labels:||patch|
|Date Opened:||2010-02-05 15:05:03.000-0600||Date Closed:|
|Environment:||Attachments:||( 0) 1.4|
( 1) aftercall.patch
( 2) svn_trunk
( 3) trunk
|Description:||I have installed asterisk in many places where they use to manage queues. Many times after the call is finished, the agent need to finish filling some data in whatever CRM they have or doing some extra task.|
To do this and no receive calls in that time they need to pause, and some times they need to pause inmediately after the calls ends, because the que is full and not pausing inmediately means and other incoming call and not having time to full fill the CRM data o do some other after call task.
Fixed time is not always usefull because is very often to have very varible aftercall work time.
My solution is to make a litle change in the app_queue code.
I have added a new per queue parameter to the queue.conf called aftercallautopause so when set to YES asterisk will automacally pause the member in all queues when the calls ends.
It also send a diferent identifier in the Paused: field in manager so that the cause of the pause can be identified by some external program listening in port 5038 and can be usefull for statical porpouses.
In Additional Information I have Here is the .diff genrated for asterisk 1.4.27 but is almost the same for other version.
I Think this may be usefull for general use of queues in asterisk.
****** ADDITIONAL INFORMATION ******
(inline diff removed by lmadsen)
|Comments:||By: David Woolley (davidw) 2010-02-08 06:31:16.000-0600|
1) How does this differ from wrapuptime?
2) Digium will not look at any code unless it is submitted as an attachment, with "code or documentation" ticked, and after you have submitted a valid submission licence agreement.
By: Hernan Martinez (elhozo) 2010-02-08 07:12:07.000-0600
wrapuptime is a fixed time (whatever you set in the queue.conf) In his case the time is varable, the agent is paused as sson as teh calls ends (just like wrapuptime) and he remains paused all the time he needs until he decided to unpause.
What shoud I upload? the diff?
By: David Woolley (davidw) 2010-02-08 07:25:52.000-0600
diff -u against the HEAD trunk version, as new features are only accepted against the trunk.
By: Leif Madsen (lmadsen) 2010-02-08 09:58:42.000-0600
I've had this idea for a while, however the way I'd have implemented it would be different.
I'd set a static wrap-up time, at which point if an agent finishes early, they can then enter a code into the phone (** or something) to terminate their wrap-up time early.
This way you'd just set the wrap-up time to something reasonable, like 300 or something (5 minutes) and if finished early, they can then enter the 'return early' code.
Otherwise, this just seems like this could be implemented with some clever dialplan that pauses the agent just before calling them, and then allowing the agent to unpause themselves from their phone.
i.e.: call the agent via a Local channel, before the Dial(SIP/3805) do a PauseQueueMember(Local/3805@queue_members/n...) or something like that, and then call the agent via Dial() as usual. The Local channel will then be pauses at the end of the call, and that queue member will then not get a call until they use UnPauseQueueMember().
No code changes needed for what you've implemented from what I can tell -- my suggested change would be welcome to wrapup-time though.
By: David Woolley (davidw) 2010-02-08 10:08:18.000-0600
You didn't tick "code or documentation" for trunk, so you need to re-submit it with that set. It won't appear until your licence grant is accepted.
By: Hernan Martinez (elhozo) 2010-02-08 10:12:34.000-0600
I have upload to file, one is the diff with main trunk and teh other the diff with 1.4 trunk.
This may be done by dialplan, but I dont know if it is posible to know wich extension is going to be called from the dial plan, this task is done by app_queue (i think).
The idea of making a shorter wrapuptime is very similar, in both way is to make a variable wrapuptime. I done this way so it can be also measured (it is some time very important to know the average time and agent needs to complete the task) thats why it has a diferent pasue identifier.
In asterisk 1.6 I use the field "Reason" to do the same task, in 1.4 I change the value of the field "Paused" in manager.
By: Hernan Martinez (elhozo) 2010-02-08 10:15:25.000-0600
Thanks davidd I didnot notie that befeore, now I submited with the checkbok ok and filled the agreement
By: Leif Madsen (lmadsen) 2010-02-08 14:39:35.000-0600
Marking this as Confirmed until a code review can be done.
By: raarts (raarts) 2010-03-08 01:43:30.000-0600
I'd like to support this patch. Yes, you *can* do it in the dialplan, but that is awkward, and reporting is very important. elhozo, can you put it up the reviewboard?
By: Hernan Martinez (elhozo) 2010-03-09 13:42:49.000-0600
raarts, I'm not sure how to put in the reviewbord, can u pls explainme how?
By: raarts (raarts) 2010-03-09 13:56:27.000-0600
It's easy. Go to https://reviewboard.asterisk.org/, create an account there, and click New Review Request. Afterwards post the URL to your review request here.
By: Nico Kooijman (syspert) 2010-03-19 09:42:27
downloaded the patch and created a correct one for trunk
By: Nico Kooijman (syspert) 2010-03-19 09:42:59
Tested the patch, result was correct
By: valon24 (valon24) 2010-05-06 16:25:58
Does this pause an agent after the call is transferred?
By: raarts (raarts) 2010-06-12 16:04:47
I think that the basic flaw of this patch is that it misuses queuepause for wrapup. It would be better if wrapuptime processing would be improved so that it could be dynamic per call.
Maybe setting wrapuptime to -1 or some very large value, and add a DoneWrapupQueueMember app and AMI event to end wrapuptime?
By: raarts (raarts) 2010-06-14 16:34:44
Yes, this patch pauses the agent after attended transfer.
By: Paul Belanger (pabelanger) 2010-06-14 17:03:59
This will require documentation for the .config file plus CHANGES and UPGRADE.txt
By: raarts (raarts) 2010-06-20 15:26:53
pabelanger: do you think this patch is eligible for inclusion? Even though we use this patch, and we're satisfied, the solution is not particularly elegant.
By: Leif Madsen (lmadsen) 2011-04-14 08:37:19
I don't agree with this approach. The correct approach is a modification to the wrap-up time to permit a longer wrap-up time, and then allow people to return early. This patch can't go in as-is.
By: Leif Madsen (lmadsen) 2011-04-14 08:37:58
Moved to feedback. As this patch can't go in as-is, someone will need to submit a patch that enhances wrap-up time. Otherwise we'll have to suspend this issue for now.
By: antonio (antonio) 2011-04-17 13:49:41
My problem is: how would someone indicate he's done wrapping up, and wants to return early?
Setting a long wrapuptime is easy, but returning early...Would you accept a patch which creates a dialplan app for that purpose, and maybe an AMI command?
By: Hernan Martinez (elhozo) 2011-06-19 18:24:06.004-0500
The startegy of setting a -1 to wrapup time or other was also in my mind when I decied to chosse to implement this pauseaftercall, but then I decide to go with this because is easier, has less code modification, and covers a much wider scenarios, including statistics porpouses.
I have implemented asterisk in a couple of call centers and many need to know the time that the agent is paused afer finishing the call and do some stats over that info.
I thinks that maybe there can be also a variable wrapuptime, but that was not what i need, what i needed and what this patchs was done for is for pausing the agent, meaning that it will no being able to receive calls and also being able to identify how that time was used (that he is in afetercallpause). For stats porpouses wrapup time can not be diferentiated (at least as is now)
What this was made for is for pausing the agent (with all that this implies) it can also be used as a variable wrapuptime but it was designed is a more easy was with as less changes as posible to existing code, and with no need to extra AMI comands, just a new value in one field of an existing command.
Maybe it should not be into main source, I just send this because may be some people is in the same situation and this may be usefull for them.
By: Leif Madsen (lmadsen) 2011-11-02 14:43:10.285-0500
antonio: sure, it could be a dialplan function and AMI command. It should probably also include a CLI command.