New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting ds_reload to cfg script #664
Conversation
@@ -1350,6 +1350,20 @@ onreply_route { | |||
</programlisting> | |||
</example> | |||
</section> | |||
<section id="dispatcher.f.reload"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dispatcher.f.ds_reload is correct
You can already run rpc commands from the script. What does this patch add? |
Thanks for the input. How would you run the RPC commands from the script? I just thought it would be better to call an internal function. |
There is support in the jsonrpc-s module. Kind of hidden, but still there :-) http://kamailio.org/docs/modules/4.4.x/modules/jsonrpc-s.html#jsonrpc-s.f.jsonrpc_exec |
Didn't see that one coming! ;-) |
It's ok to export this function directly, can be handy sometimes to use it directly, without rpc workaround. But the description needs to be amended, because the reload is not disabled anymore for algorthm 10 (it was some time ago). |
@oej Even though I see you're solution as a valid solution, I still see this exported function as valuable. Using RPC to trigger an internal mechanism can overload this procedure. |
@miconda I'll change the description, didn't know that fact. |
I agree that it is useful as a simplification, but wanted to know if there was some additional benefits. You may want to add counters on how many dispatcher targets and groups that was loaded or something like that while you are at it - or a checksum check so I can check if the list was actually changed. Just some ideas to make this function an improvement :-) |
@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! |
No description provided.