I need code to send a line to the [login to view URL] when a call is transferred.
The current code I use is below but the UNIQUEID is incorrect and I need the duration and billsec added.
exten => s,n,ExecIf($["${BLINDTRANSFER}" != ""]?System(echo "${EPOCH}|${UNIQUEID}|${FROMEXTEN}|Local/${CUT(agent,@,1)}@from-queue|COMPLETECALLER|0|${CDR(billsec)}|${CDR(duration)}" >> /var/log/asterisk/queue_log ))
Correct UNIQUEID
1524458999|1524458986.618|56|Local/105@from-queue|COMPLETECALLER|2|11|1
UNIQUEID changes on Transfer
1524458997|1524458986.620|56|Local/105@from-queue|COMPLETECALLER|0|0|
hi,
Can send the trimmed caller ID info to the log on call engange and on call disconnect and calculate the call duration also.
So from the log you can know the call cost also
WE can add the correct unique id and the call duration to the url and add to the log
I have a log that I did and can share to you on chat
Best regards,
Shakthi
Have you considered putting the queue log into a mysql DB instead of a flat file? You can get more useful information about the status of what's happening in the queue.
Your uniqueID changes because the part following the (.) is the number of calls yours system has handled since restart. So you can ignore that part of the number as it's not really associated with the call itself. When a number is transferred the queue log also keeps track of the change in UniqueID
Here's how the queue log looks in MySql. For UniqueID 1474121109.1944284 the caller was in the queue for 49 seconds, they entered the queue at position 2 and exited the queue at position 2. It was a test number just in case you're wondering
2 2016-09-17 21:05:16.690900 1474121109.1944284 8006 NONE ENTERQUEUE 012620441 2 9/17/2016 9:05:16 PM
3 2016-09-17 21:06:00.721957 NONE NONE NONE CONFIGRELOAD 9/17/2016 9:06:00 PM
4 2016-09-17 21:06:03.181296 NONE NONE NONE CONFIGRELOAD 9/17/2016 9:06:03 PM
5 2016-09-17 21:06:05.597116 1474121109.1944284 8006 NONE ABANDON 2 2 49 9/17/2016 9:06:05 PM