You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/667
-- Commit Summary --
* dialplan: Added dp_reload function
-- File Changes --
M modules/dialplan/dialplan.c (24) M modules/dialplan/doc/dialplan.xml (7) M modules/dialplan/doc/dialplan_admin.xml (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/667.patch https://github.com/kamailio/kamailio/pull/667.diff
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667
Why not support reload from text file too? Why only database?
(Sorry for all the questions)
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225142409
Hi @oej, this just mimics the actual RPC and IM reload implementation...
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225143617
No it doesn't. ``` /* * RPC command to reload dispatcher destination sets */ static void dispatcher_rpc_reload(rpc_t* rpc, void* ctx) { if(!ds_db_url.s) { if (ds_load_list(dslistfile)!=0) { rpc->fault(ctx, 500, "Reload Failed"); return; } } else { if(ds_reload_db()<0) { rpc->fault(ctx, 500, "Reload Failed"); return; } } return; } ```
From dispatcher.c - notice the reload from table?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225143980
Notice this _PR_ is about dialplan (not dispatcher)...
`/* * RPC command to reload dialplan table */ static void dialplan_rpc_reload(rpc_t* rpc, void* ctx) { if (dp_connect_db() < 0) { LM_ERR("failed to reload rules fron database (db connect)\n"); rpc->fault(ctx, 500, "DB Connection Error"); return; }
if(dp_load_db() != 0){ LM_ERR("failed to reload rules fron database (db load)\n"); dp_disconnect_db(); rpc->fault(ctx, 500, "Dialplan Reload Failed"); return; }
dp_disconnect_db(); return; } `
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225144937
Haha me bad. Sorry!
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225145366
@miconda I'll just leave this _PR_ as it is, please let me know if you want to integrate this change and if you'll merge the changes and close the _PR_ or you want me to do it. Thanks!
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225148846
Still laughing. My head was full of dispatcher code as I was reading that code for other reasons, so I fall into a trap. Awfully sorry for that.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225154870
Will review again and possibly commit.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#issuecomment-225154905
Merged #667.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/667#event-688438923