[Home]

Summary:ASTERISK-27040: MOH/Realtime: 'moh show classes' does not show classes defined in database
Reporter:Benjamin Keith Ford (bford)Labels:
Date Opened:2017-06-07 15:48:30Date Closed:2017-06-12 10:15:41
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_musiconhold
Versions:11.25.1 13.16.0 14.5.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-25836 Realtime MoH not working
Environment:Ubuntu16.04Attachments:( 0) full.txt
Description:When Asterisk is configured to run with ODBC and MOH is defined in the database, the CLI command 'moh show classes' does not return anything on the classes defined in the database. MOH still works despite the CLI returning nothing, and you can see the database being pinged for the MOH class through the CLI when, for example, one phone puts another on hold and MOH starts (with debug and verbose bumped up).

Attached log from Asterisk (11.25.1) that shows the database being queried for MOH when putting a phone on hold. The first result when searching 'musiconhold' shows the SELECT statement from the musiconhold table, confirming that Asterisk does see the realtime classes.

PostgreSQL setup:

Table: musiconhold
name - 'default'
mode - 'files'
directory - '/var/lib/asterisk/moh'
Comments:By: Rusty Newton (rnewton) 2017-06-07 16:30:59.958-0500

{quote}
MOH still works despite the CLI returning nothing, and you can see the database being pinged for the MOH class through the CLI (with debug and verbose bumped up).
{quote}

We only saw it work with another activity like making a call where MOH was inititated right?

I think we didn't see anything in the debug when we ran "moh show classes". That is it seemed to be a silent failure.



By: Joshua C. Colp (jcolp) 2017-06-07 16:35:52.574-0500

Generally older generation realtime stuff works like this, CLI commands only show you what is in memory so I'm not surprised.

By: Benjamin Keith Ford (bford) 2017-06-07 20:10:52.207-0500

{quote}
We only saw it work with another activity like making a call where MOH was inititated right?
{quote}
Yep, set up two phones and put on on hold to trigger MOH - this is when you can see Asterisk pinging the database.
{quote}
I think we didn't see anything in the debug when we ran "moh show classes". That is it seemed to be a silent failure.
{quote}
"moh show classes" doesn't return anything on the realtime configuration; it essentially just does nothing without having the standard /etc/asterisk/musiconhold.conf.