We have a log file where we have a number of ID numbers for the shell script to retrieve the time in the log as below
cat /var/log/asterisk/full | grep C-0000335e | grep 'Spawn extension' | grep default
[2019-11-28 21:52:48] VERBOSE[C-0000335e] pbx.c: Spawn extension (default, Queue-206611, 2) exited non-zero on 'SIP/fcplatform-00004e64'
cat /var/log/asterisk/full | grep C-0000335e | grep queue_time=
[2019-11-28 21:52:43] VERBOSE[C-0000335e] res_agi.c: [login to view URL]: Query is UPDATE queue_calls set queue_time='13',agent='l/203@context-out/n',status='0',call_time=Now() where unique_id='1574974337.190819' and queue_name='206611'
The script should then state where each ID number we have in a file, how long each ID number has been used
In the example above, 5 seconds is spent
It must provide it for all the ID numbers in the list - Individual. course