It is possible to update value of max_while_loops dynamically in config file?
For example, there could be a need to increase the max in some while loop, but after the loop is done, decrease it again for other loops.
There exists an rpc command to do that, but I haven't found how to do it in config file.
I tried
@cfg_seti.core.max_while_loops = 200;
but got syntax error.
-- Juha
Hello,
On 12.04.21 12:40, Juha Heinanen wrote:
It is possible to update value of max_while_loops dynamically in config file?
For example, there could be a need to increase the max in some while loop, but after the loop is done, decrease it again for other loops.
There exists an rpc command to do that, but I haven't found how to do it in config file.
I tried
@cfg_seti.core.max_while_loops = 200;
but got syntax error.
the jsonrpcs module exports a function that executes rpc commands from command line, jsonrpcs_exec() iirc.
Cheers, Daniel
On 12.04.21 14:42, Daniel-Constantin Mierla wrote:
Hello,
On 12.04.21 12:40, Juha Heinanen wrote:
It is possible to update value of max_while_loops dynamically in config file?
For example, there could be a need to increase the max in some while loop, but after the loop is done, decrease it again for other loops.
There exists an rpc command to do that, but I haven't found how to do it in config file.
I tried
@cfg_seti.core.max_while_loops = 200;
but got syntax error.
the jsonrpcs module exports a function that executes rpc commands from command line,
Obviously above I wanted to write: from config file
jsonrpcs_exec() iirc.
Cheers, Daniel
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - Online May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
On 12.04.21 14:52, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
the jsonrpcs module exports a function that executes rpc commands from command line, jsonrpcs_exec() iirc.
Thanks for the tip. It sounds a bit heavy weight though.
It is like the rpc command, but faster, without the network/fifo file I/O, all operations are in memory. I do not expect there is any significant performance penalty, specially if you need it in exceptional cases.
Cheers, Daniel
On 12.04.21 15:09, Daniel-Constantin Mierla wrote:
On 12.04.21 14:52, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
the jsonrpcs module exports a function that executes rpc commands from command line, jsonrpcs_exec() iirc.
Thanks for the tip. It sounds a bit heavy weight though.
It is like the rpc command, but faster, without the network/fifo file I/O, all operations are in memory. I do not expect there is any significant performance penalty, specially if you need it in exceptional cases.
Btw, whenever there is a concern in performance, one can configure latency measurement for actions with:
* https://www.kamailio.org/wiki/cookbooks/5.4.x/core#latency_limit_action
Set it to a low value and you should see in the logs how long it takes to execute the actions. The latency_log has to be less or equal to debug value.
Cheers, Daniel
Hey Juha,
I'm wondering if you ever got this working using jsonrpc_exec() ?
I have the same situation as you, where I'd like to increase max_while_loops for a certain task, and then lower it again, and I'm not sure of the correct format for the jsonrpc_exec() command for this. Also, did you have to load any extra modules to get it working? (maybe 'cfg_rpc' ?)
Let me know!
Thanks, Joel.
On Mon, Apr 12, 2021 at 5:53 AM Juha Heinanen jh@tutpro.com wrote:
Daniel-Constantin Mierla writes:
the jsonrpcs module exports a function that executes rpc commands from command line, jsonrpcs_exec() iirc.
Thanks for the tip. It sounds a bit heavy weight though.
-- Juha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users