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@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@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users