Skip to content

NethCTI server: customers management lists ignore the null call time for abandoned queue calls #8248

Open

Description

@tonyco97

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 ABANDON event 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 (branch ns8, shipped in ghcr.io/nethesis/nethvoice-cti-server)
  • NethVoice module 1.7.12 on NS8

Activity

  1. added this to the NethVoice 1.8 milestone on Oct 19, 2026
  2. self-assigned this
    on Oct 19, 2026
  3. added theissue type on Oct 19, 2026
  4. added
    nethvoiceBug or features releted to the NethVoice project
    nethvoice-ctiThe issue is related to NethLink (NethVoice Web client)
    on Oct 19, 2026
  5. tonyco97 commented on Oct 19, 2026

    @tonyco97
    Author

    Test

    Test Case 1

    • In the reports settings set the null call time to 5 seconds
    • Call a queue and hang up while waiting after 2-3 seconds
    • Queues > Customers management: the call is not listed
    • Queue manager > Customers management: the call is not listed

    Test Case 2

    • Call a queue and hang up while waiting after more than 5 seconds
    • The call is listed as lost in both Customers management lists

    Test Case 3

    • Call a queue and wait until the queue timeout (no agent answers)
    • The call is listed in both Customers management lists, even if the timeout is shorter than the null call time

    Test Case 4

    • Change the null call time in the reports (e.g. 10 seconds) and wait about one minute
    • A call abandoned after 7 seconds is no longer listed

    Test Case 5

    • Queue manager > Dashboard and Summary: invalid and failed counters are the same as before the update
  6. moved this from Todo to In Progress in NethVoiceon Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

nethvoiceBug or features releted to the NethVoice projectnethvoice-ctiThe issue is related to NethLink (NethVoice Web client)

Type

Projects

  • Status
    In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions