Discussion:
[SR-Users] Accessing Message Buffer in Kamailio
AliReza Khoshgoftar Monfared
2014-08-07 17:06:46 UTC
Permalink
Hi list,

Is there a way to survey the message buffer (iei the queue where arriving
sip messages wait to be processed by worker threads) in Kamailio?

Is there a way to check the number of messages in this buffer?
Additionally, is it possible to survey the number of messages by method
(INVITE, BYE, etc.)?


I know that the ratelimit module (
http://kamailio.org/docs/modules/stable/modules/ratelimit.html) shall
access such buffers, but I do not see any variable accessible in the config
offered by that module.

Am I missing sth or is there a way to do so?

Thanks
Alireza
Daniel-Constantin Mierla
2014-08-08 06:12:23 UTC
Permalink
Hello,

for UDP and SCTP traffic there is no buffer in Kamailio. The kernel does
buffering and kamailio receives each datagram at once, process it and
then gets the next one.

For tcp (tls), there is a read buffer in kamailio to parse as received,
because it has to split the traffic in sip messages. But still the main
buffer is in kernel.

In other words, kamailio doesn't have access to pending packets from the
network. Ratelimit module works on the number of packets processed by
kamailio (those already read from kernel buffer).

Cheers,
Daniel
Post by AliReza Khoshgoftar Monfared
Hi list,
Is there a way to survey the message buffer (iei the queue where
arriving sip messages wait to be processed by worker threads) in Kamailio?
Is there a way to check the number of messages in this buffer?
Additionally, is it possible to survey the number of messages by
method (INVITE, BYE, etc.)?
I know that the ratelimit module
(http://kamailio.org/docs/modules/stable/modules/ratelimit.html) shall
access such buffers, but I do not see any variable accessible in the
config offered by that module.
Am I missing sth or is there a way to do so?
Thanks
Alireza
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
AliReza Khoshgoftar Monfared
2014-08-08 18:08:18 UTC
Permalink
Thanks very much Daniel,
So, I assume that to look at the congestion of the messages there are two
options:

1) surveying the socket buffer using netstat
2) counting processed messages of Kamailio inside the route block

And I assume that Ratelimit does the latter, right? ie it maintains a
counter that is incremented after parsing any message and decremented after
it is relayed?

Warmly,
Alireza
Post by Daniel-Constantin Mierla
Hello,
for UDP and SCTP traffic there is no buffer in Kamailio. The kernel does
buffering and kamailio receives each datagram at once, process it and then
gets the next one.
For tcp (tls), there is a read buffer in kamailio to parse as received,
because it has to split the traffic in sip messages. But still the main
buffer is in kernel.
In other words, kamailio doesn't have access to pending packets from the
network. Ratelimit module works on the number of packets processed by
kamailio (those already read from kernel buffer).
Cheers,
Daniel
Hi list,
Is there a way to survey the message buffer (iei the queue where
arriving sip messages wait to be processed by worker threads) in Kamailio?
Is there a way to check the number of messages in this buffer?
Additionally, is it possible to survey the number of messages by method
(INVITE, BYE, etc.)?
I know that the ratelimit module (
http://kamailio.org/docs/modules/stable/modules/ratelimit.html) shall
access such buffers, but I do not see any variable accessible in the config
offered by that module.
Am I missing sth or is there a way to do so?
Thanks
Alireza
_______________________________________________
--
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Loading...