brett05
(Tunisie)
January 7, 2021, 6:48pm
1
How to limit number inbound calls per extension in context asterisk or freepbx
exemple did number point to queue , and inside queue they are extension ( 1000 - 2000 - 3000 ) and i want just 1000 can answer 5 call throw the did or the queue per days ?
it’s there and solution or suggestion.
brett05
(Tunisie)
January 7, 2021, 6:55pm
2
i do not speak about simultaneous call per extension i want limit per received call or answered call per extension inside queue , please any help
comtech
(Com Tech)
January 7, 2021, 7:11pm
3
This is not something that exists today.
You could:
Code something to keep track of calls per agent and route accordingly.
Have the agent log out of the queue after 5 calls.
brett05
(Tunisie)
January 7, 2021, 7:20pm
4
any way to 1. Have the agent log out of the queue after 5 calls. ?
any code exemple or contex that i can try ?
dicko
(dicko)
January 7, 2021, 8:07pm
5
I would start with an mysql query where the queue is 5556 and the agent is at 1020 much like
SELECT dstchannel FROM cdr WHERE `lastapp`='Queue' AND `dst`=5556 AND `dstchannel` LIKE '%1020%' AND `calldate` >= CURRENT_DATE() HAVING COUNT(*) > 5;
You could then remove or pause the agent.
brett05
(Tunisie)
January 7, 2021, 8:09pm
6
Maybe but i don’t think the query need count the number of anwsered call per agent
dicko
(dicko)
January 7, 2021, 8:10pm
7
then leave out the HAVING clause
brett05
(Tunisie)
January 7, 2021, 8:17pm
8
Did you have any ready exemple
dicko
(dicko)
January 7, 2021, 8:32pm
9
Not really, write your query and having found the culprit I would
rasterisk -x 'queue pause member LOCAL/1020@from-queue'
unpause when you want.
brett05
(Tunisie)
January 7, 2021, 8:50pm
10
Great but this will be manual work
dicko
(dicko)
January 7, 2021, 8:55pm
11
Not if you script it and make a cronjob
brett05
(Tunisie)
January 7, 2021, 9:02pm
12
Emm great idea too with crontab and script not bad , but how can count call in real time for each agent
brett05
(Tunisie)
January 7, 2021, 9:02pm
13
So after i can pause and unpause
dicko
(dicko)
January 7, 2021, 9:06pm
14
By using AMI but that’s not trivial as it wont tell you directly how many calls taken today
dicko
(dicko)
January 7, 2021, 9:21pm
15
a template for a cronjob
rasterisk -x "queue pause member $(mysql asteriskcdrdb -bsNe '<YOUR QUERY THAT RETURNS ONE DSTCHANNEL like Local/1020@from-queue-000004a4;1>'|grep -v "$^"|sed 's/;1.*//'|cut -d '/' -f2|cut -d '-' -f1,2)"
1 Like
brett05
(Tunisie)
January 7, 2021, 10:53pm
16
Thank you , you have put me on road
I will try to do same thing with that
1 Like
system
(system)
Closed
June 3, 2021, 11:03pm
17
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.