[SR-Users] Kamailio and exporting in-memory dialplan entries to another database

Karsten Horsmann khorsmann at gmail.com
Thu Mar 14 14:25:47 CET 2019


Hello Olli,

i did that the opposite way.
I trigger an mysql-procedure evers 300 seconds and i fill in and reload my
dialplan.
Maybe an idea for you.

loadmodule "rtimer.so"
loadmodule "sqlops.so"
(and jsonsrpc etc).

modparam("rtimer", "timer", "name=refreshdialplan;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=refreshdialplan;route=REFRESHDIALPLAN")
modparam("sqlops", "sqlcon", "cb=>mysql://someuser:somedbpass@somehost
/kamailio")

#!ifdef WITH_REFRESHDIALPLAN
route[REFRESHDIALPLAN] {
        sql_query("cb","call  refresh_dialplan()","rb");
        jsonrpc_exec('{"jsonrpc": "2.0","method": "dialplan.reload"}');
        jansson_get("result", $jsonrpl(body), "$var(dialplanresult)");
        xlog("L_INFO", "call refresh_dialplan() mysql procedure, jsonrpc
dialplan.reload result $var(dialplanresult)\n");
}
#!endif


Am Fr., 8. März 2019 um 08:45 Uhr schrieb Olli Attila <attiolli at gmail.com>:

> Hello,
>
> I was wondering that is there a command / procedure available in
> Kamailio that would do dialplan.dump on a certain dialplan and then
> export/write  the output to another sql database where another
> dialplan table is present? This would be a sort of backup procedure
> that I'm planning.
>
> Cheers,
> Olli
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Mit freundlichen Grüßen
*Karsten Horsmann*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190314/bfa36afe/attachment.html>


More information about the sr-users mailing list