Skip to content
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

Merged
merged 5 commits into from Jun 14, 2016
Merged

Conversation

luismartingil
Copy link
Member

No description provided.

@@ -1350,6 +1350,20 @@ onreply_route {
</programlisting>
</example>
</section>
<section id="dispatcher.f.reload">
Copy link
Member

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

@oej
Copy link
Member

oej commented Jun 9, 2016

You can already run rpc commands from the script. What does this patch add?

@luismartingil
Copy link
Member Author

luismartingil commented Jun 9, 2016

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.

@oej
Copy link
Member

oej commented Jun 9, 2016

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

@luismartingil
Copy link
Member Author

Didn't see that one coming! ;-)

@miconda
Copy link
Member

miconda commented Jun 9, 2016

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).

@luismartingil
Copy link
Member Author

luismartingil commented Jun 9, 2016

@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.

@luismartingil
Copy link
Member Author

luismartingil commented Jun 9, 2016

@miconda I'll change the description, didn't know that fact.

@oej
Copy link
Member

oej commented Jun 9, 2016

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 :-)

@luismartingil
Copy link
Member Author

@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!

@miconda miconda merged commit a4ec3b5 into master Jun 14, 2016
@miconda miconda deleted the luismartingil/dispatcher_reload branch June 14, 2016 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants