Discussion:
[SR-Users] pipelimit rate question
Alex Balashov
2014-10-19 07:25:55 UTC
Permalink
Hi,

There does not seem to be a way to update the limits of pipes dynamically.

If I don't use DB backing, there is no MI/RPC command to flush existing
pipes and cause them to be recreated with reconstituted limits.

If I use DB backing and add pipes to the pl_pipes table, an SQL update
to the limit column does not influence existing pipes that have been
loaded from the DB on startup.

Am I missing something, or does the existing feature set of the module
simply not allow this?

Thanks,
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906
Alex Balashov
2014-10-19 07:28:09 UTC
Permalink
Post by Alex Balashov
If I don't use DB backing, there is no MI/RPC command to flush existing
pipes and cause them to be recreated with reconstituted limits.
I should clarify: there is the pl.set_pipe command, but it does not like
the pipe name being an integer as given in the example, i.e.

kamcmd pl.set_pipe 2 RED 10

This gives me:

[***@centosity6 kamailio]# kamcmd pl.set_pipe 1 TAILDROP 50
error: 400 - error at parameter 0: expected string type but record
doesn't match type

-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906
Daniel-Constantin Mierla
2014-10-19 09:50:37 UTC
Permalink
Hello,
Post by Alex Balashov
Hi,
There does not seem to be a way to update the limits of pipes
dynamically.
If I don't use DB backing, there is no MI/RPC command to flush
existing pipes and cause them to be recreated with reconstituted limits.
If I use DB backing and add pipes to the pl_pipes table, an SQL update
to the limit column does not influence existing pipes that have been
loaded from the DB on startup.
Am I missing something, or does the existing feature set of the module
simply not allow this?
I haven't really considered that, but, but on the other hand, that could
be misinterpretation bug of what would be a dynamic pipe -- the code is
there, just needs to refresh the value in memory. I will look over it as
I get some time during traveling to Astricon (read -- it can take a bit
to show up).

Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Daniel-Constantin Mierla
2014-10-19 09:51:23 UTC
Permalink
Post by Alex Balashov
Post by Alex Balashov
If I don't use DB backing, there is no MI/RPC command to flush existing
pipes and cause them to be recreated with reconstituted limits.
I should clarify: there is the pl.set_pipe command, but it does not
like the pipe name being an integer as given in the example, i.e.
kamcmd pl.set_pipe 2 RED 10
error: 400 - error at parameter 0: expected string type but record
doesn't match type
This is kamcmd auto-converting numbers to integer, use:

kamcmd pl.set_pipe s:2 RED 10

Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...