<div dir="auto">Wow! I've been *-ing for about 6 years and had literally no idea about that! <div dir="auto"><br></div><div dir="auto">I can see a way I could put it to a different use, but it seems to be a bit of a sledgehammer to crack the walnut of "how many current callers" compared to one line of (albeit hacky) dialplan. </div><div dir="auto"><br></div><div dir="auto">That's making me sound ungrateful. I don't mean to be!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 14 Jun 2020, 22:39 Steve Edwards, <<a href="mailto:asterisk.org@sedwards.com">asterisk.org@sedwards.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, 14 Jun 2020, Jonathan H wrote:<br>
<br>
> Thank you... but "just update the database" - hmm, what database?<br>
<br>
I used MySQL.<br>
<br>
> Did you mean ARI? I still can't find the command! The asterisk wiki is <br>
> somewhat, um... spread around!<br>
<br>
ARA as in Asterisk RealTime Architecture<br>
<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration" rel="noreferrer noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration</a><br>
<a href="https://www.voip-info.org/asterisk-realtime/" rel="noreferrer noreferrer" target="_blank">https://www.voip-info.org/asterisk-realtime/</a><br>
<br>
As I recall (back from 2015), you tell Asterisk which 'configuration file' <br>
you want to read from MySQL like this:<br>
<br>
# /etc/asterisk/extconfig.conf<br>
<br>
[settings]<br>
         musiconhold.conf                = mysql,vchat,static<br>
;       musiconhold.conf                = mysql,vchat,musiconhold<br>
<br>
I have no idea if this will help, but here are the tables as I defined them back in 2015.<br>
<br>
         create  table   if not exists   static<br>
                 (<br>
                   id                    int(11) not null auto_increment<br>
                 , cat_metric            int(11) not null default '0'<br>
                 , var_metric            int(11) not null default '0'<br>
                 , commented             int(11) not null default '0'<br>
                 , filename              varchar(128) not null default ''<br>
                 , category              varchar(128) not null default 'default'<br>
                 , var_name              varchar(128) not null default ''<br>
                 , var_val               varchar(128) not null default ''<br>
                 , primary key           (id)<br>
                 )<br>
                 ;<br>
<br>
-- defaults<br>
         set @CAT_METRIC                 = 0;<br>
         set @FILENAME                   = 'musiconhold.conf';<br>
         set @VAR_METRIC                 = 0;<br>
<br>
-- Funk Dance<br>
         set @COMMENTED                  = 0;<br>
         set @NAME                       = 'Funk Dance';<br>
         insert into static set<br>
                   cat_metric            = @CAT_METRIC<br>
                 , category              = @NAME<br>
                 , commented             = @COMMENTED<br>
                 , filename              = @FILENAME<br>
                 , var_metric            = @VAR_METRIC<br>
                 , var_name              = 'directory'<br>
                 , var_val               = concat('/source/src/tmp/T2/moh/', @NAME, '/')<br>
                 ;<br>
         insert into static set<br>
                   cat_metric            = @CAT_METRIC<br>
                 , category              = @NAME<br>
                 , commented             = @COMMENTED<br>
                 , filename              = @FILENAME<br>
                 , var_metric            = @VAR_METRIC<br>
                 , var_name              = 'mode'<br>
                 , var_val               = 'files'<br>
                 ;<br>
         insert into static set<br>
                   cat_metric            = @CAT_METRIC<br>
                 , category              = @NAME<br>
                 , commented             = @COMMENTED<br>
                 , filename              = @FILENAME<br>
                 , var_metric            = @VAR_METRIC<br>
                 , var_name              = 'sort'<br>
                 , var_val               = 'random'<br>
                 ;<br>
         insert into static set<br>
                   cat_metric            = @CAT_METRIC<br>
                 , category              = @NAME<br>
                 , commented             = @COMMENTED<br>
                 , filename              = @FILENAME<br>
                 , var_metric            = @VAR_METRIC<br>
                 , var_name              = 'type'<br>
                 , var_val               = 'preset'<br>
                 ;<br>
--      insert into static set<br>
--                cat_metric            = @CAT_METRIC<br>
--              , category              = @NAME<br>
--              , commented             = @COMMENTED<br>
--              , filename              = @FILENAME<br>
--              , var_metric            = @VAR_METRIC<br>
--              , var_name              = 'application'<br>
--              , var_val               = '/usr/bin/mpg123 --mono -b 0 -f 8192 -q -r 8000 -s -@ <a href="http://206.190.136.141:5022/Live" rel="noreferrer noreferrer" target="_blank">http://206.190.136.141:5022/Live</a>'<br>
--              ;<br>
<br>
-- FILES<br>
--      set @COMMENTED                  = 0;<br>
--      insert into static set<br>
--                cat_metric            = @CAT_METRIC<br>
--              , category              = 'FILES'<br>
--              , commented             = @COMMENTED<br>
--              , filename              = @FILENAME<br>
--              , var_metric            = @VAR_METRIC<br>
--              , var_name              = 'directory'<br>
--              , var_val               = '/var/lib/asterisk/moh/'<br>
--              ;<br>
--      insert into static set<br>
--                cat_metric            = @CAT_METRIC<br>
--              , category              = 'FILES'<br>
--              , commented             = @COMMENTED<br>
--              , filename              = @FILENAME<br>
--              , var_metric            = @VAR_METRIC<br>
--              , var_name              = 'mode'<br>
--              , var_val               = 'files'<br>
--              ;<br>
<br>
         create  table   if not exists   musiconhold<br>
                 (<br>
                   name                  varchar(80) not null<br>
                 , mode                  varchar(80) not null default ''<br>
                 , directory             varchar(255) not null default ''<br>
                 , application           varchar(255) not null default ''<br>
                 , digit                 char(1) not null default ''<br>
                 , sort                  varchar(16) not null default ''<br>
                 , format                varchar(16) not null default ''<br>
                 , stamp                 timestamp<br>
                 )<br>
                 ;<br>
<br>
         insert into musiconhold set<br>
                   name                  = 'default'<br>
                 , directory             = '/var/lib/asterisk/moh'<br>
                 , application           = ''<br>
                 , mode                  = 'files'<br>
                 , digit                 = ''<br>
                 , sort                  = 'random'<br>
                 , format                = ''<br>
                 ;<br>
<br>
         insert into musiconhold set<br>
                   application           = '/usr/bin/mpg123 --mono -b 0 -f 8192 -q -r 8000 -s -@ <a href="http://streaming.radionomy.com/80sFunkDanceMusic" rel="noreferrer noreferrer" target="_blank">http://streaming.radionomy.com/80sFunkDanceMusic</a>'<br>
                 , mode                  = 'custom'<br>
                 , name                  = 'foobar'<br>
                 ;<br>
<br>
Hope this helps rather than hinders :)<br>
<br>
-- <br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards       <a href="mailto:sedwards@sedwards.com" target="_blank" rel="noreferrer">sedwards@sedwards.com</a>      Voice: +1-760-468-3867 PST<br>
             <a href="https://www.linkedin.com/in/steve-edwards-4244281" rel="noreferrer noreferrer" target="_blank">https://www.linkedin.com/in/steve-edwards-4244281</a><br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div>