You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NethVoice IVR report: IVR name missing because dialplan no longer logs it in IVRAPPEND #8244
The IVR report no longer shows the IVR name for recent calls. The data_ivr_* tables read the name from queue_log_history.data4 (data_ivr.sql), but the generated dialplan no longer writes the name in the IVRAPPEND queue log event.
Current behavior
The IVR context generated by FreePBX now sets IVRSELECTION with only the selected digit and the IVR context:
-- Executing [1@ivr-5:2] Set("PJSIP/xxx-00000109", "IVRSELECTION=1|ivr-5") in new stack
-- Executing [1@ivr-5:4] QueueLog("PJSIP/xxx-00000109", "NONE,1792164024.4143,NONE,INFO,IVRAPPEND|1|ivr-5") in new stack
The resulting queue_log row has:
field
value
data1
IVRAPPEND
data2
1 (choice)
data3
ivr-5 (IVR id)
data4
empty
So ivr_name is empty in data_ivr_year, data_ivr_month, data_ivr_week and data_ivr_day.
Expected behavior
The IVR report shows the IVR name, as it did before.
Steps to reproduce
Create an IVR and route an inbound call to it.
Select an option during the call.
Check the IVRAPPEND row in queue_log: data4 is empty.
Run the report views: ivr_name is empty for that IVR.
Proposed fix
Option A (report side, independent from dialplan changes): resolve the name from asterisk.ivr_details, falling back to data4 for historical rows and to the IVR id for deleted IVRs:
SELECT
DATE_FORMAT(q.time, "%Y") AS period,
q.data3AS ivr_id,
MAX(COALESCE(NULLIF(q.data4, ''), i.name, q.data3)) AS ivr_name,
q.data2AS choice,
count(*) AS tot
FROM queue_log_history q
LEFT JOINasterisk.ivr_details i
ONi.id= CAST(SUBSTRING_INDEX(q.data3, '-', -1) AS UNSIGNED)
WHEREq.queuename='NONE'ANDq.agent='NONE'ANDq.event='INFO'ANDq.data1='IVRAPPEND'GROUP BY period, ivr_id, choice
ORDER BY period ASC;
This requires the report DB user to have SELECT on asterisk.ivr_details and both databases on the same MariaDB instance. Rows without data4 will show the current IVR name, so renamed IVRs will show the new name on old data.
Option B (dialplan side): restore the IVR name in IVRSELECTION (${EXTEN}|ivr-N|<name>) in the IVR module dialplan generator, so data4 is populated again.
Activity