Summary:ASTERISK-11254: In "Static Realtime" app_meetme does a complete SQL query for each "MeetMe()" execution
Reporter:IƱaki Baz Castillo (ibc)Labels:
Date Opened:2008-01-17 10:28:09.000-0600Date Closed:2011-06-07 14:08:02
Versions:Frequency of
Description:I've configured MeetMe in Static Realtime [1]:

 meetme.conf => odbc,my-db,meetme

When the dialplan executes a "MeetMe()" this SQL query is done (for every MeetMe() execution):

 SELECT cat_metric, category, var_name, var_val FROM meetme WHERE
 filename='meetme.conf' AND commented=0 ORDER BY cat_metric DESC, var_metric
 ASC, category, var_name

As you scan see, this SQL query involves ALL the table, so in a large enviroment with lots of conferences it would be a real problem.

In theory, Static Realtime means that the table data is just loaded at startup (or when reloading) but MeetMe() reads the "meetme.conf" every time as it is noted in the top of "meetme.conf":

 ; This configuration file is read every time you call app meetme()

So maybe it's not a bug but a wrong design that could be solved in two ways:

a) Making app_meetme equivalent to any other application that reads the conf file at the startup or when reloading (maybe it could exist "CLI> meetme reload" ?).

b) Fixing static realtime not to query the whole database table for every MeetMe execution.

IMHO the main problem is a)  (why does app_meetme read "meetme.conf" file for each execution??).


[1] Asterisk Static Realtime: http://www.voip-info.org/wiki/view/Asterisk+RealTime+Static
Comments:By: Russell Bryant (russell) 2008-01-17 10:30:54.000-0600

You're right, the reason that this happens is because meetme.conf gets re-read at every execution of the application.  However, I do not consider this a bug, but instead a request for an enhancement, which we do not currently process on bugs.digium.com