Repository navigation
NethCTI server: customers management lists ignore the null call time for abandoned queue calls #8248
Description
Description
Steps to reproduce
- In the NethVoice reports settings set the null call time (
null_call_time), e.g. 5 seconds - Call a queue and hang up while waiting, before the threshold (e.g. after 2 seconds): Asterisk logs an
ABANDONevent with a wait time (data3) below the threshold - Open Queues > Customers management or Queue manager > Customers management with outcome Not managed
Expected behavior
A call abandoned by the caller before the null call time is an invalid call, as it already is in the queue statistics, and it is not shown in the customers management lists, so operators are not asked to call it back. The threshold applies only to ABANDON: timeouts, exit with key, empty/full queue and the other exits are always lost calls and stay in the lists.
Actual behavior
Both customers management lists show the abandoned call as a lost call to be recalled, while the Queue manager statistics (Dashboard, Queues management chart, Summary "Invalid calls") count the same call as invalid. The null call time set in the reports has no effect on the lists.
Reproduced on a test instance: a caller abandoning queue 401 after 2 seconds (threshold 5 seconds) is returned by both GET /astproxy/queue_recall/12/401/lost and GET /astproxy/qmanager_queue_recall/12/401/lost.
Root cause
nethcti-server reads the threshold as nullCallPeriod (from null_call_time of nethvoice-report, default 5) and uses it only in the statistics queries of plugins/dbconn/plugins/dbconn_ast_proxy.js:
-- getQueueStats
COUNT(IF(event="ABANDON" AND data3<${nullCallPeriod}, 1, NULL)) AS `tot_null`,
COUNT(IF((event IN ("EXITEMPTY","EXITWITHKEY","EXITWITHTIMEOUT","FULL","JOINEMPTY","JOINUNAVAIL")) OR (event="ABANDON" AND data3>=${nullCallPeriod}), 1, NULL)) AS `tot_failed`,Both customers management lists are served by getRecall (queue_recall and qmanager_queue_recall only differ in the authorized queues), which builds the lost calls with queryLostCalls without any threshold:
WHERE event IN ("ABANDON", "EXITWITHTIMEOUT", "EXITWITHKEY", "EXITEMPTY", "FULL", "JOINEMPTY", "JOINUNAVAIL")Suggested fix
Pass nullCallPeriod from getRecallData to getRecall and apply the same rule used by the statistics to the lost calls:
WHERE (event IN ("EXITWITHTIMEOUT", "EXITWITHKEY", "EXITEMPTY", "FULL", "JOINEMPTY", "JOINUNAVAIL")
OR (event = "ABANDON" AND CAST(data3 AS UNSIGNED) >= <nullCallPeriod>))Components
nethcti-server(branchns8, shipped inghcr.io/nethesis/nethvoice-cti-server)- NethVoice module 1.7.12 on NS8
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Progress
Activity
tonyco97 commentedon Oct 19, 2026
Test
Test Case 1
Test Case 2
Test Case 3
Test Case 4
Test Case 5